Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Nadav Amit
at 7:26 PM, Masami Hiramatsu wrote: > On Wed, 29 Aug 2018 14:00:06 -0700 > Sean Christopherson wrote: > >> On Wed, Aug 29, 2018 at 08:44:47PM +, Nadav Amit wrote: >>> at 1:13 PM, Sean Christopherson wrote: >>> On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: > at 10:11

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Masami Hiramatsu
On Wed, 29 Aug 2018 14:00:06 -0700 Sean Christopherson wrote: > On Wed, Aug 29, 2018 at 08:44:47PM +, Nadav Amit wrote: > > at 1:13 PM, Sean Christopherson wrote: > > > > > On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: > > >> at 10:11 AM, Nadav Amit wrote: > > >> > > >>> at

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Nadav Amit
at 2:00 PM, Sean Christopherson wrote: > On Wed, Aug 29, 2018 at 08:44:47PM +, Nadav Amit wrote: >> at 1:13 PM, Sean Christopherson wrote: >> >>> On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: at 10:11 AM, Nadav Amit wrote: > at 1:59 AM, Masami Hiramatsu wrote:

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Sean Christopherson
On Wed, Aug 29, 2018 at 08:44:47PM +, Nadav Amit wrote: > at 1:13 PM, Sean Christopherson wrote: > > > On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: > >> at 10:11 AM, Nadav Amit wrote: > >> > >>> at 1:59 AM, Masami Hiramatsu wrote: > >>> > On Wed, 29 Aug 2018 01:11:42 -

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Nadav Amit
at 1:13 PM, Sean Christopherson wrote: > On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: >> at 10:11 AM, Nadav Amit wrote: >> >>> at 1:59 AM, Masami Hiramatsu wrote: >>> On Wed, 29 Aug 2018 01:11:42 -0700 Nadav Amit wrote: > Use lockdep to ensure that text_mut

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Sean Christopherson
On Wed, Aug 29, 2018 at 07:36:22PM +, Nadav Amit wrote: > at 10:11 AM, Nadav Amit wrote: > > > at 1:59 AM, Masami Hiramatsu wrote: > > > >> On Wed, 29 Aug 2018 01:11:42 -0700 > >> Nadav Amit wrote: > >> > >>> Use lockdep to ensure that text_mutex is taken when text_poke() is > >>> called.

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Nadav Amit
at 10:11 AM, Nadav Amit wrote: > at 1:59 AM, Masami Hiramatsu wrote: > >> On Wed, 29 Aug 2018 01:11:42 -0700 >> Nadav Amit wrote: >> >>> Use lockdep to ensure that text_mutex is taken when text_poke() is >>> called. >>> >>> Actually it is not always taken, specifically when it is called by k

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Nadav Amit
at 1:59 AM, Masami Hiramatsu wrote: > On Wed, 29 Aug 2018 01:11:42 -0700 > Nadav Amit wrote: > >> Use lockdep to ensure that text_mutex is taken when text_poke() is >> called. >> >> Actually it is not always taken, specifically when it is called by kgdb, >> so take the lock in these cases. >

Re: [RFC PATCH 1/6] x86/alternative: assert text_mutex is taken

2018-08-29 Thread Masami Hiramatsu
On Wed, 29 Aug 2018 01:11:42 -0700 Nadav Amit wrote: > Use lockdep to ensure that text_mutex is taken when text_poke() is > called. > > Actually it is not always taken, specifically when it is called by kgdb, > so take the lock in these cases. Can we really take a mutex in kgdb context? kgdb_a