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]
Message-ID: <20061110005051.GB4107@verge.net.au>
Date:	Fri, 10 Nov 2006 09:50:52 +0900
From:	Horms <horms@...ge.net.au>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Magnus Damm <magnus@...inux.co.jp>, linux-kernel@...r.kernel.org,
	Vivek Goyal <vgoyal@...ibm.com>, Andi Kleen <ak@....de>,
	magnus.damm@...il.com, fastboot@...ts.osdl.org,
	Dave Anderson <anderson@...hat.com>
Subject: Re: [PATCH 02/02] Elf: Align elf notes properly

On Thu, Nov 09, 2006 at 07:00:22AM -0700, Eric W. Biederman wrote:
> Magnus Damm <magnus@...inux.co.jp> writes:
> 
> > elf: Align elf notes properly
> >
> > The kernel currently contains several elf note aligment implementations. Most
> > implementations follow the spec on 32-bit platforms, but none current aligns
> > the notes correctly on 64-bit platforms. This patch tries to fix this by
> > interpreting the 64-bit and 32-bit elf specs as the following:
> >
> > offset bytes name
> > 0      4     n_namesz -+                  -+
> > 4      4     n_descsz  | elf note header   |
> > 8      4     n_type   -+                   | elf note entry size - N4
> > 12     N1    name                          |
> > N2     N3    desc                         -+
> >
> > WS = word size in bytes (4 for 32 bit, 8 for 64 bit)
> > N1 = roundup(n_namesz + sizeof(elf note header), WS) - sizeof(elf note header)
> > N2 = sizeof(elf note header) + N1
> > N3 = roundup(n_descsz, WS)
> > N4 = sizeof(elf note header) + N1 + N2
> >
> > The elf note header contains three 32-bit values on 32-bit and 64-bit systems. 
> > The header is followed by name and desc data together with padding. The 
> > alignment and padding varies depending on the word size.
> 
> I see your point and I disagree.  The notes in a kernel generated 
> core dump do not vary in size.  Find me some implementation evidence that
> anyone ever added the extra 4 bytes of alignment to the description and the
> padding fields and I will be ready to consider this.  Currently this
> just appears to be reading a draft spec that doesn't match reality.

Or perhaps a spec that hasn't been implemented correctly.
I guess that the real question is, what padding is correct?

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

-
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