public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@bergmann-dalldorf.de>
To: Greg KH <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: klibc update
Date: Thu, 06 Feb 2003 02:45:24 +0100	[thread overview]
Message-ID: <200302060204.DAA24234@post.webmailer.de> (raw)
In-Reply-To: 20030205053013$7d61@gated-at.bofh.it

Greg KH wrote:

> Any help with trying to debug init/initramfs.c to figure out what is
> going wrong would be greatly appreciated.

I've managed to mount the initramfs with MS_BIND into my root fs and
found why /sbin/hotplug cannot be run currently. There is some 
off-by-one bug during file extraction that causes the first byte 
of the file to get left out. I.e. the file starts with "ELF\001"
instead of "\577ELF".

This may or may not be related to another off-by-one bug that I'm
seeing sometime when unpacking initramfs on s390x ("panic: length 
error").

The patch below is how I hacked prepare_namespace() to keep 
initramfs visible after boot.

        Arnd <><

--- 1.33/init/do_mounts.c       Sun Jan  5 16:28:41 2003
+++ edited/init/do_mounts.c     Thu Feb  6 01:12:29 2003
@@ -892,6 +892,7 @@
        mount_root();
 out:
        sys_umount("/dev", 0);
+       sys_mount("/", "./initrd", NULL, MS_BIND, NULL);
        sys_mount(".", "/", NULL, MS_MOVE, NULL);
        sys_chroot(".");
        security_sb_post_mountroot();
--- 1.33/fs/namespace.c Thu Nov 28 00:11:14 2002
+++ edited/fs/namespace.c       Thu Feb  6 01:59:20 2003
@@ -460,7 +460,7 @@
 {
        int err;
        if (mnt->mnt_sb->s_flags & MS_NOUSER)
-               return -EINVAL;
+               ; // return -EINVAL;
 
        if (S_ISDIR(nd->dentry->d_inode->i_mode) !=
              S_ISDIR(mnt->mnt_root->d_inode->i_mode))


       reply	other threads:[~2003-02-06  1:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030205053013$7d61@gated-at.bofh.it>
2003-02-06  1:45 ` Arnd Bergmann [this message]
2003-02-06 12:07 klibc update Arnd Bergmann
2003-02-07  5:00 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-02-05  5:23 Greg KH
2003-02-05 22:57 ` H. Peter Anvin

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=200302060204.DAA24234@post.webmailer.de \
    --to=arnd@bergmann-dalldorf.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox