This is a note to let you know that I've just added the patch titled
powerpc: Avoid code patching freed init sections
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerp
On Mon, Sep 10, 2018 at 08:05:38PM +1000, Michael Neuling wrote:
>
> > > + /* Make sure we aren't patching a freed init section */
> > > + if (in_init_section(patch_addr) && init_freed())
> > > + return 0;
> > > +
> >
> > Do we even need the init_freed() check?
>
> Maybe not. If userspa
On Mon, 10 Sep 2018 12:16:35 +0200
Christophe LEROY wrote:
> Le 10/09/2018 à 12:05, Michael Neuling a écrit :
> >
> >>> + /* Make sure we aren't patching a freed init section */
> >>> + if (in_init_section(patch_addr) && init_freed())
> >>> + return 0;
> >>> +
> >>
> >> Do we even ne
Le 10/09/2018 à 12:05, Michael Neuling a écrit :
+ /* Make sure we aren't patching a freed init section */
+ if (in_init_section(patch_addr) && init_freed())
+ return 0;
+
Do we even need the init_freed() check?
Maybe not. If userspace isn't up, then maybe it's
> > + /* Make sure we aren't patching a freed init section */
> > + if (in_init_section(patch_addr) && init_freed())
> > + return 0;
> > +
>
> Do we even need the init_freed() check?
Maybe not. If userspace isn't up, then maybe it's ok to skip.
> What user input can we process i
> > For stable I've marked this as v4.13+ since that's when we refactored
> > code-patching.c but it could go back even further than that. In
> > reality though, I think we can only hit this since the first
> > spectre/meltdown changes.
>
> Which means it affects all maintained stable trees beca
On Mon, 10 Sep 2018 15:44:05 +1000
Michael Neuling wrote:
> This stops us from doing code patching in init sections after they've
> been freed.
>
> In this chain:
> kvm_guest_init() ->
> kvm_use_magic_page() ->
> fault_in_pages_readable() ->
>__get_user() ->
> __get_
On Mon, 10 Sep 2018 15:44:05 +1000
Michael Neuling wrote:
> This stops us from doing code patching in init sections after they've
> been freed.
>
> In this chain:
> kvm_guest_init() ->
> kvm_use_magic_page() ->
> fault_in_pages_readable() ->
>__get_user() ->
> __get_
This stops us from doing code patching in init sections after they've
been freed.
In this chain:
kvm_guest_init() ->
kvm_use_magic_page() ->
fault_in_pages_readable() ->
__get_user() ->
__get_user_nocheck() ->
barrier_nospec();
We have a code patching