From: tip-bot for Jan Beulich <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: luto@kernel.org, dvlasenk@redhat.com, mingo@kernel.org,
JBeulich@suse.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, peterz@infradead.org,
torvalds@linux-foundation.org, jbeulich@suse.com, hpa@zytor.com,
luto@amacapital.net, brgerst@gmail.com, bp@alien8.de
Subject: [tip:x86/urgent] x86/asm/entry/32: Really make user_mode() work correctly for VM86 mode
Date: Fri, 29 May 2015 00:51:42 -0700 [thread overview]
Message-ID: <tip-7ba554b5ac69e5f3edac9ce3233beb5acd480878@git.kernel.org> (raw)
In-Reply-To: <5566EB0D020000780007E655@mail.emea.novell.com>
Commit-ID: 7ba554b5ac69e5f3edac9ce3233beb5acd480878
Gitweb: http://git.kernel.org/tip/7ba554b5ac69e5f3edac9ce3233beb5acd480878
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Thu, 28 May 2015 09:16:45 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 29 May 2015 09:46:40 +0200
x86/asm/entry/32: Really make user_mode() work correctly for VM86 mode
While commit efa7045103 ("x86/asm/entry: Make user_mode() work
correctly if regs came from VM86 mode") claims that "user_mode()
is now identical to user_mode_vm()", this wasn't actually the
case - no prior commit made it so.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/5566EB0D020000780007E655@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/ptrace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index 19507ff..5fabf13 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -107,7 +107,7 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
static inline int user_mode(struct pt_regs *regs)
{
#ifdef CONFIG_X86_32
- return (regs->cs & SEGMENT_RPL_MASK) == USER_RPL;
+ return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >= USER_RPL;
#else
return !!(regs->cs & 3);
#endif
prev parent reply other threads:[~2015-05-29 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 8:16 [PATCH] ix86: really " Jan Beulich
2015-05-28 17:33 ` Andy Lutomirski
2015-05-29 7:49 ` Ingo Molnar
2015-05-29 7:51 ` tip-bot for Jan Beulich [this message]
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=tip-7ba554b5ac69e5f3edac9ce3233beb5acd480878@git.kernel.org \
--to=tipbot@zytor.com \
--cc=JBeulich@suse.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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®