Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Rafael J. Wysocki
On Thu, Jun 30, 2016 at 5:56 AM, Logan Gunthorpe wrote: > > > On 29/06/16 08:55 PM, Rafael J. Wysocki wrote: > >> The only thing that comes to mind at this point is that TLBs should be >> flushed >> after page tables changes, so please apply the appended and let me know >> if

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Rafael J. Wysocki
On Thu, Jun 30, 2016 at 5:56 AM, Logan Gunthorpe wrote: > > > On 29/06/16 08:55 PM, Rafael J. Wysocki wrote: > >> The only thing that comes to mind at this point is that TLBs should be >> flushed >> after page tables changes, so please apply the appended and let me know >> if you see this panic

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Rafael J. Wysocki
On Thu, Jun 30, 2016 at 11:45 AM, Borislav Petkov wrote: > On Thu, Jun 30, 2016 at 04:20:43AM +0200, Rafael J. Wysocki wrote: >> That's not what Boris was seeing at least. > > Well, I had it a couple of times during testing patches. This is all > from the logs: > > [ 65.121109]

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Rafael J. Wysocki
On Thu, Jun 30, 2016 at 11:45 AM, Borislav Petkov wrote: > On Thu, Jun 30, 2016 at 04:20:43AM +0200, Rafael J. Wysocki wrote: >> That's not what Boris was seeing at least. > > Well, I had it a couple of times during testing patches. This is all > from the logs: > > [ 65.121109] PM: Basic memory

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Borislav Petkov
On Thu, Jun 30, 2016 at 04:20:43AM +0200, Rafael J. Wysocki wrote: > That's not what Boris was seeing at least. Well, I had it a couple of times during testing patches. This is all from the logs: [ 65.121109] PM: Basic memory bitmaps freed [ 65.125991] Restarting tasks ... [ 65.129342]

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-30 Thread Borislav Petkov
On Thu, Jun 30, 2016 at 04:20:43AM +0200, Rafael J. Wysocki wrote: > That's not what Boris was seeing at least. Well, I had it a couple of times during testing patches. This is all from the logs: [ 65.121109] PM: Basic memory bitmaps freed [ 65.125991] Restarting tasks ... [ 65.129342]

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Logan Gunthorpe
On 29/06/16 08:55 PM, Rafael J. Wysocki wrote: The only thing that comes to mind at this point is that TLBs should be flushed after page tables changes, so please apply the appended and let me know if you see this panic any more with it. Ok, I'll build a new kernel tomorrow. But keep in

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Logan Gunthorpe
On 29/06/16 08:55 PM, Rafael J. Wysocki wrote: The only thing that comes to mind at this point is that TLBs should be flushed after page tables changes, so please apply the appended and let me know if you see this panic any more with it. Ok, I'll build a new kernel tomorrow. But keep in

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Rafael J. Wysocki
On Thursday, June 30, 2016 04:20:43 AM Rafael J. Wysocki wrote: > On Wednesday, June 29, 2016 07:52:18 PM Logan Gunthorpe wrote: > > Hey Raf, > > > > Sorry to report that although the patch works the majority of the time, > > I just got a suspicious kernel panic during resume. > > > > It said:

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Rafael J. Wysocki
On Thursday, June 30, 2016 04:20:43 AM Rafael J. Wysocki wrote: > On Wednesday, June 29, 2016 07:52:18 PM Logan Gunthorpe wrote: > > Hey Raf, > > > > Sorry to report that although the patch works the majority of the time, > > I just got a suspicious kernel panic during resume. > > > > It said:

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Rafael J. Wysocki
On Wednesday, June 29, 2016 07:52:18 PM Logan Gunthorpe wrote: > Hey Raf, > > Sorry to report that although the patch works the majority of the time, > I just got a suspicious kernel panic during resume. > > It said: > > "kernel tried to execute NX protected page - exploit attempt? (uid: 0)" >

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Rafael J. Wysocki
On Wednesday, June 29, 2016 07:52:18 PM Logan Gunthorpe wrote: > Hey Raf, > > Sorry to report that although the patch works the majority of the time, > I just got a suspicious kernel panic during resume. > > It said: > > "kernel tried to execute NX protected page - exploit attempt? (uid: 0)" >

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Logan Gunthorpe
Hey Raf, Sorry to report that although the patch works the majority of the time, I just got a suspicious kernel panic during resume. It said: "kernel tried to execute NX protected page - exploit attempt? (uid: 0)" You can find a photo of the panic here:

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Logan Gunthorpe
Hey Raf, Sorry to report that although the patch works the majority of the time, I just got a suspicious kernel panic during resume. It said: "kernel tried to execute NX protected page - exploit attempt? (uid: 0)" You can find a photo of the panic here:

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Kees Cook
On Mon, Jun 27, 2016 at 4:33 PM, Logan Gunthorpe wrote: > Hey, > > This version is working for me as well. Thanks. > > Logan > > On 27/06/16 08:24 AM, Rafael J. Wysocki wrote: >> >> On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: >>> >>> On Mon, Jun 20, 2016 at 9:35

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-29 Thread Kees Cook
On Mon, Jun 27, 2016 at 4:33 PM, Logan Gunthorpe wrote: > Hey, > > This version is working for me as well. Thanks. > > Logan > > On 27/06/16 08:24 AM, Rafael J. Wysocki wrote: >> >> On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: >>> >>> On Mon, Jun 20, 2016 at 9:35 PM, Logan Gunthorpe

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-27 Thread Logan Gunthorpe
Hey, This version is working for me as well. Thanks. Logan On 27/06/16 08:24 AM, Rafael J. Wysocki wrote: On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: On Mon, Jun 20, 2016 at 9:35 PM, Logan Gunthorpe wrote: Hey Rafael, This patch appears to be working on my

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration

2016-06-27 Thread Logan Gunthorpe
Hey, This version is working for me as well. Thanks. Logan On 27/06/16 08:24 AM, Rafael J. Wysocki wrote: On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: On Mon, Jun 20, 2016 at 9:35 PM, Logan Gunthorpe wrote: Hey Rafael, This patch appears to be working on my laptop. Thanks.

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration (was: Re: ktime_get_ts64() splat during resume)

2016-06-27 Thread Borislav Petkov
On Mon, Jun 27, 2016 at 04:24:22PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH v2] x86/power/64: Fix kernel text mapping corruption during > image restoration > > Logan Gunthorpe reports that hibernation stopped working reliably for >

Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration (was: Re: ktime_get_ts64() splat during resume)

2016-06-27 Thread Borislav Petkov
On Mon, Jun 27, 2016 at 04:24:22PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH v2] x86/power/64: Fix kernel text mapping corruption during > image restoration > > Logan Gunthorpe reports that hibernation stopped working reliably for > him after commit

[PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration (was: Re: ktime_get_ts64() splat during resume)

2016-06-27 Thread Rafael J. Wysocki
On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: > On Mon, Jun 20, 2016 at 9:35 PM, Logan Gunthorpe wrote: > > Hey Rafael, > > > > This patch appears to be working on my laptop. Thanks. > > Same for me: resume still works with KASLR in my tests too. Unfortunately,

[PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration (was: Re: ktime_get_ts64() splat during resume)

2016-06-27 Thread Rafael J. Wysocki
On Tuesday, June 21, 2016 11:04:41 AM Kees Cook wrote: > On Mon, Jun 20, 2016 at 9:35 PM, Logan Gunthorpe wrote: > > Hey Rafael, > > > > This patch appears to be working on my laptop. Thanks. > > Same for me: resume still works with KASLR in my tests too. Unfortunately, Boris still sees