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, 25 Aug 2010 21:56:39 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Hendrik Brueckner <brueckner@...ux.vnet.ibm.com>,
	Michael Holzheu <holzheu@...ux.vnet.ibm.com>,
	tabbott@...lice.com, vda.linux@...glemail.com, mmarek@...e.cz,
	hpa@...ux.intel.com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, heiko.carstens@...ibm.com,
	schwidefsky@...ibm.com
Subject: Re: [PATCH] Fix initramfs size calculation

On Wed, Aug 25, 2010 at 09:15:32PM +0200, Hendrik Brueckner wrote:
> Sam,
> 
> I have work together with Michael on this patch... see my comments below
> 
> On Wed, Aug 25, 2010 at 08:06:01PM +0200, Sam Ravnborg wrote:
> > On Wed, Aug 25, 2010 at 05:57:12PM +0200, Michael Holzheu wrote:
> > 
> > Another way to fix this could be to align . to an even
> > address like this:
> > > #define INIT_RAM_FS                                                     \
> > >         . = ALIGN(PAGE_SIZE);                                           \
> > >         VMLINUX_SYMBOL(__initramfs_start) = .;                          \
> > >         *(.init.ramfs)                                                  \
> >           . = ALIGN(32);                                                  \
> > >         VMLINUX_SYMBOL(__initramfs_end) = .;
> > > 
> > 
> > 32 was selected as this is what we will introduce as the default
> > alignment in linker scripts anyway.
> >
> > This I guess is a problem we have had some time and a minimal fix is
> > easier to have backported by the stable team.
> 
> The first thought was similar but using ALIGN(2).  However, the current
> implementation of populate_rootfs() passes the calculated size to the
> decompress functions.  If __initramfs_end is aligned, the resulting size
> might be greater than the real size of the initramfs.
> So I guess this might also cause problems.
Another variant could be to explicit add alignment in the .S files
so the section is always aligned to a even byte boundary (or maybe 32 byte boundary).

That should also cover the above case.

	Sam
--
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