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]
Message-ID: <CAGa+x85P-M3qUD6L=kezkiQ1NJymEZ9P=u2ANUZJu2b3F+o5LA@mail.gmail.com>
Date:	Wed, 18 Jun 2014 10:55:01 -0700
From:	Kevin Hilman <khilman@...aro.org>
To:	Taras Kondratiuk <taras.kondratiuk@...aro.org>
Cc:	Russell King <linux@....linux.org.uk>,
	Nico Pitre <nico@...xnic.net>,
	Victor Kamensky <victor.kamensky@...aro.org>,
	Linaro Networking <linaro-networking@...aro.org>,
	Ben Dooks <ben.dooks@...ethink.co.uk>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Jason Cooper <jason@...edaemon.net>,
	Olof Johansson <olof@...om.net>
Subject: Re: [PATCH] ARM: zImage: ensure header in LE format for BE8 kernels

On Thu, Apr 10, 2014 at 9:27 AM, Taras Kondratiuk
<taras.kondratiuk@...aro.org> wrote:
> From: Nico Pitre <nico@...xnic.net>
>
> All known BE8-capable systems have LE bootloaders, so we need to ensure
> that the magic number and image start/end values are in little endian
> format.
>
> [ben.dooks@...ethink.co.uk: from nico's original email on this subject]
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> [taras.kondratiuk@...aro.org: removed lds.S->lds rule, added target to extra-y]
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@...aro.org>

This patch has now hit -next (as of next-20140618) and I noticed all
my big-endian boot tests failed[1].  Turns out they failed because I'm
deciding whether to pass a big-endian or little-endian initramfs based
on the magic number of the zImage.  Since it's now always little
endian, even the big-endian kernels were boot tested with a little
endian initramfs.  And guess what.... they failed.

I like this patch for several reasons, including the fact that
u-boot's bootz support checks the magic number and failed before this
patch.

All of that to say, with this patch applied, I need a new (and
reliable) way to determine the endianness of a kernel just by looking
at the zImage.  Recommendations welcome.

Thanks,

Kevin

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2014-June/004059.html
--
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