Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-09-24 Thread Kees Cook
On Thu, Sep 21, 2017 at 2:37 AM, Christophe Leroy wrote: > On powerpc, RODATA_TEST fails with message the following messages: > > [6.199505] Freeing unused kernel memory: 528K > [6.203935] rodata_test: test data was not read only > > This is because GCC allocates it to .data section: > > c

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-09-25 Thread Segher Boessenkool
On Sun, Sep 24, 2017 at 12:17:51PM -0700, Kees Cook wrote: > On Thu, Sep 21, 2017 at 2:37 AM, Christophe Leroy > wrote: > > On powerpc, RODATA_TEST fails with message the following messages: > > > > [6.199505] Freeing unused kernel memory: 528K > > [6.203935] rodata_test: test data was not

RE: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-09-25 Thread David Laight
From: Segher Boessenkool > Sent: 25 September 2017 08:37 > On Sun, Sep 24, 2017 at 12:17:51PM -0700, Kees Cook wrote: > > On Thu, Sep 21, 2017 at 2:37 AM, Christophe Leroy > > wrote: > > > On powerpc, RODATA_TEST fails with message the following messages: > > > > > > [6.199505] Freeing unused

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-09-25 Thread Segher Boessenkool
On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: > From: Segher Boessenkool > > The compiler puts this item in .sdata, for 32-bit. There is no .srodata, > > so if it wants to use a small data section, it must use .sdata . > > > > Non-external, non-referenced symbols are not put in .s

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Kees Cook
On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool wrote: > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: >> From: Segher Boessenkool >> > The compiler puts this item in .sdata, for 32-bit. There is no .srodata, >> > so if it wants to use a small data section, it must use .sdata

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Segher Boessenkool
On Mon, Oct 02, 2017 at 12:29:45PM -0700, Kees Cook wrote: > On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool > wrote: > > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: > >> From: Segher Boessenkool > >> > The compiler puts this item in .sdata, for 32-bit. There is no .srodata

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Kees Cook
On Mon, Oct 2, 2017 at 1:08 PM, Segher Boessenkool wrote: > On Mon, Oct 02, 2017 at 12:29:45PM -0700, Kees Cook wrote: >> On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool >> wrote: >> > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: >> >> From: Segher Boessenkool >> >> > The co