linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] usercopy: Do not fail on memory from former init sections
       [not found] <YdeHDDAP+TY5wNeT@ls3530>
@ 2022-01-07 23:44 ` Andrew Morton
  2022-01-07 23:46 ` Andrew Morton
  2022-01-07 23:51 ` Andrew Morton
  2 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-01-07 23:44 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel, linux-mm, linux-parisc

On Fri, 7 Jan 2022 01:19:24 +0100 Helge Deller <deller@gmx.de> wrote:

> On some platforms the memory area between the _stext and the _etext
> symbols includes the init sections (parisc and csky). If the init
> sections are freed after bootup, the kernel may reuse this memory.
> 
> In one test the usercopy checks if the given address is inside the .text
> section (from _stext to _etext), and it wrongly fails on the mentioned
> platforms if the memory is from the former init section.
> 
> Fix this failure by first checking against the init sections before
> checking against the _stext/_etext section.

This sounds like it might have very serious runtime effects?

Please always fully describe a bug's runtime effects when fixing that bug.

> Fixes: 98400ad75e95 ("parisc: Fix backtrace to always include init funtion names")

So is this a must-have for 5.16?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usercopy: Do not fail on memory from former init sections
       [not found] <YdeHDDAP+TY5wNeT@ls3530>
  2022-01-07 23:44 ` [PATCH] usercopy: Do not fail on memory from former init sections Andrew Morton
@ 2022-01-07 23:46 ` Andrew Morton
  2022-01-07 23:51 ` Andrew Morton
  2 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-01-07 23:46 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel, linux-mm, linux-parisc

On Fri, 7 Jan 2022 01:19:24 +0100 Helge Deller <deller@gmx.de> wrote:

> On some platforms the memory area between the _stext and the _etext
> symbols includes the init sections (parisc and csky). If the init
> sections are freed after bootup, the kernel may reuse this memory.
> 
> In one test the usercopy checks if the given address is inside the .text
> section (from _stext to _etext), and it wrongly fails on the mentioned
> platforms if the memory is from the former init section.
> 
> Fix this failure by first checking against the init sections before
> checking against the _stext/_etext section.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Fixes: 98400ad75e95 ("parisc: Fix backtrace to always include init funtion names")
> 

And 98400ad75e95 has cc:stable so we'll want cc:stable on this patch
also, yes?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usercopy: Do not fail on memory from former init sections
       [not found] <YdeHDDAP+TY5wNeT@ls3530>
  2022-01-07 23:44 ` [PATCH] usercopy: Do not fail on memory from former init sections Andrew Morton
  2022-01-07 23:46 ` Andrew Morton
@ 2022-01-07 23:51 ` Andrew Morton
  2 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-01-07 23:51 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel, linux-mm, linux-parisc

On Fri, 7 Jan 2022 01:19:24 +0100 Helge Deller <deller@gmx.de> wrote:

> On some platforms the memory area between the _stext and the _etext
> symbols includes the init sections (parisc and csky). If the init
> sections are freed after bootup, the kernel may reuse this memory.
> 
> In one test the usercopy checks if the given address is inside the .text
> section (from _stext to _etext), and it wrongly fails on the mentioned
> platforms if the memory is from the former init section.
> 
> Fix this failure by first checking against the init sections before
> checking against the _stext/_etext section.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Fixes: 98400ad75e95 ("parisc: Fix backtrace to always include init funtion names")

Wait.  98400ad75e95 is actually called

	Revert "parisc: Fix backtrace to always include init funtion names"

and it reverts 279917e27edc2.  This isn't making a lot of sense.


And neither 98400ad75e95 nor 279917e27edc2 touch csky.

And I really wouldn't want to jam a patch into mm/usercopy.c at this
point in the life of 5.16 anyway.

I'll drop this patch.  Please revisit and clarify all these things.  A lot!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-07 23:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <YdeHDDAP+TY5wNeT@ls3530>
2022-01-07 23:44 ` [PATCH] usercopy: Do not fail on memory from former init sections Andrew Morton
2022-01-07 23:46 ` Andrew Morton
2022-01-07 23:51 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox