From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Tue, 21 Aug 2012 17:06:53 +0100 Subject: [PATCH v2 16/31] arm64: ELF definitions In-Reply-To: <201208161237.53594.arnd@arndb.de> References: <1344966752-16102-1-git-send-email-catalin.marinas@arm.com> <201208151415.39570.arnd@arndb.de> <20120816102300.GG31784@mudshark.cambridge.arm.com> <201208161237.53594.arnd@arndb.de> Message-ID: <20120821160653.GH12708@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Aug 16, 2012 at 01:37:53PM +0100, Arnd Bergmann wrote: > On Thursday 16 August 2012, Will Deacon wrote: > > > This looks wrong: PER_LINUX/PER_LINUX32 decides over the output of the > > > uname system call, while TIF_32BIT decides over the instruction set > > > when returning to user space. You definitely should not set the personality > > > to the value you pass from the elf loader. Instead, just do > > > > > > #define SET_PERSONALITY(ex) clear_thread_flag(TIF_32BIT); > > > #defined COMPAT_SET_PERSONALITY(ex) set_thread_flag(TIF_32BIT); > > > > In this case, won't uname be incorrect (aarch64l) for aarch32 tasks (which > > expect something like armv8l)? > > No, the uname output is meant to tell you about the system, not the > instruction set that you are using (you already know that in compiled > code). OK, so we assumed that compat tasks should get a uname as close as possible to a 32-bit system, i.e. armv8l, for full compatibility. This would allow us to run something like 32-bit Debian on an AArch64 kernel without worrying about any scripts failing. But I can see on x86 that it always reports x86_64 even if the task is x86_32. -- Catalin