Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 08:57:38PM +, Nadav Amit wrote: > at 1:25 PM, Peter Zijlstra wrote: > > > On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: > >>> With that CR3 trickery, we can rid ourselves of the text_mutex > >>> requirement, since concurrent text_poke is 'safe'. That

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 08:57:38PM +, Nadav Amit wrote: > at 1:25 PM, Peter Zijlstra wrote: > > > On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: > >>> With that CR3 trickery, we can rid ourselves of the text_mutex > >>> requirement, since concurrent text_poke is 'safe'. That

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 1:25 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: >>> With that CR3 trickery, we can rid ourselves of the text_mutex >>> requirement, since concurrent text_poke is 'safe'. That would clean up >>> the kgdb code quite a bit. >> >> I don’t know. I’m

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 1:25 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: >>> With that CR3 trickery, we can rid ourselves of the text_mutex >>> requirement, since concurrent text_poke is 'safe'. That would clean up >>> the kgdb code quite a bit. >> >> I don’t know. I’m

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: > > With that CR3 trickery, we can rid ourselves of the text_mutex > > requirement, since concurrent text_poke is 'safe'. That would clean up > > the kgdb code quite a bit. > > I don’t know. I’m somewhat worried with multiple mechanisms

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 07:58:40PM +, Nadav Amit wrote: > > With that CR3 trickery, we can rid ourselves of the text_mutex > > requirement, since concurrent text_poke is 'safe'. That would clean up > > the kgdb code quite a bit. > > I don’t know. I’m somewhat worried with multiple mechanisms

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 12:53 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 07:42:14PM +, Nadav Amit wrote: >> at 12:40 PM, Peter Zijlstra wrote: >> >>> On Sun, Sep 02, 2018 at 10:32:19AM -0700, Nadav Amit wrote: text_mutex is expected to be held before text_poke() is called, but we cannot add

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 12:53 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 07:42:14PM +, Nadav Amit wrote: >> at 12:40 PM, Peter Zijlstra wrote: >> >>> On Sun, Sep 02, 2018 at 10:32:19AM -0700, Nadav Amit wrote: text_mutex is expected to be held before text_poke() is called, but we cannot add

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 07:42:14PM +, Nadav Amit wrote: > at 12:40 PM, Peter Zijlstra wrote: > > > On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 07:42:14PM +, Nadav Amit wrote: > at 12:40 PM, Peter Zijlstra wrote: > > > On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 12:40 PM, Peter Zijlstra wrote: > On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Nadav Amit
at 12:40 PM, Peter Zijlstra wrote: > On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-06 Thread Peter Zijlstra
On Sun, Sep 02, 2018 at 10:32:19AM -0700, 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

[PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-02 Thread Nadav Amit
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"

[PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()"

2018-09-02 Thread Nadav Amit
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"