From: Khalid Aziz Date: Thu, 5 Jan 2017 18:46:54 +0000 (-0700) Subject: signals, sparc: Add signal codes for ADI violations X-Git-Tag: v4.1.12-92~1^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=72ac0349d40de15fb1d443a52cd354e9ec6c2380;p=users%2Fjedix%2Flinux-maple.git signals, sparc: Add signal codes for ADI violations SPARC M7 processor introduces a new feature - Application Data Integrity (ADI). ADI allows MMU to catch rogue accesses to memory. When a rogue access occurs, MMU blocks the access and raises an exception. In response to the exception, kernel sends the offending task a SIGSEGV with si_code that indicates the nature of exception. This patch adds three new signal codes specific to ADI feature: 1. ADI is not enabled for the address and task attempted to access memory using ADI 2. Task attempted to access memory using wrong ADI tag and caused a deferred exception. 3. Task attempted to access memory using wrong ADI Ttag and caused a precise exception. This is a backport of patch sent upstream and brings UEK code closer to upstream patch v6. Orabug: 22713162 Signed-off-by: Khalid Aziz Cc: Khalid Aziz --- diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index 1e3552037a5a..24032974961f 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -206,7 +206,11 @@ typedef struct siginfo { #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ #define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */ -#define NSIGSEGV 3 +#define SEGV_PKUERR (__SI_FAULT|4) /* failed protection key checks */ +#define SEGV_ACCADI (__SI_FAULT|5) /* ADI not enabled for mapped object */ +#define SEGV_ADIDERR (__SI_FAULT|6) /* Disrupting MCD error */ +#define SEGV_ADIPERR (__SI_FAULT|7) /* Precise MCD exception */ +#define NSIGSEGV 7 /* * SIGBUS si_codes