This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/22396] x86-64: siglongjmp does not restore PKRU register
- From: "dave at sr71 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 09 Nov 2017 22:43:19 +0000
- Subject: [Bug libc/22396] x86-64: siglongjmp does not restore PKRU register
- Auto-submitted: auto-generated
- References: <bug-22396-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22396
Dave Hansen <dave at sr71 dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dave at sr71 dot net
--- Comment #4 from Dave Hansen <dave at sr71 dot net> ---
It should also be noted that this issue also applies to MPX which has a lot
more state than protection keys. (BNDSTATUS (8) + BNDCFGU (8) +
BNDREGS0-3(4*16)). The ABI for BNDREGS probably saves us here at least partly
because it's pretty arguable that the registers are clobber at siglongjmp. But
BNDCFGU which turns the feature on/off is a problem.
Back to PK... The manpage (http://man7.org/linux/man-pages/man7/pkeys.7.html)
could use some additional clarity here, but it does mention the signal
behavior, and also says:
The rights of any interrupted context are
restored when the signal handler returns.
We could clarify that we truly mean sys_sigreturn() and that other mechanisms
don't count as "returning".
The kernel _could_ detect when someone unblocks signals from inside a signal
handler, but without doing a sys_sigreturn(). We could theoretically take some
action there. Does that do us any good?
--
You are receiving this mail because:
You are on the CC list for the bug.