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:	Fri, 12 Aug 2016 15:36:12 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-doc@...r.kernel.org, szabolcs.nagy@....com,
	heiko.carstens@...ibm.com, Yury Norov <ynorov@...iumnetworks.com>,
	Hanjun Guo <guohanjun@...wei.com>,
	philipp.tomsich@...obroma-systems.com, joseph@...esourcery.com,
	linux-arch@...r.kernel.org, Prasun.Kapoor@...iumnetworks.com,
	agraf@...e.de, Andrew Pinski <Andrew.Pinski@...iumnetworks.com>,
	geert@...ux-m68k.org, kilobyte@...band.pl,
	manuel.montezelo@...il.com, pinskia@...il.com,
	linyongting@...wei.com, klimov.linux@...il.com, broonie@...nel.org,
	"Zhangjian (Bamvor)" <bamvor.zhangjian@...wei.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, maxim.kuvyrkov@...aro.org,
	libc-alpha@...rceware.org, Nathan_Lynch@...tor.com,
	linux-kernel@...r.kernel.org, Andrew Pinski <apinski@...ium.com>,
	schwidefsky@...ibm.com, davem@...emloft.net,
	christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH 05/19] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

On Thu, Aug 11, 2016 at 10:29:03PM +0200, Arnd Bergmann wrote:
> On Thursday, August 11, 2016 5:30:03 PM CEST Catalin Marinas wrote:
> > > > > and you can have ARM binaries with
> > > > > PER_LINUX (using the arm64 uname) just like you can have
> > > > > arm64 binaries running with PER_LINUX32.
> > > > 
> > > > I was actually looking to enforce the 32-bit binaries to only see
> > > > PER_LINUX32, though with a risk of breaking the ABI. OTOH, people are
> > > > abusing this and write 32-bit apps relying on the 64-bit /proc/cpuinfo:
> > > > 
> > > > http://lkml.kernel.org/g/1464706504-25224-3-git-send-email-catalin.marinas@arm.com
> > > > 
> > > > (you were summoned on that discussion couple of times ;))
> > > 
> > > Hmm, I thought I saw the thread and didn't have any good idea for
> > > the uname information, but didn't notice it was for /proc/cpuinfo.
> > > 
> > > What's wrong with always showing both the 32-bit and the 64-bit
> > > hwcap strings here (minus the duplicates, which hopefully have
> > > the same meaning here)?
> > 
> > As I said above, some of them have the same name (which may be a good
> > thing at a first look) but we don't have an architecture guarantee that
> > the feature is present in both AArch32 and AArch64 modes (e.g. AES may
> > only be available in AArch64).
> 
> Is this the case on actual implementations that exist today? If they
> are actually always both present, we might be able to get away with it.

It may be fine on current implementations but what would we do when/if
we actually find such discrepancy? It's not just ARM Ltd designing the
chips, so as long as the architecture doesn't mandate it you may find
strange implementations.

Imposing such restriction in the architecture doesn't make sense if the
only reason is the /proc/cpuinfo file (and I can't think of any other
reason why this should be enforced).

What I'm worried about is 32-bit apps running on an arm64 kernel and
making use of the 64-bit /proc/cpuinfo without any guarantee that the
AArch32 state has such features. In my patch proposal linked above I
wanted to always force the compat /proc/cpuinfo for 32-bit tasks.

-- 
Catalin

Powered by blists - more mailing lists