mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	"Klaus S. Madsen" <ksm@hjernemadsen.org>,
	Suspend-devel list <suspend-devel@lists.sourceforge.net>,
	LKML <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Regression in 2.6.25-rc3: s2ram segfaults before suspending
Date: Mon, 3 Mar 2008 18:53:28 +0100	[thread overview]
Message-ID: <20080303175328.GC25496@elte.hu> (raw)
In-Reply-To: <47CC310B.8000305@zytor.com>


* H. Peter Anvin <hpa@zytor.com> wrote:

>> It is strange indeed... Should it be traced as an regression?
>
> I'd like to understand what the heck happened, but as far as we can 
> observe right now, it's a *progression*, not a regression, since 
> executing out of a non-PROT_EXEC area isn't *supposed* to work...

if s2ram worked before, and breaks with v2.6.25 then it's a regression. 
It doesnt really matter that this segfault is the right thing to do ...

what would be _really_ nice to know how this all links up to the PCD -> 
PCD|PWT commit. I.e. how did the commit below suddenly _trigger_ this 
segfault? Are we absolutely sure that the bisection is correct, that 
it's this commit which broke things? [i.e. if this commit is unapplied, 
does s2ram work?]

there are a few "nearby" commits in the bisection tree:

 commit 6c3866558213ff706d8331053386915371ad63ec
 Author: Jeremy Fitzhardinge <jeremy@goop.org>
 Date:   Wed Jan 30 13:32:55 2008 +0100

     x86: move all asm/pgtable constants into one place

 commit 61f38226def55d972cfd0e789971e952525ff8e5
 Author: Ingo Molnar <mingo@elte.hu>
 Date:   Wed Jan 30 13:32:55 2008 +0100

     x86/pgtable: fix constant sign extension problem

 commit dcbae6b377d78190954055ef2d8909ae83ff57de
 Author: Ingo Molnar <mingo@elte.hu>
 Date:   Wed Jan 30 13:32:55 2008 +0100

     x86/pgtable: unify pagetable accessors, #1

which are far more likely candidates IMO of causing this NX related 
segfault than the PCD->PCD|PWT change that was bisected originally.

	Ingo

---------->
commit 82bc03fc158e28c90d7ed9919410776039cb4e14
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 30 13:32:54 2008 +0100

    x86: add PWT to NOCACHE flags
    
    add PWT bit to NOCACHE flags. No real difference to CPUs, but needed
    later for PAT.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
index a8be1ee..16da5d5 100644
--- a/include/asm-x86/pgtable_32.h
+++ b/include/asm-x86/pgtable_32.h
@@ -156,7 +156,7 @@ void paging_init(void);
 extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
 #define __PAGE_KERNEL_RO		(__PAGE_KERNEL & ~_PAGE_RW)
 #define __PAGE_KERNEL_RX		(__PAGE_KERNEL_EXEC & ~_PAGE_RW)
-#define __PAGE_KERNEL_NOCACHE		(__PAGE_KERNEL | _PAGE_PCD)
+#define __PAGE_KERNEL_NOCACHE		(__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
 #define __PAGE_KERNEL_LARGE		(__PAGE_KERNEL | _PAGE_PSE)
 #define __PAGE_KERNEL_LARGE_EXEC	(__PAGE_KERNEL_EXEC | _PAGE_PSE)
 
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index 3f28010..9c9cddf 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -189,13 +189,13 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
 #define __PAGE_KERNEL_EXEC \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
 #define __PAGE_KERNEL_NOCACHE \
-	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_PCD | _PAGE_ACCESSED | _PAGE_NX)
+	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_PCD | _PAGE_PWT | _PAGE_ACCESSED | _PAGE_NX)
 #define __PAGE_KERNEL_RO \
 	(_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
 #define __PAGE_KERNEL_VSYSCALL \
 	(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
 #define __PAGE_KERNEL_VSYSCALL_NOCACHE \
-	(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_PCD)
+	(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_PCD | _PAGE_PWT)
 #define __PAGE_KERNEL_LARGE \
 	(__PAGE_KERNEL | _PAGE_PSE)
 #define __PAGE_KERNEL_LARGE_EXEC \

  parent reply	other threads:[~2008-03-03 17:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 22:10 Klaus S. Madsen
2008-02-27 22:19 ` Rafael J. Wysocki
2008-02-27 22:40   ` Pavel Machek
2008-02-28  6:47   ` Klaus S. Madsen
2008-02-28  7:03     ` Pavel Machek
2008-02-28  7:08 ` Klaus S. Madsen
2008-02-28  9:16 ` Ingo Molnar
2008-02-28  9:28   ` Klaus S. Madsen
2008-02-28  9:40     ` Ingo Molnar
2008-02-28 15:04       ` Klaus S. Madsen
2008-02-28 17:52         ` H. Peter Anvin
2008-02-28 19:24           ` Klaus S. Madsen
2008-02-28 19:31             ` H. Peter Anvin
2008-02-28 19:49               ` Klaus S. Madsen
2008-02-28 22:45                 ` H. Peter Anvin
2008-02-29  7:00                   ` Klaus S. Madsen
2008-02-29 21:05                     ` H. Peter Anvin
2008-02-29 21:26                       ` Ingo Molnar
2008-03-01  9:45                         ` Klaus S. Madsen
2008-03-01 19:53                           ` H. Peter Anvin
2008-03-03 12:17                           ` Pavel Machek
2008-03-03 15:11                             ` Klaus S. Madsen
2008-03-03 17:48                               ` Ingo Molnar
2008-03-03 17:53                                 ` H. Peter Anvin
2008-03-03 20:52                                 ` Klaus S. Madsen
2008-03-03 20:58                                   ` H. Peter Anvin
2008-03-03 21:05                                   ` Pavel Machek
2008-03-03 21:06                                     ` Matthew Garrett
2008-03-03 21:06                                     ` Pavel Machek
2008-03-03 21:21                                       ` Klaus S. Madsen
2008-03-04 12:36                                   ` Ingo Molnar
2008-03-04 21:58                                     ` Klaus S. Madsen
2008-03-04 22:08                                       ` H. Peter Anvin
2008-03-04 23:00                                     ` Jeremy Fitzhardinge
2008-03-04 23:11                                       ` H. Peter Anvin
2008-03-04 23:21                                         ` Jeremy Fitzhardinge
2008-03-04 23:30                                         ` Matthew Garrett
2008-03-04 12:42                                   ` Ingo Molnar
2008-03-03 15:40                             ` Rafael J. Wysocki
2008-03-03 17:10                             ` H. Peter Anvin
2008-03-03 17:47                               ` Pavel Machek
2008-03-03 17:50                                 ` H. Peter Anvin
2008-03-03 17:53                               ` Ingo Molnar [this message]
2008-03-03 17:58                                 ` H. Peter Anvin
2008-03-01  1:18                       ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080303175328.GC25496@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=ksm@hjernemadsen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=suspend-devel@lists.sourceforge.net \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®