On Mon, 10 Sep 2018 12:16:35 +0200
Christophe LEROY <christophe.le...@c-s.fr> 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 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.

Some stuff like cpu feature tests have an early variant that does not
need patching but maybe not everything has.

and some stuff like lwsync might be also expanded from some macros or
inlines and may be needed in the init code. It might be questionable to
rely on it getting patched, though. Hard to tell without seeing what is
actually patched where.

Thanks

Michal

Reply via email to