From: "H. Peter Anvin" <hpa@zytor.com>
To: Randy Robertson <rmrobert@vmware.com>
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] initramfs: Fix initramfs to work with hardlinked init
Date: Mon, 06 Apr 2009 17:02:08 -0700 [thread overview]
Message-ID: <49DA9800.2090905@zytor.com> (raw)
In-Reply-To: <20090406192238.GA6621@vmware.com>
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@vmware.com>
> Acked-by: David Howells <dhowells@redhat.com>
Looks right to me.
Acked-by: H. Peter Anvin <hpa@zytor.com>
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-04-07 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 19:22 [PATCH] initramfs: Fix initramfs to work with hardlinked init Randy Robertson
2009-04-07 0:02 ` H. Peter Anvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-06 3:44 Randy Robertson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49DA9800.2090905@zytor.com \
--to=hpa@zytor.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmrobert@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.