[lkml]   [2018]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.
> This partially reverts commit 9222f606506c ("x86/alternatives:
> Lockdep-enforce text_mutex in text_poke*()")

Alright, what can we do. It's probably better to have this, rather than to
trying to work this around in kgdb to accomodate the rest of the world.

> Cc: Jiri Kosina <>
> Cc: Andy Lutomirski <>
> Cc: Kees Cook <>
> Cc: Dave Hansen <>
> Fixes: 9222f606506c ("x86/alternatives: Lockdep-enforce text_mutex in text_poke*()")
> Reviewed-by: Masami Hiramatsu <>
> Tested-by: Masami Hiramatsu <>
> Suggested-by: Peter Zijlstra <>
> Signed-off-by: Nadav Amit <>

Acked-by: Jiri Kosina <>


Jiri Kosina

 \ /
  Last update: 2018-11-03 11:11    [W:0.181 / U:24.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site