From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: [PATCH 12/22] arm64: mte: Add specific SIGSEGV codes Date: Wed, 11 Dec 2019 18:40:17 +0000 Message-ID: <20191211184027.20130-13-catalin.marinas@arm.com> References: <20191211184027.20130-1-catalin.marinas@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191211184027.20130-1-catalin.marinas@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: linux-arm-kernel@lists.infradead.org Cc: linux-arch@vger.kernel.org, Richard Earnshaw , Arnd Bergmann , Szabolcs Nagy , Marc Zyngier , Kevin Brodsky , linux-mm@kvack.org, Andrey Konovalov , Vincenzo Frascino , Will Deacon List-Id: linux-arch.vger.kernel.org From: Vincenzo Frascino Add MTE-specific SIGSEGV codes to siginfo.h. Note that the for MTE we are reusing the same SPARC ADI codes because the two functionalities are similar and they cannot coexist on the same system. Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino [catalin.marinas@arm.com: renamed precise/imprecise to sync/async] Signed-off-by: Catalin Marinas --- include/uapi/asm-generic/siginfo.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index cb3d6c267181..a5184a5438c6 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -227,8 +227,13 @@ typedef struct siginfo { # define SEGV_PKUERR 4 /* failed protection key checks */ #endif #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ -#define SEGV_ADIDERR 6 /* Disrupting MCD error */ -#define SEGV_ADIPERR 7 /* Precise MCD exception */ +#ifdef __aarch64__ +# define SEGV_MTEAERR 6 /* Asynchronous MTE error */ +# define SEGV_MTESERR 7 /* Synchronous MTE exception */ +#else +# define SEGV_ADIDERR 6 /* Disrupting MCD error */ +# define SEGV_ADIPERR 7 /* Precise MCD exception */ +#endif #define NSIGSEGV 7 /* From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.110.172]:43152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729879AbfLKSk6 (ORCPT ); Wed, 11 Dec 2019 13:40:58 -0500 From: Catalin Marinas Subject: [PATCH 12/22] arm64: mte: Add specific SIGSEGV codes Date: Wed, 11 Dec 2019 18:40:17 +0000 Message-ID: <20191211184027.20130-13-catalin.marinas@arm.com> In-Reply-To: <20191211184027.20130-1-catalin.marinas@arm.com> References: <20191211184027.20130-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Marc Zyngier , Vincenzo Frascino , Szabolcs Nagy , Richard Earnshaw , Kevin Brodsky , Andrey Konovalov , linux-mm@kvack.org, linux-arch@vger.kernel.org, Arnd Bergmann Message-ID: <20191211184017.30QaEnVzFbVbUE0Sgsr0hm8BsENPEo45eSn9bo1coyE@z> From: Vincenzo Frascino Add MTE-specific SIGSEGV codes to siginfo.h. Note that the for MTE we are reusing the same SPARC ADI codes because the two functionalities are similar and they cannot coexist on the same system. Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino [catalin.marinas@arm.com: renamed precise/imprecise to sync/async] Signed-off-by: Catalin Marinas --- include/uapi/asm-generic/siginfo.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index cb3d6c267181..a5184a5438c6 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -227,8 +227,13 @@ typedef struct siginfo { # define SEGV_PKUERR 4 /* failed protection key checks */ #endif #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ -#define SEGV_ADIDERR 6 /* Disrupting MCD error */ -#define SEGV_ADIPERR 7 /* Precise MCD exception */ +#ifdef __aarch64__ +# define SEGV_MTEAERR 6 /* Asynchronous MTE error */ +# define SEGV_MTESERR 7 /* Synchronous MTE exception */ +#else +# define SEGV_ADIDERR 6 /* Disrupting MCD error */ +# define SEGV_ADIPERR 7 /* Precise MCD exception */ +#endif #define NSIGSEGV 7 /*