From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, dvlasenk@redhat.com,
mingo@kernel.org, bp@alien8.de, tglx@linutronix.de,
luto@amacapital.net
Subject: [tip:x86/asm] x86/ptrace: Remove checks for TIF_IA32 when changing CS and SS
Date: Wed, 25 Feb 2015 00:27:40 -0800 [thread overview]
Message-ID: <tip-08571f1ae327bfb631cb7171bde5ea605df626c6@git.kernel.org> (raw)
In-Reply-To: <71c7ab36456855d11ae07edd4945a7dfe80f9915.1424822291.git.luto@amacapital.net>
Commit-ID: 08571f1ae327bfb631cb7171bde5ea605df626c6
Gitweb: http://git.kernel.org/tip/08571f1ae327bfb631cb7171bde5ea605df626c6
Author: Andy Lutomirski <luto@amacapital.net>
AuthorDate: Tue, 24 Feb 2015 16:01:38 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 25 Feb 2015 08:27:49 +0100
x86/ptrace: Remove checks for TIF_IA32 when changing CS and SS
The ability for modified CS and/or SS to be useful has nothing
to do with TIF_IA32. Similarly, if there's an exploit involving
changing CS or SS, it's exploitable with or without a TIF_IA32
check.
So just delete the check.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Link: http://lkml.kernel.org/r/71c7ab36456855d11ae07edd4945a7dfe80f9915.1424822291.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/ptrace.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index e510618..1e12581 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -364,18 +364,12 @@ static int set_segment_reg(struct task_struct *task,
case offsetof(struct user_regs_struct,cs):
if (unlikely(value == 0))
return -EIO;
-#ifdef CONFIG_IA32_EMULATION
- if (test_tsk_thread_flag(task, TIF_IA32))
- task_pt_regs(task)->cs = value;
-#endif
+ task_pt_regs(task)->cs = value;
break;
case offsetof(struct user_regs_struct,ss):
if (unlikely(value == 0))
return -EIO;
-#ifdef CONFIG_IA32_EMULATION
- if (test_tsk_thread_flag(task, TIF_IA32))
- task_pt_regs(task)->ss = value;
-#endif
+ task_pt_regs(task)->ss = value;
break;
}
next prev parent reply other threads:[~2015-02-25 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 0:01 [PATCH 0/3] Some TIF_IA32 fixes Andy Lutomirski
2015-02-25 0:01 ` [PATCH 1/3] x86_64, entry: Remove a bogus ret_from_fork optimization Andy Lutomirski
2015-02-25 7:23 ` Ingo Molnar
2015-02-25 0:01 ` [PATCH 2/3] x86_64, ptrace: Remove checks for TIF_IA32 when changing cs and ss Andy Lutomirski
2015-02-25 8:27 ` tip-bot for Andy Lutomirski [this message]
2015-02-25 0:01 ` [PATCH 3/3] x86_64, copy_thread: Fix CLONE_SETTLS bitness Andy Lutomirski
2015-02-25 8:27 ` [tip:x86/asm] x86/ia32-compat: Fix CLONE_SETTLS bitness of copy_thread() tip-bot for Andy Lutomirski
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-08571f1ae327bfb631cb7171bde5ea605df626c6@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--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=mingo@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.