[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190108211840.GA13838@yury-thinkpad>
Date: Tue, 8 Jan 2019 21:18:56 +0000
From: Yuri Norov <ynorov@...vell.com>
To: Catalin Marinas <catalin.marinas@....com>,
Arnd Bergmann <arnd@...db.de>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
Adam Borowski <kilobyte@...band.pl>,
"Alexander Graf" <agraf@...e.de>,
Alexey Klimov <klimov.linux@...il.com>,
Andreas Schwab <schwab@...e.de>,
Andrew Pinski <pinskia@...il.com>,
Bamvor Zhangjian <bamv2005@...il.com>,
Chris Metcalf <cmetcalf@...lanox.com>,
"Christoph Muellner" <christoph.muellner@...obroma-systems.com>,
Dave Martin <Dave.Martin@....com>,
"David S . Miller" <davem@...emloft.net>,
"Florian Weimer" <fweimer@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"Heiko Carstens" <heiko.carstens@...ibm.com>,
James Hogan <james.hogan@...tec.com>,
James Morse <james.morse@....com>,
Joseph Myers <joseph@...esourcery.com>,
Lin Yongting <linyongting@...wei.com>,
Manuel Montezelo <manuel.montezelo@...il.com>,
Mark Brown <broonie@...nel.org>,
"Martin Schwidefsky" <schwidefsky@...ibm.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
Nathan_Lynch <Nathan_Lynch@...tor.com>,
"Philipp Tomsich" <philipp.tomsich@...obroma-systems.com>,
Prasun Kapoor <Prasun.Kapoor@...iumnetworks.com>,
Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
Steve Ellcey <sellcey@...iumnetworks.com>,
Szabolcs Nagy <szabolcs.nagy@....com>,
"yury.norov@...il.com" <yury.norov@...il.com>
CC: Andy Lutomirski <luto@...capital.net>
Subject: [PATCH] arm64: introduce AUDIT_ARCH_AARCH64ILP32 for ilp32
Make syscall_get_arch() distinguish arm64 and arm64/ilp32 by adding
AUDIT_ARCH_AARCH64ILP32.
Sugested-by: Andy Lutomirski <luto@...capital.net>
Signed-off-by: Yury Norov <ynorov@...vell.com>
---
arch/arm64/include/asm/syscall.h | 3 +++
include/uapi/linux/audit.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h
index 73fbe08763b0..77578d703cb1 100644
--- a/arch/arm64/include/asm/syscall.h
+++ b/arch/arm64/include/asm/syscall.h
@@ -126,6 +126,9 @@ static inline int syscall_get_arch(void)
if (is_a32_compat_task())
return AUDIT_ARCH_ARM;
+ if (is_ilp32_compat_task())
+ return AUDIT_ARCH_AARCH64ILP32;
+
return AUDIT_ARCH_AARCH64;
}
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 818ae690ab79..624127147404 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -374,6 +374,7 @@ enum {
#define __AUDIT_ARCH_LE 0x40000000
#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_AARCH64ILP32 (EM_AARCH64|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARMEB (EM_ARM)
--
2.17.1
Powered by blists - more mailing lists