From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752117AbcFLEs1 (ORCPT ); Sun, 12 Jun 2016 00:48:27 -0400 Received: from ale.deltatee.com ([207.54.116.67]:59177 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbcFLEsZ (ORCPT ); Sun, 12 Jun 2016 00:48:25 -0400 To: "Rafael J. Wysocki" References: <573DF82D.50006@deltatee.com> <2597967.kdkjeIcHno@vostro.rjw.lan> <575C4CE4.6060608@deltatee.com> <3878383.bGDWSmEsze@vostro.rjw.lan> Cc: Kees Cook , "Rafael J. Wysocki" , Stephen Smalley , Ingo Molnar , Ingo Molnar , the arch/x86 maintainers , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , Brian Gerst From: Logan Gunthorpe Message-ID: <575CE988.9030201@deltatee.com> Date: Sat, 11 Jun 2016 22:48:08 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 In-Reply-To: <3878383.bGDWSmEsze@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 50.66.97.235 X-SA-Exim-Rcpt-To: brgerst@gmail.com, dvlasenk@redhat.com, bp@alien8.de, luto@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, x86@kernel.org, mingo@redhat.com, mingo@kernel.org, sds@tycho.nsa.gov, rafael@kernel.org, keescook@chromium.org, rjw@rjwysocki.net X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: PROBLEM: Resume form hibernate broken by setting NX on gap X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On 11/06/16 07:05 PM, Rafael J. Wysocki wrote: >> 1) Commit ab76f7b4ab only extends the NX bit between __ex_table and >> rodata; which, by my understanding, shouldn't be used by anything. And >> __ex_table and rodata are fixed by the kernel's binary so both symbols >> should be the same in both the image kernel and the boot kernel given >> that both are running from the same binary. > > Well, what if the kernel is relocated? Ah, I'm sure I don't fully grasp the implications of that but I would assume that if the image kernel were located somewhere else it would still be far away from the boot kernel's ex_table/rodata boundary. >> 2) When ab76f7b4ab is reverted, hibernation seems to work 100%. Though, >> when it's in place, it only works some of the time. Given that commit is >> only extending the NX region a bit, if there is some random mismatch, >> why does it never reach rodata? In other words, why is rodata a magic >> line that seems to work all the time -- why doesn't this random mismatch >> ever extend into the rodata region? rodata isn't _that_ far away from >> the end of ex_table. > > That's a very good question. :-) Yeah, I guess if we knew the answer we'd understand what was going on and have a fix. > Can you please check if the patch below makes any difference? I'm afraid it's no different. The kernel still freezes on resume. Though, no warnings with this one. Thanks, Logan