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:	Wed, 13 Jan 2016 00:05:28 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Yury Norov <ynorov@...iumnetworks.com>
Cc:	catalin.marinas@....com, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, pinskia@...il.com,
	Prasun.Kapoor@...iumnetworks.com, schwab@...e.de,
	Nathan_Lynch@...tor.com, agraf@...e.de, klimov.linux@...il.com,
	broonie@...nel.org, jan.dakinevich@...il.com,
	ddaney.cavm@...il.com, bamvor.zhangjian@...wei.com,
	philipp.tomsich@...obroma-systems.com, joseph@...esourcery.com,
	christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH v6 11/21] arm64: ilp32: introduce binfmt_ilp32.c

On Tuesday 12 January 2016 19:46:41 Yury Norov wrote:
> On Fri, Jan 08, 2016 at 10:08:44AM +0100, Arnd Bergmann wrote:
> > On Friday 08 January 2016 02:34:29 Yury Norov wrote:
> > > +
> > > +#include "../../../fs/compat_binfmt_elf.c"
> > > 
> > 
> > This is the wrong file, you have to include fs/binfmt_elf.c, otherwise
> > you pick up the same definitions that you have for the other one.
> > 
> 
> I chose compat as it's how it wokrs now. It redefines some types like
> user_long_t, and I think it's neccessary for ILP32, as for aarch32.

I really think the double indirection adds way too much complexity
here, it makes it rather hard to understand what is going on, and
that leads to bugs.

fs/compat_binfmt_elf.c is not doing much at all, and most of it is not
actually needed if you just make a copy of that file and fill in the
data as needed. Some of the overrides (ELF_ARCH, ELF_PLATFORM, ELF_NREG,
ELF_HWCAP, ELF_HWCAP2) are identical between ilp32 and lp64 modes
for arm64, but are different for arm32 compat, so you don't even have
to override them at all.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ