mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Éric Piel" <Eric.Piel@tremplin-utc.net>
Cc: len.brown@intel.com, Christoph Hellwig <hch@lst.de>,
	dsdt@gaugusch.at,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	trenn@suse.de
Subject: Re: [PATCH] Use userland-like functions for reading the ACPI table
Date: Sat, 23 Feb 2008 12:45:38 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802231232280.21332@woody.linux-foundation.org> (raw)
In-Reply-To: <47C07536.6040404@tremplin-utc.net>



On Sat, 23 Feb 2008, Éric Piel wrote:
> 
> As recommended by Christoph Hellwig, even if we can't rely on the userspace
> firmware loader so early at boot, at least use normal syscall (as in
> init/do_mounts_*.c). Similarly, use kfree() instead of ACPI_FREE().

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

  reply	other threads:[~2008-02-23 20:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10  7:12 acpi dsts loading and populate_rootfs Christoph Hellwig
2008-02-10  7:14 ` Christoph Hellwig
2008-02-10 11:58   ` Eric Piel
2008-02-11 13:47     ` Sergey Vlasov
2008-02-11 23:41       ` Éric Piel
2008-02-21 19:02         ` [PATCH] Allow populate_rootfs() to be called early (was: acpi dsts loading and populate_rootfs) Éric Piel
2008-02-21 19:04           ` Christoph Hellwig
2008-02-21 21:27             ` [PATCH] Allow populate_rootfs() to be called early Éric Piel
2008-02-23 19:40           ` [PATCH] Allow populate_rootfs() to be called early (resent, with sob) Éric Piel
2008-02-12  5:37     ` acpi dsts loading and populate_rootfs Christoph Hellwig
2008-02-21 18:46       ` Éric Piel
2008-02-22  8:51         ` Thomas Renninger
2008-02-22  9:05           ` Thomas Renninger
2008-02-22  9:53           ` Andi Kleen
2008-02-23 19:34         ` [PATCH] Use userland-like functions for reading the ACPI table Éric Piel
2008-02-23 20:45           ` Linus Torvalds [this message]
2008-02-24  1:31             ` Christoph Hellwig
2008-02-24 19:02               ` Éric Piel

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=alpine.LFD.1.00.0802231232280.21332@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Eric.Piel@tremplin-utc.net \
    --cc=dsdt@gaugusch.at \
    --cc=hch@lst.de \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trenn@suse.de \
    /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

all inboxes | Powered by JetHome®