Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-12 Thread Nadav Amit
> On Feb 11, 2019, at 2:47 PM, Andy Lutomirski wrote: > > On Mon, Feb 11, 2019 at 11:18 AM Nadav Amit wrote: >> >> + >> + /* >> +* If breakpoints are enabled, disable them while the temporary mm is >> +* used - they do not belong and might cause wrong signals or >> crashe

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-11 Thread Andy Lutomirski
On Mon, Feb 11, 2019 at 11:18 AM Nadav Amit wrote: > > > On Feb 11, 2019, at 11:07 AM, Andy Lutomirski wrote: > > > > I'm certainly amenable to other solutions, but this one does seem the > > least messy. I looked at my old patch, and it doesn't do what you > > want. I'd suggest you just add a

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-11 Thread Nadav Amit
> On Feb 11, 2019, at 11:07 AM, Andy Lutomirski wrote: > > I'm certainly amenable to other solutions, but this one does seem the > least messy. I looked at my old patch, and it doesn't do what you > want. I'd suggest you just add a percpu variable like cpu_dr7 and rig > up some accessors so tha

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-11 Thread Andy Lutomirski
On Mon, Feb 11, 2019 at 10:05 AM Nadav Amit wrote: > > > On Feb 10, 2019, at 9:18 PM, Andy Lutomirski wrote: > > > > > > > > On Feb 10, 2019, at 4:39 PM, Nadav Amit wrote: > > > >>> On Jan 28, 2019, at 4:34 PM, Rick Edgecombe > >>> wrote: > >>> > >>> From: Nadav Amit > >>> > >>> To prevent im

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-11 Thread Nadav Amit
> On Feb 10, 2019, at 9:18 PM, Andy Lutomirski wrote: > > > > On Feb 10, 2019, at 4:39 PM, Nadav Amit wrote: > >>> On Jan 28, 2019, at 4:34 PM, Rick Edgecombe >>> wrote: >>> >>> From: Nadav Amit >>> >>> To prevent improper use of the PTEs that are used for text patching, we >>> want to u

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-10 Thread Andy Lutomirski
On Feb 10, 2019, at 4:39 PM, Nadav Amit wrote: >> On Jan 28, 2019, at 4:34 PM, Rick Edgecombe >> wrote: >> >> From: Nadav Amit >> >> To prevent improper use of the PTEs that are used for text patching, we >> want to use a temporary mm struct. We initailize it by copying the init >> mm. >>

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-10 Thread Nadav Amit
> On Jan 28, 2019, at 4:34 PM, Rick Edgecombe > wrote: > > From: Nadav Amit > > To prevent improper use of the PTEs that are used for text patching, we > want to use a temporary mm struct. We initailize it by copying the init > mm. > > The address that will be used for patching is taken from

Re: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching

2019-02-05 Thread Borislav Petkov
Just nitpicks: Subject: [PATCH v2 05/20] x86/alternative: initializing temporary mm for patching s/initailizing/Initialize/ On Mon, Jan 28, 2019 at 04:34:07PM -0800, Rick Edgecombe wrote: > From: Nadav Amit > > To prevent improper use of the PTEs that are used for text patching, we > want to