From patchwork Mon May 20 18:23:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 2594531 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 099A63FE81 for ; Mon, 20 May 2013 18:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756112Ab3ETSXL (ORCPT ); Mon, 20 May 2013 14:23:11 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:50714 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755457Ab3ETSXK (ORCPT ); Mon, 20 May 2013 14:23:10 -0400 Received: by mail-ee0-f44.google.com with SMTP id b57so4305106eek.31 for ; Mon, 20 May 2013 11:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=rLqLUWMhxIDARX1FVKs+RyqpgCzSyoEnF/sKy17v30M=; b=SAQQkvbmH3ePgzE+b5ToOWVvpryZ/qmj5vffmbnZdsJP13s9zpE1rE3gTK+N32f39d WPVHZqSPQxHvCvqa7VopbSeSg6viL6UCC4P6z0xBiItEmXasXQvjxTBq5P2K2Q9d4TVA nUsoiPRiqvRFoHgbGsmLJUeW1f7ZrJ7u+AeNlaJ+ABRFSVOFGwTKEQ2+EZxwX6VnvpUA IPox7OfxmH0lHwXsYjTRzV6pzCu9Zut57ZPn/X+je1eiFJonejzWxiqsVg6hmadOBgpe 4qQTdGW4cXnl2rtwRMEQE7Qdp+bkKKkz4+W/G8r0yzy26MpxWJREMmEb2Kd4p33mrEvC QvMA== X-Received: by 10.14.3.137 with SMTP id 9mr170196928eeh.0.1369074188909; Mon, 20 May 2013 11:23:08 -0700 (PDT) Received: from localhost (ip-78-45-94-160.net.upcbroadband.cz. [78.45.94.160]) by mx.google.com with ESMTPSA id l6sm39238440eem.9.2013.05.20.11.23.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 May 2013 11:23:07 -0700 (PDT) Date: Mon, 20 May 2013 20:23:06 +0200 From: Michal Hocko To: Linus Torvalds Cc: "H. Peter Anvin" , "H. Peter Anvin" , Fernando Luis =?iso-8859-1?Q?V=E1zquez?= Cao , "Rafael J. Wysocki" , the arch/x86 maintainers , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH] Revert "x86-64, init: Do not set NX bits on non-NX capable hardware" Message-ID: <20130520182306.GA5348@dhcp22.suse.cz> References: <20130514160108.GA5055@dhcp22.suse.cz> <1369062192-7066-1-git-send-email-mhocko@suse.cz> <519A483F.7070400@zytor.com> <20130520164335.GA9441@dhcp22.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Mon 20-05-13 10:21:09, Linus Torvalds wrote: > On Mon, May 20, 2013 at 9:43 AM, Michal Hocko wrote: > > > > The configuration has been posted in the referenced thread: > > https://lkml.org/lkml/2013/5/14/398 > > Hmm. That's a regular intel i5 Sandybridge CPU. Which certainly has NX. > > Hmm. secondary_startup_64 isn't __initcode, is it? I think it's used > for resuming the other CPU's too and for CPU hotplug. Yes/no? > > If so early_pmd_flags shouldn't be __initdata, I think. > > Michal, does it work if you don't do the revert, but just remove the > __initdata instead? Right you are! The following patch on top of your tree fixes the problem. Thanks a lot. I will leave the proper changelog to somebody who is more familiar with the area but AFAIU the real problem is that early_pmd_flags is no longer available beacause the section is gone. Anyway, feel free to add my Tested-by: Michal Hocko and mark it for 3.9 stable tree diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index dab95a8..55b6761 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -34,7 +34,7 @@ extern pgd_t early_level4_pgt[PTRS_PER_PGD]; extern pmd_t early_dynamic_pgts[EARLY_DYNAMIC_PAGE_TABLES][PTRS_PER_PMD]; static unsigned int __initdata next_early_pgt = 2; -pmdval_t __initdata early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); +pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); /* Wipe all early page tables except for the kernel symbol map */ static void __init reset_early_page_tables(void)