public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Adam Belay <abelay@MIT.EDU>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Arjan van de Ven <arjan@infradead.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Greg KH <greg@kroah.com>,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Linux-pm mailing list <linux-pm@lists.osdl.org>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [linux-pm] Bug in PCI core
Date: Fri, 13 Oct 2006 10:36:35 -0600	[thread overview]
Message-ID: <20061013163635.GC11633@parisc-linux.org> (raw)
In-Reply-To: <1160757260.26091.115.camel@localhost.localdomain>

On Fri, Oct 13, 2006 at 12:34:20PM -0400, Adam Belay wrote:
> I agree this needs to be fixed.  However, as I previously mentioned,
> this isn't the right place to attack the problem.  Remember, this wasn't
> originally a kernel regression.  Rather it's a workaround for a known
> X/lspci/whatever bug.  It's not the kernel's job to babysit userspace.
> If a userspace app that has the proper permissions decides to take a
> course of action that could potentially crash the system, then it has a
> right to do so.  There are probably dozens of vectors for these sorts of
> problems (e.g. mmap as Arjan has mentioned) so why stop at the pci
> config sysfs interface?

The patch I posted (to deny user access while the device is
transitioning D-states) is to fix a bug where *any* local user can bring
the system into undefined territory, simply by typing lspci at the right
moment.  No special permission is needed.

I hadn't realised that pci_block_user_cfg_access() would call
pci_save_state().  There's only one other user of pci_block_user_cfg_access()
-- drivers/scsi/ipr.c and I think it could be induced to call
pci_save_state() itself.  It's an odd asymmetry anyway -- block calls
save state, but unblock doesn't call restore_state.

  reply	other threads:[~2006-10-13 16:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 20:41 Bug in PCI core Alan Stern
2006-10-13  1:01 ` [linux-pm] " Benjamin Herrenschmidt
2006-10-13  8:50   ` Adam Belay
2006-10-13  9:16     ` Benjamin Herrenschmidt
2006-10-13  9:31       ` Martin Mares
2006-10-13 12:25         ` [linux-pm] " Benjamin Herrenschmidt
2006-10-13 14:29     ` Alan Stern
2006-10-13 15:26       ` [linux-pm] " Alan Cox
2006-10-13 15:29         ` Arjan van de Ven
2006-10-13 16:06           ` Alan Cox
2006-10-13 16:34             ` Adam Belay
2006-10-13 16:36               ` Matthew Wilcox [this message]
2006-10-13 17:09               ` Alan Cox
2006-10-13 16:49                 ` Matthew Wilcox
2006-10-13 17:34                   ` Alan Cox
2006-10-13 17:13                     ` Arjan van de Ven
2006-10-13 17:57                     ` Alan Stern
2006-10-13 19:18                       ` [linux-pm] " Matthew Wilcox
2006-10-13 20:59                         ` Alan Stern
2006-10-13 19:30                     ` Adam Belay
2006-10-13 23:00                     ` Benjamin Herrenschmidt
2006-10-14  2:33                       ` Alan Stern
2006-10-14  3:04                         ` [linux-pm] " Roland Dreier
2006-10-14  3:07                         ` Matthew Wilcox
2006-10-14  3:19                         ` Bill Randle
2006-10-14  5:47                         ` Greg KH
2006-10-13 17:01                 ` Adam Belay
2006-10-13 16:40           ` Adam Belay
2006-10-13 20:48       ` [linux-pm] " Pavel Machek
2006-10-14  5:34 ` Greg KH

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=20061013163635.GC11633@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=abelay@MIT.EDU \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linux-pm@lists.osdl.org \
    --cc=stern@rowland.harvard.edu \
    /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