When a branch instruction (i.e. call/ret/jmp) triggers a control-protection
fault, si_code is set to SEGV_CPERR.  Add the new si_code to sigaction.2.

Signed-off-by: Yu-cheng Yu <yu-cheng...@intel.com>
Cc: Alejandro Colomar <alx.manpa...@gmail.com>
Cc: Michael Kerrisk <mtk.manpa...@gmail.com>
Cc: Andy Lutomirski <l...@kernel.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Dave Hansen <dave.han...@linux.intel.com>
Cc: Florian Weimer <fwei...@redhat.com>
Cc: "H.J. Lu" <hjl.to...@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@vger.kenel.org
Link: 
https://lore.kernel.org/linux-api/20210217222730.15819-7-yu-cheng...@intel.com/
---
 man2/sigaction.2 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/man2/sigaction.2 b/man2/sigaction.2
index cc183198d..49a30f11e 100644
--- a/man2/sigaction.2
+++ b/man2/sigaction.2
@@ -737,6 +737,9 @@ See
 .BR pkeys (7).
 The protection key which applied to this access is available via
 .IR si_pkey .
+.TP
+.B SEGV_CPERR
+A branch instruction (call, ret, or jmp) triggered a control-protection fault.
 .RE
 .PP
 The following values can be placed in
-- 
2.21.0

Reply via email to