Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-22 Thread Atish Patra
On Thu, Oct 22, 2020 at 12:22 AM Anup Patel wrote: > > On Thu, Oct 22, 2020 at 10:33 AM Anup Patel wrote: > > > > On Thu, Oct 22, 2020 at 7:01 AM Atish Patra wrote: > > > > > > On Fri, Oct 16, 2020 at 11:24 AM Atish Patra > > > wrote: > > > > > > > > On Tue, Oct 13, 2020 at 10:24 PM Atish Patr

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-22 Thread Anup Patel
On Thu, Oct 22, 2020 at 10:33 AM Anup Patel wrote: > > On Thu, Oct 22, 2020 at 7:01 AM Atish Patra wrote: > > > > On Fri, Oct 16, 2020 at 11:24 AM Atish Patra wrote: > > > > > > On Tue, Oct 13, 2020 at 10:24 PM Atish Patra > > > wrote: > > > > > > > > On Tue, Oct 13, 2020 at 6:21 PM Jim Wilson

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-21 Thread Anup Patel
On Thu, Oct 22, 2020 at 7:01 AM Atish Patra wrote: > > On Fri, Oct 16, 2020 at 11:24 AM Atish Patra wrote: > > > > On Tue, Oct 13, 2020 at 10:24 PM Atish Patra wrote: > > > > > > On Tue, Oct 13, 2020 at 6:21 PM Jim Wilson wrote: > > > > > > > > On Tue, Oct 13, 2020 at 3:25 PM Atish Patra > >

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-21 Thread Atish Patra
On Fri, Oct 16, 2020 at 11:24 AM Atish Patra wrote: > > On Tue, Oct 13, 2020 at 10:24 PM Atish Patra wrote: > > > > On Tue, Oct 13, 2020 at 6:21 PM Jim Wilson wrote: > > > > > > On Tue, Oct 13, 2020 at 3:25 PM Atish Patra wrote: > > > > This happens only when copy_from_user is called from funct

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-16 Thread Atish Patra
On Tue, Oct 13, 2020 at 10:24 PM Atish Patra wrote: > > On Tue, Oct 13, 2020 at 6:21 PM Jim Wilson wrote: > > > > On Tue, Oct 13, 2020 at 3:25 PM Atish Patra wrote: > > > This happens only when copy_from_user is called from function that is > > > annotated with __init. > > > Adding Kito & Jim fo

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-14 Thread Atish Patra
On Mon, Oct 12, 2020 at 8:08 PM Greentime Hu wrote: > > Atish Patra 於 2020年10月13日 週二 上午9:28寫道: > > > > On Mon, Oct 12, 2020 at 4:26 PM Atish Patra wrote: > > > > > > On Mon, Oct 12, 2020 at 6:15 AM Greentime Hu > > > wrote: > > > > > > > > Atish Patra 於 2020年10月10日 週六 上午5:13寫道: > > > > > > >

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-14 Thread Jim Wilson
On Tue, Oct 13, 2020 at 3:25 PM Atish Patra wrote: > This happens only when copy_from_user is called from function that is > annotated with __init. > Adding Kito & Jim for their input > > @kito, @Jim: Please let me know if I should create a issue in > riscv-gnu-toolchain repo or somewhere else. I

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-14 Thread Atish Patra
On Tue, Oct 13, 2020 at 6:21 PM Jim Wilson wrote: > > On Tue, Oct 13, 2020 at 3:25 PM Atish Patra wrote: > > This happens only when copy_from_user is called from function that is > > annotated with __init. > > Adding Kito & Jim for their input > > > > @kito, @Jim: Please let me know if I should c

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-12 Thread Greentime Hu
Atish Patra 於 2020年10月13日 週二 上午9:28寫道: > > On Mon, Oct 12, 2020 at 4:26 PM Atish Patra wrote: > > > > On Mon, Oct 12, 2020 at 6:15 AM Greentime Hu > > wrote: > > > > > > Atish Patra 於 2020年10月10日 週六 上午5:13寫道: > > > > > > > > Currently, .init.text & .init.data are intermixed which makes it > >

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-12 Thread Atish Patra
On Mon, Oct 12, 2020 at 4:26 PM Atish Patra wrote: > > On Mon, Oct 12, 2020 at 6:15 AM Greentime Hu wrote: > > > > Atish Patra 於 2020年10月10日 週六 上午5:13寫道: > > > > > > Currently, .init.text & .init.data are intermixed which makes it > > > impossible > > > apply different permissions to them. .ini

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-12 Thread Atish Patra
On Mon, Oct 12, 2020 at 6:15 AM Greentime Hu wrote: > > Atish Patra 於 2020年10月10日 週六 上午5:13寫道: > > > > Currently, .init.text & .init.data are intermixed which makes it impossible > > apply different permissions to them. .init.data shouldn't need exec > > permissions while .init.text shouldn't hav

Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-12 Thread Greentime Hu
Atish Patra 於 2020年10月10日 週六 上午5:13寫道: > > Currently, .init.text & .init.data are intermixed which makes it impossible > apply different permissions to them. .init.data shouldn't need exec > permissions while .init.text shouldn't have write permission. > > Keep them in separate sections so that di

[PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-09 Thread Atish Patra
Currently, .init.text & .init.data are intermixed which makes it impossible apply different permissions to them. .init.data shouldn't need exec permissions while .init.text shouldn't have write permission. Keep them in separate sections so that different permissions are applied to each section. Th