Re: [PATCH] Use userland-like functions for reading the ACPI table

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Éric Piel <Eric.Piel@...>
Cc: <len.brown@...>, Christoph Hellwig <hch@...>, <dsdt@...>, Linux Kernel Mailing List <linux-kernel@...>, <trenn@...>
Date: Saturday, February 23, 2008 - 4:45 pm

On Sat, 23 Feb 2008, Éric Piel wrote:

So I'm missing a lot of the background here.

I don't think "sys_open()" is in any way preferable to the alternatives, 
especially since it depends on thread-global state (the file descriptor 
table) rather than much more local state ("struct file" that you've 
opened).

I think the calls to sys_open() in init do_dounts etc are very different: 
they really are more about a real kernel-level almost-user-mode thread 
than a core driver. 

I *also* think this patch is just fundamentally broken regardless. You 
can't just cast a kernel pointer to (char __user *). The two can be in 
totally different address spaces. There's a reason why it used to do that 
whole dance with oldfs.

[ Of course, on platforms where ACPI actually runs this is not the case, 
  but that is not an excuse for doing things wrong ]

So I would NAK this patch - it looks buggy, and the reason for it is not 
sufficiently explained in the first place.

		Linus
--
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, 3:12 am)
Re: acpi dsts loading and populate_rootfs, Christoph Hellwig, (Sun Feb 10, 3:14 am)
Re: acpi dsts loading and populate_rootfs, Eric Piel, (Sun Feb 10, 7:58 am)
Re: acpi dsts loading and populate_rootfs, Christoph Hellwig, (Tue Feb 12, 1:37 am)
Re: acpi dsts loading and populate_rootfs, Éric Piel, (Thu Feb 21, 2:46 pm)
Re: [PATCH] Use userland-like functions for reading the ACPI..., Linus Torvalds, (Sat Feb 23, 4:45 pm)
Re: [PATCH] Use userland-like functions for reading the ACPI..., Christoph Hellwig, (Sat Feb 23, 9:31 pm)
Re: acpi dsts loading and populate_rootfs, Thomas Renninger, (Fri Feb 22, 4:51 am)
Re: acpi dsts loading and populate_rootfs, Andi Kleen, (Fri Feb 22, 5:53 am)
Re: acpi dsts loading and populate_rootfs, Thomas Renninger, (Fri Feb 22, 5:05 am)
Re: acpi dsts loading and populate_rootfs, Sergey Vlasov, (Mon Feb 11, 9:47 am)
Re: acpi dsts loading and populate_rootfs, Éric Piel, (Mon Feb 11, 7:41 pm)
Re: [PATCH] Allow populate_rootfs() to be called early (was:..., Christoph Hellwig, (Thu Feb 21, 3:04 pm)