Re: acpi dsts loading and populate_rootfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Hellwig
Date: Monday, February 11, 2008 - 10:37 pm

[skipping the populate_rootfs discussion as it seems you have a better
 handle on that than me]

On Sun, Feb 10, 2008 at 12:58:09PM +0100, Eric Piel wrote:

Sorry, I misparsed the comment.  I took it for the usual I'm too lazy
to put something that could load firmware into initramfs excuse.

But thinking about it is there a reason acpi initialization needs to
happen so early that we can't even have userspace in initramfs running?

But if we can't use real userspace this could should at least be written
like the pseudo-userspace in init/do_mounts*.c, using the sys_ syscall
implementations.

As an additional comment the stat + open approach is racy and not a good
idea.  Please just open the file using sys_open, it will tell you
if the file doesn't exist and then use fstat on it to find the
length.  It would also be useful if this kind of code is not hidden
inside acpi but rather done somewhere close to the early init code
because that's where people would expect this kind of nastiness._
syscall
implementations.

As an additional comment the stat + open approach is racy and not a good
idea.  Please just open the file using sys_open, it will tell you
if the file doesn't exist and then use fstat on it to find the
length.  It would also be useful if this kind of code is not hidden
inside acpi but rather done somewhere close to the early init code
because that's where people would expect this kind of nastiness.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
acpi dsts loading and populate_rootfs, Christoph Hellwig, (Sun Feb 10, 12:12 am)
Re: acpi dsts loading and populate_rootfs, Christoph Hellwig, (Sun Feb 10, 12:14 am)
Re: acpi dsts loading and populate_rootfs, Eric Piel, (Sun Feb 10, 4:58 am)
Re: acpi dsts loading and populate_rootfs, Sergey Vlasov, (Mon Feb 11, 6:47 am)
Re: acpi dsts loading and populate_rootfs, Éric Piel, (Mon Feb 11, 4:41 pm)
Re: acpi dsts loading and populate_rootfs, Christoph Hellwig, (Mon Feb 11, 10:37 pm)
Re: acpi dsts loading and populate_rootfs, Éric Piel, (Thu Feb 21, 11:46 am)
Re: [PATCH] Allow populate_rootfs() to be called early (wa ..., Christoph Hellwig, (Thu Feb 21, 12:04 pm)
Re: acpi dsts loading and populate_rootfs, Thomas Renninger, (Fri Feb 22, 1:51 am)
Re: acpi dsts loading and populate_rootfs, Thomas Renninger, (Fri Feb 22, 2:05 am)
Re: acpi dsts loading and populate_rootfs, Andi Kleen, (Fri Feb 22, 2:53 am)
Re: [PATCH] Use userland-like functions for reading the AC ..., Christoph Hellwig, (Sat Feb 23, 6:31 pm)