lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Nov 2015 02:30:36 +0300
From:	Yury Norov <ynorov@...iumnetworks.com>
To:	<catalin.marinas@....com>, <arnd@...db.de>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
CC:	<pinskia@...il.com>, <ddaney.cavm@...il.com>,
	<jan.dakinevich@...il.com>, <Prasun.Kapoor@...iumnetworks.com>,
	<christoph.muellner@...obroma-systems.com>,
	<philipp.tomsich@...obroma-systems.com>, <broonie@...nel.org>,
	<andrey.konovalov@...aro.org>, <Nathan_Lynch@...tor.com>,
	<agraf@...e.de>, <bamvor.zhangjian@...wei.com>,
	<klimov.linux@...il.com>, Andrew Pinski <apinski@...ium.com>,
	Yury Norov <ynorov@...iumnetworks.com>,
	Andrew Pinski <Andrew.Pinski@...iumnetworks.com>
Subject: [PATCH v6 07/17] arm64:ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

From: Andrew Pinski <apinski@...ium.com>

Signed-off-by: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@...obroma-systems.com>
Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
Signed-off-by: Andrew Pinski <Andrew.Pinski@...iumnetworks.com>
Reviewed-by: David Daney <david.daney@...ium.com>
---
 arch/arm64/include/asm/compat.h      | 38 +++++++++++++++++++++++++++++++++++-
 arch/arm64/include/asm/thread_info.h |  1 +
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index 9700e5e..95d2d72 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -324,9 +324,35 @@ static inline int is_a32_compat_thread(struct thread_info *thread)
 }
 #endif
 
+#ifdef CONFIG_ARM64_ILP32
+
+static inline int is_ilp32_compat_task(void)
+{
+	return test_thread_flag(TIF_32BIT_AARCH64);
+}
+
+static inline int is_ilp32_compat_thread(struct thread_info *thread)
+{
+	return test_ti_thread_flag(thread, TIF_32BIT_AARCH64);
+}
+
+#else
+
+static inline int is_ilp32_compat_task(void)
+{
+	return 0;
+}
+
+static inline int is_ilp32_compat_thread(struct thread_info *thread)
+{
+	return 0;
+}
+
+#endif
+
 static inline int is_compat_task(void)
 {
-	return is_a32_compat_task();
+	return is_a32_compat_task() || is_ilp32_compat_task();
 }
 
 #else /* !CONFIG_COMPAT */
@@ -341,6 +367,16 @@ static inline int is_a32_compat_task(void)
 	return 0;
 }
 
+static inline int is_ilp32_compat_thread(struct thread_info *thread)
+{
+	return 0;
+}
+
+static inline int is_ilp32_compat_task(void)
+{
+	return 0;
+}
+
 #endif /* CONFIG_COMPAT */
 #endif /* __KERNEL__ */
 #endif /* __ASM_COMPAT_H */
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 7d03565..e72de74 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -112,6 +112,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_SINGLESTEP		21
 #define TIF_32BIT		22	/* AARCH32 process */
 #define TIF_SWITCH_MM		23	/* deferred switch_mm */
+#define TIF_32BIT_AARCH64	24	/* 32 bit process on AArch64(ILP32) */
 
 #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ