lkml.org 
[lkml]   [2018]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 01/10] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"
On Mon, 12 Nov 2018, Masami Hiramatsu wrote:

> > text_mutex is currently expected to be held before text_poke() is
> > called, but we kgdb does not take the mutex, 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.
> >
> > This patch creates two wrapper functions, text_poke() and
> > text_poke_kgdb() which do or do not run the lockdep assertion
> > respectively.
> >
> > While we are at it, change the return code of text_poke() to something
> > meaningful. One day, callers might actually respect it and the existing
> > BUG_ON() when patching fails could be removed. For kgdb, the return
> > value can actually be used.
>
> Hm, this looks reasonable and good to me.
>
> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Yes, I guess this is much better than putting the 'enforcement by comment'
back in place :)

Acked-by: Jiri Kosina <jkosina@suse.cz>

Thanks.

--
Jiri Kosina
SUSE Labs

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