[PATCH] powerpc: Avoid code patching freed init sections
Christophe LEROY
christophe.leroy at c-s.fr
Mon Sep 10 20:16:35 AEST 2018
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 ok to skip.
Euh ... Do you mean you'll skip all patches into init functions ?
But code patching is not only for meltdown/spectrum workarounds, some of
the patchings might be needed for the init functions themselves.
Christophe
>
>> What user input can we process in init-only code?
>
> See the stack trace in the commit message. It's a weird case for KVM guests in
> KVM PR mode.
>
> That's the only case I can found so far.
>
>> Also it would be nice to write the function+offset of the skipped patch
>> location into the kernel log.
>
> OK. I'll update.
>
> Mikey
>
More information about the Linuxppc-dev
mailing list