From: Ralf Baechle <ralf@linux-mips.org>
To: Ed Martini <martini@c2micro.com>
Cc: linux-mips@linux-mips.org
Subject: Re: initrd problem
Date: Wed, 16 Mar 2005 12:06:47 +0000 [thread overview]
Message-ID: <20050316120647.GB8563@linux-mips.org> (raw)
In-Reply-To: <423763B9.2000907@c2micro.com>
On Tue, Mar 15, 2005 at 02:37:45PM -0800, Ed Martini wrote:
> Ok. Then let's get rid of it completly, and provide a replacement that
> works.
Way to go.
> There were vestiges of embedded initrd in the ld script that were
> confusing when trying to sort things out. That, in conjunction with
> Documentation/initrd.txt made it hard to discover early user space and
> initramfs when coming from the old world (2.4).
Correct and I've applied that part of your patch already while thinking
about the problem you describe below.
> Also, unless you move the location of .init.ramfs, it gets freed twice,
> leading to a panic.
Interesting one. When I tested the code recently it did work for me and
it shouldn't have changed since. The way this is supposed to work is
by setting the page_count to 1 by using set_page_count and unmarking the
page as reserved, so after that point a free_page should actually succeed -
even if done twice as you've observed, first in populate_rootfs then
once more in free_initmem.
It seems a frighteningly bad idea though since it relies on no memory
from the initrd range being allocated between the two calls - or it would
end being freed by force, in use or not. On startup Linux tends to
allocate memory starting from high address towards low addresses which
must be why we usually get away with this one.
> From the documentation alone it's impossible to figure out how to build
> your initramfs. In various places the docs refer to the initial
> executable as /linuxrc, /kinit, /init, and possibly others. If you read
> init/main.c you see that for an initramfs, your initial process will be
> started from /init.
I guess I read the code so I didn't notice the lacking qualities of the
documentation ...
Ralf
next prev parent reply other threads:[~2005-03-16 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-10 23:42 initrd problem Ed Martini
2005-03-11 0:41 ` Kumba
2005-03-14 11:01 ` Ralf Baechle
2005-03-15 22:37 ` Ed Martini
2005-03-16 12:06 ` Ralf Baechle [this message]
2005-03-17 0:23 ` initrd/initramfs problem Ed Martini
2005-03-25 19:24 ` Observations on LLSC and SMP Ed Martini
2005-03-25 19:37 ` Daniel Jacobowitz
2005-03-25 22:46 ` Ed Martini
2005-03-25 22:53 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2005-04-15 6:31 initrd problem colin
2005-04-15 6:31 ` colin
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=20050316120647.GB8563@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=martini@c2micro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox