From: Randy Dunlap <rdunlap@xenotime.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>,
lkml <linux-kernel@vger.kernel.org>,
Jan Beulich <jbeulich@novell.com>, Ingo Molnar <mingo@elte.hu>,
Zachary Amsden <zach@vmware.com>
Subject: Re: crashme fault
Date: Mon, 17 Sep 2007 13:05:20 -0700 [thread overview]
Message-ID: <20070917130520.9939ae89.rdunlap@xenotime.net> (raw)
In-Reply-To: <alpine.LFD.0.999.0709170742540.16478@woody.linux-foundation.org>
On Mon, 17 Sep 2007 07:53:50 -0700 (PDT) Linus Torvalds wrote:
> On Mon, 17 Sep 2007, Randy Dunlap wrote:
> >
> > OK, I haven't done the microcode update yet. I ran crashme overnight
> > with your newer patch and it crashed:
>
> Well, duh.
>
> That's because I forgot to do the "error_code & PF_USER" =>
> "user_mode_vm(regs)" thing in the most common case - the
> "bad_area_nosemaphore" if-statement.
>
> But thinking more about it, it's actually just easier and more
> straightforward to just take the same approach that my original hack did,
> namely to just set PF_USER if the register state implies it was in user
> mode.
>
> So ignore that patch. You're better off with my original one that also
> gave debugging info, and if we decide that this really looks like a CPU
> buglet, the patch to actually commit would be a simplified version of that
> (appended, just FYI).
[switched email address due to some unknown problems]
Reverted that patch. Loaded new microcode update file.
Ran test for 3 hours without a fault.
It all seems rather inconclusive to me, still, the new patch (below)
makes sense.
> Also, I changed my mind on the microcode update - if you have a newer
> microcode, go ahead and try it, because if that fixes the issue, then we
> can really just close this as a "unimportant CPU bug" with the patch
> below.
>
> Linus
>
> ---
> arch/x86_64/mm/fault.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
> index 327c9f2..54816ad 100644
> --- a/arch/x86_64/mm/fault.c
> +++ b/arch/x86_64/mm/fault.c
> @@ -374,6 +374,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
> if (unlikely(in_atomic() || !mm))
> goto bad_area_nosemaphore;
>
> + /*
> + * User-mode registers count as a user access even for any
> + * potential system fault or CPU buglet.
> + */
> + if (user_mode_vm(regs))
> + error_code |= PF_USER;
> +
> again:
> /* When running in the kernel we expect faults to occur only to
> * addresses in user space. All other faults represent errors in the
> -
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-09-17 20:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 5:21 Randy Dunlap
2007-09-15 4:28 ` Linus Torvalds
2007-09-15 5:05 ` Randy Dunlap
2007-09-15 5:21 ` Randy Dunlap
2007-09-15 18:34 ` Andi Kleen
2007-09-15 18:40 ` Randy Dunlap
2007-09-15 19:44 ` Linus Torvalds
2007-09-15 19:53 ` Randy Dunlap
2007-09-15 22:15 ` Linus Torvalds
2007-09-15 22:47 ` Linus Torvalds
2007-09-15 23:47 ` Randy Dunlap
2007-09-16 0:34 ` Linus Torvalds
2007-09-16 16:40 ` Randy Dunlap
2007-09-16 17:14 ` Linus Torvalds
2007-09-16 18:12 ` Linus Torvalds
2007-09-17 5:06 ` Randy Dunlap
2007-09-17 5:28 ` Linus Torvalds
2007-09-17 14:29 ` Randy Dunlap
2007-09-17 14:53 ` Linus Torvalds
2007-09-17 20:05 ` Randy Dunlap [this message]
2007-09-16 18:28 ` Andi Kleen
2007-09-16 3:10 ` Andi Kleen
2007-09-16 15:53 ` Andrea Arcangeli
2007-09-16 16:17 ` Randy Dunlap
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=20070917130520.9939ae89.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=andi@firstfloor.org \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=zach@vmware.com \
/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®