Re: [PATCH] kprobes, x86/alternatives: use text_mutex to protect smp_alt_modules

From: Borislav Petkov
Date: Fri Oct 27 2017 - 07:20:29 EST


On Fri, Oct 27, 2017 at 05:34:44PM +0800, Zhou Chengming wrote:
> Fixes: 2cfa197 "ftrace/alternatives: Introducing *_text_reserved
> functions"
>
> We use alternatives_text_reserved() to check if the address is in
> the fixed pieces of alternative reserved, but the problem is that
> we don't hold the smp_alt mutex when call this function. So the list
> traversal may encounter a deleted list_head if another path is doing
> alternatives_smp_module_del().

Is this something you've triggered on a real machine or is this just
from code staring?

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--