diff options
author | Khalid Aziz <khalid.aziz@oracle.com> | 2018-02-21 12:15:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-18 10:38:45 -0400 |
commit | d84bb709aa4a6a155b1aaaf449cad21f02be4594 (patch) | |
tree | 15c882c521fc6b505ba576914ee626f5f09ffa6d | |
parent | 8f5fd927c3a7576d57248a2d7a0861c3f2795973 (diff) |
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 tag and caused
a precise exception.
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/x86/kernel/signal_compat.c | 2 | ||||
-rw-r--r-- | include/uapi/asm-generic/siginfo.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c index 0d930d8987cc..838a4dc90a6d 100644 --- a/arch/x86/kernel/signal_compat.c +++ b/arch/x86/kernel/signal_compat.c | |||
@@ -27,7 +27,7 @@ static inline void signal_compat_build_tests(void) | |||
27 | */ | 27 | */ |
28 | BUILD_BUG_ON(NSIGILL != 11); | 28 | BUILD_BUG_ON(NSIGILL != 11); |
29 | BUILD_BUG_ON(NSIGFPE != 13); | 29 | BUILD_BUG_ON(NSIGFPE != 13); |
30 | BUILD_BUG_ON(NSIGSEGV != 4); | 30 | BUILD_BUG_ON(NSIGSEGV != 7); |
31 | BUILD_BUG_ON(NSIGBUS != 5); | 31 | BUILD_BUG_ON(NSIGBUS != 5); |
32 | BUILD_BUG_ON(NSIGTRAP != 4); | 32 | BUILD_BUG_ON(NSIGTRAP != 4); |
33 | BUILD_BUG_ON(NSIGCHLD != 6); | 33 | BUILD_BUG_ON(NSIGCHLD != 6); |
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index 99c902e460c2..a01fd0a92b1b 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h | |||
@@ -246,7 +246,10 @@ typedef struct siginfo { | |||
246 | #else | 246 | #else |
247 | # define SEGV_PKUERR 4 /* failed protection key checks */ | 247 | # define SEGV_PKUERR 4 /* failed protection key checks */ |
248 | #endif | 248 | #endif |
249 | #define NSIGSEGV 4 | 249 | #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ |
250 | #define SEGV_ADIDERR 6 /* Disrupting MCD error */ | ||
251 | #define SEGV_ADIPERR 7 /* Precise MCD exception */ | ||
252 | #define NSIGSEGV 7 | ||
250 | 253 | ||
251 | /* | 254 | /* |
252 | * SIGBUS si_codes | 255 | * SIGBUS si_codes |