[PATCH] powerpc: Avoid code patching freed init sections

Michael Neuling mikey at neuling.org
Mon Sep 10 20:05:38 AEST 2018


> > +	/* 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 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