From: ebiederm@xmission.com (Eric W. Biederman)
To: Khalid Aziz <khalid.aziz@oracle.com>
Cc: arnd@arndb.de, hpa@zytor.com, davem@davemloft.net,
dave.hansen@linux.intel.com, tglx@linutronix.de,
mingo@redhat.com, x86@kernel.org, anthony.yznaga@oracle.com,
pombredanne@nexb.com, jroedel@suse.de,
gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
sparclinux@vger.kernel.org, Khalid Aziz <khalid@gonehiking.org>
Subject: Re: [PATCH v12 01/11] signals, sparc: Add signal codes for ADI violations
Date: Wed, 21 Feb 2018 14:58:32 -0600 [thread overview]
Message-ID: <874lmaf4av.fsf@xmission.com> (raw)
In-Reply-To: <b1712b03774934c31afd9e394f07aae51eca74f8.1519227112.git.khalid.aziz@oracle.com> (Khalid Aziz's message of "Wed, 21 Feb 2018 10:15:43 -0700")
Khalid Aziz <khalid.aziz@oracle.com> writes:
> 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>
> ---
> v10:
> - Updated si_code definitions to match other definitions
>
> arch/x86/kernel/signal_compat.c | 2 +-
> 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 ac057f9b0763..41cf5996a2a9 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)
> */
> BUILD_BUG_ON(NSIGILL != 11);
> BUILD_BUG_ON(NSIGFPE != 13);
> - BUILD_BUG_ON(NSIGSEGV != 4);
> + BUILD_BUG_ON(NSIGSEGV != 7);
> BUILD_BUG_ON(NSIGBUS != 5);
> BUILD_BUG_ON(NSIGTRAP != 4);
> BUILD_BUG_ON(NSIGCHLD != 6);
> diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
> index 85dc965afd89..e94f03b3ee6f 100644
> --- a/include/uapi/asm-generic/siginfo.h
> +++ b/include/uapi/asm-generic/siginfo.h
> @@ -246,7 +246,10 @@ typedef struct siginfo {
> #else
> # define SEGV_PKUERR 4 /* failed protection key checks */
> #endif
> -#define NSIGSEGV 4
> +#define SEGV_ACCADI 5 /* ADI not enabled for mapped object */
> +#define SEGV_ADIDERR 6 /* Disrupting MCD error */
> +#define SEGV_ADIPERR 7 /* Precise MCD exception */
> +#define NSIGSEGV 7
>
> /*
> * SIGBUS si_codes
next prev parent reply other threads:[~2018-02-21 20:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 17:15 [PATCH v12 00/11] Application Data Integrity feature introduced by SPARC M7 Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 01/11] signals, sparc: Add signal codes for ADI violations Khalid Aziz
2018-02-21 20:58 ` Eric W. Biederman [this message]
2018-02-21 17:15 ` [PATCH v12 02/11] mm, swap: Add infrastructure for saving page metadata on swap Khalid Aziz
2018-03-05 19:20 ` Dave Hansen
2018-03-05 19:29 ` Khalid Aziz
2018-03-05 19:35 ` Dave Hansen
2018-03-05 20:28 ` Khalid Aziz
2018-03-05 21:04 ` Dave Hansen
2018-03-05 21:14 ` Khalid Aziz
2018-03-06 22:47 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 03/11] sparc64: Add support for ADI register fields, ASIs and traps Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 04/11] sparc64: Add HV fault type handlers for ADI related faults Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 05/11] sparc64: Add handler for "Memory Corruption Detected" trap Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 06/11] sparc64: Add auxiliary vectors to report platform ADI properties Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 07/11] mm: Add address parameter to arch_validate_prot() Khalid Aziz
2018-02-26 5:54 ` Michael Ellerman
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change Khalid Aziz
2018-03-05 19:23 ` Dave Hansen
2018-03-05 20:38 ` Khalid Aziz
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 09/11] mm: Allow arch code to override copy_highpage() Khalid Aziz
2018-03-05 19:24 ` Dave Hansen
2018-03-05 20:42 ` Khalid Aziz
2018-03-05 20:56 ` Dave Hansen
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 10/11] sparc64: Add support for ADI (Application Data Integrity) Khalid Aziz
2018-02-23 2:50 ` kbuild test robot
2018-02-23 18:51 ` Khalid Aziz
2018-02-23 18:57 ` David Miller
2018-02-23 22:11 ` Khalid Aziz
2018-03-05 19:22 ` Dave Hansen
2018-03-05 21:14 ` Khalid Aziz
2018-03-05 21:26 ` Dave Hansen
2018-03-05 21:31 ` Dave Hansen
2018-03-05 22:55 ` Khalid Aziz
2018-03-05 21:26 ` Dave Hansen
2018-03-05 21:37 ` Khalid Aziz
2018-03-05 21:50 ` Dave Hansen
2018-02-21 17:15 ` [PATCH v12 11/11] sparc64: Update signal delivery to use new helper functions Khalid Aziz
2018-02-21 20:59 ` Eric W. Biederman
2018-03-18 15:08 ` [PATCH v12 00/11] Application Data Integrity feature introduced by SPARC M7 David Miller
2018-03-19 15:19 ` Khalid Aziz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lmaf4av.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=anthony.yznaga@oracle.com \
--cc=arnd@arndb.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jroedel@suse.de \
--cc=khalid.aziz@oracle.com \
--cc=khalid@gonehiking.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pombredanne@nexb.com \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).