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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Jun 2017 18:49:50 +0300
From:   Yury Norov <ynorov@...iumnetworks.com>
To:     Catalin Marinas <catalin.marinas@....com>,
        Arnd Bergmann <arnd@...db.de>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org
Cc:     Yury Norov <ynorov@...iumnetworks.com>,
        Adam Borowski <kilobyte@...band.pl>,
        Andreas Schwab <schwab@...e.de>,
        Andrew Pinski <pinskia@...il.com>,
        Bamvor Zhangjian <bamvor.zhangjian@...wei.com>,
        Chris Metcalf <cmetcalf@...hip.com>,
        Chris Metcalf <cmetcalf@...lanox.com>,
        Florian Weimer <fweimer@...hat.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        James Hogan <james.hogan@...tec.com>,
        James Morse <james.morse@....com>,
        Joseph Myers <joseph@...esourcery.com>,
        Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
        Nathan_Lynch@...tor.com, Prasun.Kapoor@...iumnetworks.com,
        Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
        Steve Ellcey <sellcey@...iumnetworks.com>,
        Alexander Graf <agraf@...e.de>,
        Mark Brown <broonie@...nel.org>,
        christoph.muellner@...obroma-systems.com, davem@...emloft.net,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Alexey Klimov <klimov.linux@...il.com>, linyongting@...wei.com,
        manuel.montezelo@...il.com, philipp.tomsich@...obroma-systems.com,
        schwidefsky@...ibm.com, szabolcs.nagy@....com,
        zhouchengming1@...wei.com, Andrew Pinski <apinski@...ium.com>
Subject: [PATCH 07/20] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64

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

Define __BITS_PER_LONG depending on the ABI used (i.e. check whether
__ILP32__ or __LP64__ is defined).  This is necessary for glibc to
determine the appropriate type definitions for the system call interface.

Signed-off-by: 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>
Reviewed-by: David Daney <ddaney@...iumnetworks.com>
---
 arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h
index fce9c2924fa3..4265243e326f 100644
--- a/arch/arm64/include/uapi/asm/bitsperlong.h
+++ b/arch/arm64/include/uapi/asm/bitsperlong.h
@@ -16,7 +16,14 @@
 #ifndef __ASM_BITSPERLONG_H
 #define __ASM_BITSPERLONG_H
 
-#define __BITS_PER_LONG 64
+#if defined(__LP64__)
+/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */
+#  define __BITS_PER_LONG 64
+#elif defined(__ILP32__)
+#  define __BITS_PER_LONG 32
+#else
+#  error "Neither LP64 nor ILP32: unsupported ABI in asm/bitsperlong.h"
+#endif
 
 #include <asm-generic/bitsperlong.h>
 
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ