Re: code sections beyond .text skipped fromalternatives_smp_module_add

From: Konrad Rzeszutek Wilk
Date: Wed Jun 22 2011 - 09:21:31 EST


> > Looking at the code, in module_finalize for x86, only .text seems to
> > be getting picked for the patching of lock prefixes while other
> > sections such as .exit.text or .init.text are not. Is there a reason
> > we skip the other *.text code sections from the lock patches? Would
> + Gerd Hoffmann who introduced the SMP patching code below back in Jan
> 2006 as part of 2.6.15.

Whoa, long time ago.

>
> Any comments on why patching of smp_lock prefixes should be restricted
> to .text and not other *.text code sections?

It could be that at that time the .exit.text or .init.text did not exist.

As in, the patching code just hasn't kept up. One way of checking that
is just finding the ancient 2.6.15 code and seeing if there is any
mention of those extra segments.

Do you have a patch to fix this?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/