[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1503171028550.25438@pobox.suse.cz>
Date: Tue, 17 Mar 2015 10:31:36 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Rusty Russell <rusty@...tcorp.com.au>
cc: Petr Mladek <pmladek@...e.cz>, Seth Jennings <sjenning@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Miroslav Benes <mbenes@...e.cz>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
mingo@...nel.org, mathieu.desnoyers@...icios.com, oleg@...hat.com,
paulmck@...ux.vnet.ibm.com, live-patching@...r.kernel.org,
linux-kernel@...r.kernel.org, andi@...stfloor.org,
rostedt@...dmis.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v4] livepatch/module: Correctly handle coming and going
modules
On Tue, 17 Mar 2015, Rusty Russell wrote:
> >> There is a notifier that handles live patches for coming and going modules.
> >> It takes klp_mutex lock to avoid races with coming and going patches but
> >> it does not keep the lock all the time. Therefore the following races are
> >> possible:
> > [ ... snip ... ]
> >> diff --git a/include/linux/module.h b/include/linux/module.h
> >> index b653d7c0a05a..7232fde6a991 100644
> >> --- a/include/linux/module.h
> >> +++ b/include/linux/module.h
> >> @@ -344,6 +344,10 @@ struct module {
> >> unsigned long *ftrace_callsites;
> >> #endif
> >>
> >> +#ifdef CONFIG_LIVEPATCH
> >> + bool klp_alive;
> >> +#endif
> >> +
> >
> > Rusty, are you okay with this please? I'd like to have the race fixed in
> > 4.0 still, but don't want to be making changes to struct module without
> > your ack.
>
> I look at the amount of explanation and discussion around these patches
> and I fear the complexity of what you're doing.
Well, the race is rather theoretical (I don't think everyone ever saw it,
nor will in the future), but we'd rather be on a safe side.
> Acked-by: Rusty Russell <rusty@...tcorp.com.au>
Thanks! I am applying this to for-4.0/upstream-fixes.
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists