[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1708BB6F-5B71-4868-9D94-12A1C0CB0A36@vmware.com>
Date: Mon, 5 Nov 2018 18:14:24 +0000
From: Nadav Amit <namit@...are.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...hat.com>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Jiri Kosina <jkosina@...e.cz>,
Andy Lutomirski <luto@...nel.org>,
Kees Cook <keescook@...omium.org>,
Dave Hansen <dave.hansen@...el.com>
Subject: Re: [PATCH v3 1/7] Fix "x86/alternatives: Lockdep-enforce text_mutex
in text_poke*()"
From: Thomas Gleixner
Sent: November 4, 2018 at 8:58:20 PM GMT
> To: Nadav Amit <namit@...are.com>
> Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org>, x86@...nel.org>, H. Peter Anvin <hpa@...or.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, Jiri Kosina <jkosina@...e.cz>, Andy Lutomirski <luto@...nel.org>, Kees Cook <keescook@...omium.org>, Dave Hansen <dave.hansen@...el.com>
> Subject: Re: [PATCH v3 1/7] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"
>
>
> On Fri, 2 Nov 2018, Nadav Amit wrote:
>
>> text_mutex is expected to be held before text_poke() is called, but we
>> cannot add a lockdep assertion since kgdb does not take it, and instead
>> *supposedly* ensures the lock is not taken and will not be acquired by
>> any other core while text_poke() is running.
>>
>> The reason for the "supposedly" comment is that it is not entirely clear
>> that this would be the case if gdb_do_roundup is zero.
>>
>> Add a comment to clarify this behavior, and restore the assertions as
>> they were before the recent commit.
>
> It restores nothing. It just removes the assertion.
Sorry - wrong commit log. There were no other assertions before.
>
>> This partially reverts commit 9222f606506c ("x86/alternatives:
>> Lockdep-enforce text_mutex in text_poke*()")
>
> That opens up the same can of worms again, which took us a while to close.
I’m surprised. This patch only removes one assertion that was added two
months ago.
> Can we please instead split out the text_poke() code into a helper function
> and have two callers:
>
> text_poke() which contains the assert
>
> text_poke_kgdb() which does not
Sure. I will send another version once I realize how to deal with the other
concerns that Peter and Andy raised.
Regards,
Nadav
Powered by blists - more mailing lists