From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbcF3CQR (ORCPT ); Wed, 29 Jun 2016 22:16:17 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:55965 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751450AbcF3CQQ (ORCPT ); Wed, 29 Jun 2016 22:16:16 -0400 From: "Rafael J. Wysocki" To: Logan Gunthorpe Cc: Kees Cook , Borislav Petkov , Linus Torvalds , "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , lkml , "Rafael J. Wysocki" , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Linux PM list , Stephen Smalley Subject: Re: [PATCH v3] x86/power/64: Fix kernel text mapping corruption during image restoration Date: Thu, 30 Jun 2016 04:20:43 +0200 Message-ID: <2398306.qXx6AZtdS5@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <65d98ad4-124b-64e4-84e5-877af71a1d44@deltatee.com> References: <20160617105435.GB15997@pd.tnic> <65d98ad4-124b-64e4-84e5-877af71a1d44@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)" > > You can find a photo of the panic here: > > http://staff.deltatee.com/~logang/panic.jpg Thanks for the report! That's not what Boris was seeing at least. It looks like clearing the NX bit for relocated_restore_code in relocate_restore_code() didn't work for some reason. I don't see why it may not work ATM, I need to have a fresh look at that tomorrow. I had hoped to be able to fix this bug for 4.7, but it looks like it will miss the mark after all. Oh well. Thanks, Rafael