lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1339722435.3475.57.camel@sbsiddha-desk.sc.intel.com>
Date:	Thu, 14 Jun 2012 18:07:15 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Hans Rosenfeld <hans.rosenfeld@....com>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>, tglx@...utronix.de,
	robert.richter@....com, andreas.herrmann3@....com
Subject: Re: [RFC] x86, fpu: unify signal handling code paths for x86 and
 x86_64 kernels

On Thu, 2012-06-14 at 17:16 -0700, H. Peter Anvin wrote:
> On 06/14/2012 05:10 PM, Suresh Siddha wrote:
> > 
> > My personal preference is to use TIF_IA32 check and avoid  the usage of
> > is_ia32_task() in the signal delivery paths.
> 
> That is the quick fix, but...
> 
> > Signal return goes through a system call which already sets the
> > TS_COMPAT. It is the signal delivery that is causing the asymmetry.
> 
> Yes, and I think you missed some aspects of my statement: the notion
> would be that TS_COMPAT would be set from the TIF_IA32 flag at the time
> we decide to deliver a signal, the signal being a pseudo-system-call.
> However, the more I wonder about if that will confuse the crap out of
> ptrace, so using TIF_IA32 might just be the best thing anyway.
> 

Ok. Fix for the existing mainline code appended. Can you queue this
separately?
---
From: Suresh Siddha <suresh.b.siddha@...el.com>
Subject: x86, compat: use test_thread_flag(TIF_IA32) in compat signal delivery

Signal delivery compat path may not have the 'TS_COMPAT' flag set. So use
test_thread_flag(TIF_IA32) instead of is_ia32_task().

Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: stable@...nel.org	# v3.4
---
 arch/x86/ia32/ia32_signal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index daeca56..673ac9b 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -38,7 +38,7 @@
 int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
 {
 	int err = 0;
-	bool ia32 = is_ia32_task();
+	bool ia32 = test_thread_flag(TIF_IA32);
 
 	if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ