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>] [day] [month] [year] [list]
Date:	Tue, 03 Mar 2015 15:27:17 -0800
From:	Dave Hansen <dave.hansen@...el.com>
To:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: x86: MPX and signal handlers

In handle_signal(), while we are setting up to call a signal handler, we do:
              /*
               * Ensure the signal handler starts with the new fpustate.
               */
              if (used_math())
                      drop_init_fpu(current);

Where drop_init_fpu() actually restores us to the 'init' FPU state
where, of course, MPX will be turned off.

I guess userspace can still just re-enable MPX first thing in its signal
handlers if it really cares, but that definitely breaks the idea that
MPX support can be added with a simple recompilation.

The alternative would be to jam the original configuration register
value (BNDCFGU) in to the signal handler's FPU state from inside the
kernel before calling out to the signal handler.

I _think_ we can just leave it alone and document that you don't get MPX
protections by default in signal handlers.  Does anybody disagree?
--
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