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
| ||
|
Date: Mon, 06 Apr 2009 17:02:08 -0700 From: "H. Peter Anvin" <hpa@...or.com> To: Randy Robertson <rmrobert@...are.com> CC: linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com> Subject: Re: [PATCH] initramfs: Fix initramfs to work with hardlinked init Randy Robertson wrote: > Change cb6ff208076b5f434db1b8c983429269d719cef5 seems to have broken > booting from initramfs with /sbin/init being a hardlink. It seems like > the logic required for XIP on nommu, i.e. ftruncate to reported cpio > header file size (body_len) is broken for hardlinks, which have > a reported size of 0, and the truncate thus nukes the contents of the > file (in my case busybox), making boot impossible and ending with runaway > loop modprobe binfmt-0000 - and of course 0000 is not a valid binary format. > > My fix is to only call ftruncate if size is non-zero which fixes things > for me, but I'm not certain whether this will break XIP for those files > on nommu systems, although I would guess not. > > This update adds David's ack and fixes whitespace. > > Signed-off-by: Randy Robertson <rmrobert@...are.com> > Acked-by: David Howells <dhowells@...hat.com> Looks right to me. Acked-by: H. Peter Anvin <hpa@...or.com> -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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