Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-13 Thread Christophe Leroy
Le 12/11/2024 à 21:28, Luis Chamberlain a écrit : On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: diff --git a/kernel/module/main.c b/kernel/module/main.c index 1bf4b0db291b..b603c9647e73 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2582,7 +2582,7 @@ stat

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-13 Thread Luis Chamberlain
On Wed, Nov 13, 2024 at 07:49:24AM +0100, Christophe Leroy wrote: > > > Le 12/11/2024 à 21:28, Luis Chamberlain a écrit : > > On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: > > > diff --git a/kernel/module/main.c b/kernel/module/main.c > > > index 1bf4b0db291b..b603c9647e73 100

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-12 Thread Luis Chamberlain
On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: > diff --git a/kernel/module/main.c b/kernel/module/main.c > index 1bf4b0db291b..b603c9647e73 100644 > --- a/kernel/module/main.c > +++ b/kernel/module/main.c > @@ -2582,7 +2582,7 @@ static noinline int do_init_module(struct module *

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-11 Thread Christophe Leroy
Le 09/11/2024 à 22:03, Daniel Gomez a écrit : On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: To be on the safe side, try to set ro_after_init data section readonly at the same time as rodata. If it fails it will likely fail again later so let's cancel module loading while we stil

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-09 Thread Daniel Gomez
On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: > To be on the safe side, try to set ro_after_init data section readonly > at the same time as rodata. If it fails it will likely fail again > later so let's cancel module loading while we still can do it. > If it doesn't fail, put it back

[RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-09 Thread Christophe Leroy
To be on the safe side, try to set ro_after_init data section readonly at the same time as rodata. If it fails it will likely fail again later so let's cancel module loading while we still can do it. If it doesn't fail, put it back to read-only, continue module loading and cross fingers so that it