diff options
| author | Dave Hansen <dave.hansen@linux.intel.com> | 2016-10-17 15:07:12 -0700 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-10-18 07:58:52 +0200 |
| commit | c92965c2be8cf05815fbc4351e29b15731bfeb7b (patch) | |
| tree | cfe9e4df9dc506548cf33ec02c8b02a5e809caad | |
| parent | 3e712e2a674aa5017a015a89f237595ace3d3611 (diff) | |
| download | man-pages-c92965c2be8cf05815fbc4351e29b15731bfeb7b.tar.gz | |
pkey.7: Add description of signal handling behavior
The signal behavior of pkeys is special compared to many other
processor and OS features. Add a special section to describe
the behavior.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
| -rw-r--r-- | man7/pkeys.7 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/man7/pkeys.7 b/man7/pkeys.7 index 22370a6a46..39e44fc250 100644 --- a/man7/pkeys.7 +++ b/man7/pkeys.7 @@ -135,6 +135,22 @@ appropriate for child threads at the time when .BR clone (2) is called, or ensure that each child thread can perform its own initialization of protection key rights. + +.SS Signal Handler Behavior +Each time a signal handler is invoked (including nested signals), the +thread is temporarily given a new, default set of protection key rights +that override the rights from the interrupted context. +This means that applications must re-establish their desired protection +key rights upon entering a signal handler if the desired rights differ +from the defaults. +The rights of any interrupted context are restored when the signal +handler returns. + +This signal behavior is unusual and is due to the fact that the x86 PKRU +register (which stores protection key access rights) is managed with the +same hardware mechanism (XSAVE) that manages floating-point registers. +The signal behavior is the same as that of floating point registers. + .SS Protection Keys system calls The Linux kernel implements the following pkey-related system calls: .BR pkey_mprotect (2), |
