From: ebiederm@xmission.com (Eric W. Biederman)
To: olson@pathscale.com
Cc: "Bryan O'Sullivan" <bos@serpentine.com>,
Adrian Bunk <bunk@stusta.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.19-rc4: known unfixed regressions (v3)
Date: Tue, 07 Nov 2006 14:35:23 -0700 [thread overview]
Message-ID: <m1hcxb7xes.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611071258220.8122@topaz.pathscale.com> (Dave Olson's message of "Tue, 7 Nov 2006 13:01:44 -0800 (PST)")
Dave Olson <olson@pathscale.com> writes:
> On Tue, 7 Nov 2006, Eric W. Biederman wrote:
> | > Displaying something that might change is a fact of life, and no
> | > different than the PCI world. It's still best to keep things as
> | > correct as possible.
> |
> | No. I was thinking of the rat hole in pci config space you have to
> | access to read these registers. You have to actively write a pci
> | config value to select which register you are going to read.
> |
> | So by default it is not safe to touch this value from user space,
> | because you could mess up the kernel, if the kernel is updating the
> | value.
>
> Nonetheless, as root, lspci already does that (it displays the MSI
> interrupt info). I wasn't talking about fixing that, just saying
> that having the data being as correct as possible, is highly
> desirable. We can't know everything that everybody is doing with
> the data.
I think we are talking past each other. I think it is fine but silly
to set a standard register that isn't actually used. It probably makes
debugging a little easier but it might also make things a little more
confusing because we are doing something totally unnecessary.
The pci capability is fine. The issue with the hyptertrasnport interrupt
capability is that it is 8 bytes long and controls up to 1024 bytes of data.
It is not nor can I ever it image it being safe for lspci to write the
window address register to read back the interrupt routing register.
Someone poking at this with setpci and lspci is fine.
In general reads of random registers are racy but harmless. Writes of
registers that the kernel needs to have a specific value should never
ever be done by default, because bad nasty things may happen. It is
a very good way to shoot yourself in the foot.
> Improvements in the pciutils library and locking with respect to the
> kernel may well be desirable, but are an independent issue from
> correctness.
This is not a race issue this is a true correctness issue. There
is an address register and a data register. It will never be correct
for any user space program to write to the address register without
first proving that the kernel does not care what value that register
takes on, or the user has sufficient privileges and says do it anyway
I know what I am doing.
These are not ordinary pci config space registers, although they are standard
registers for hypertransport devices.
Eric
next prev parent reply other threads:[~2006-11-07 21:36 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 4:27 Linux 2.6.19-rc4 Linus Torvalds
2006-10-31 5:34 ` Andrew Morton
2006-10-31 14:43 ` Jun'ichi Nomura
2006-10-31 16:44 ` Linux 2.6.19-rc4: udev compatibility broken? Mark Lord
2006-10-31 15:55 ` Linux 2.6.19-rc4 Linus Torvalds
2006-10-31 16:14 ` Martin J. Bligh
2006-10-31 16:34 ` Ray Lee
2006-10-31 16:51 ` Dave Jones
2006-10-31 21:26 ` Valdis.Kletnieks
2006-10-31 22:39 ` Al Viro
2006-11-02 16:03 ` Valdis.Kletnieks
2006-10-31 20:53 ` Valdis.Kletnieks
2006-10-31 21:29 ` Al Viro
2006-11-01 6:33 ` Willy Tarreau
2006-11-01 20:26 ` Guennadi Liakhovetski
2006-11-01 21:04 ` Sam Ravnborg
2006-11-02 21:19 ` Guennadi Liakhovetski
2006-10-31 18:33 ` Adrian Bunk
2006-10-31 18:36 ` Martin Bligh
2006-10-31 18:54 ` Adrian Bunk
2006-10-31 18:45 ` Adrian Bunk
2006-10-31 19:26 ` Russell King
2006-10-31 19:39 ` Martin Bligh
2006-10-31 17:02 ` CONFIG_USB_USBNET and mii_* (was Re: Linux 2.6.19-rc4) Athanasius
2006-10-31 17:11 ` Randy Dunlap
2006-10-31 19:56 ` 2.6.19-rc4: known unfixed regressions Adrian Bunk
2006-10-31 20:11 ` Greg KH
2006-11-04 3:15 ` Adrian Bunk
2006-10-31 20:12 ` Arjan van de Ven
2006-10-31 20:21 ` Adrian Bunk
2006-11-02 20:02 ` Rafael J. Wysocki
2006-11-02 20:10 ` Andrew Morton
2006-11-02 21:22 ` Auke Kok
2006-11-02 21:55 ` Alan Cox
2006-11-02 20:54 ` Linus Torvalds
2006-11-02 21:29 ` Greg KH
2006-11-02 21:26 ` Adrian Bunk
2006-11-02 21:40 ` Rafael J. Wysocki
2006-10-31 20:08 ` 2.6.19-rc4: known regressions with patches Adrian Bunk
[not found] ` <20061103024132.GG13381@stusta.de>
2006-11-03 2:56 ` [discuss] Linux 2.6.19-rc4: known unfixed regressions (v2) Dave Jones
2006-11-03 8:25 ` Alexey Starikovskiy
2006-11-03 15:56 ` Dave Jones
2006-11-05 17:32 ` Christian
2006-11-05 20:04 ` Dave Jones
2006-11-06 17:35 ` Adrian Bunk
2006-11-06 17:49 ` Dave Jones
2006-11-06 6:00 ` Adrian Bunk
2006-11-06 15:43 ` Christian
2006-11-06 17:20 ` Dave Jones
2006-11-06 17:30 ` Adrian Bunk
2006-11-06 17:37 ` Adrian Bunk
2006-11-04 18:21 ` [linux-usb-devel] " Greg KH
[not found] ` <20061105064801.GV13381@stusta.de>
2006-11-05 13:26 ` 2.6.19-rc4: known unfixed regressions (v3) Michael S. Tsirkin
2006-11-05 13:57 ` Adrian Bunk
2006-11-05 15:17 ` Eric W. Biederman
2006-11-07 4:22 ` Adrian Bunk
2006-11-07 5:18 ` Bryan O'Sullivan
2006-11-07 8:50 ` Eric W. Biederman
2006-11-07 16:19 ` Bryan O'Sullivan
2006-11-07 17:33 ` Eric W. Biederman
2006-11-07 17:37 ` Dave Olson
2006-11-07 18:20 ` Eric W. Biederman
2006-11-07 20:30 ` Dave Olson
2006-11-07 20:51 ` Eric W. Biederman
2006-11-07 21:01 ` Dave Olson
2006-11-07 21:35 ` Eric W. Biederman [this message]
2006-11-07 21:41 ` Dave Olson
2006-11-07 22:25 ` Eric W. Biederman
2006-11-07 18:01 ` Bryan O'Sullivan
2006-11-07 18:29 ` Eric W. Biederman
2006-11-07 21:32 ` Bryan O'Sullivan
2006-11-07 22:00 ` Eric W. Biederman
2006-11-08 5:14 ` Bryan O'Sullivan
2006-11-08 11:11 ` Eric W. Biederman
2006-11-05 15:22 ` Eric W. Biederman
2006-11-06 12:48 ` 2.6.19-rc4: known regressions with patches (v2) Adrian Bunk
2006-11-07 13:30 ` 2.6.19-rc4: known unfixed regressions (v4) Adrian Bunk
[not found] ` <200611070317.42230.earny@net4u.de>
[not found] ` <200611070041.28008.len.brown@intel.com>
[not found] ` <200611072105.50178.earny@net4u.de>
2006-11-08 8:36 ` [linux-pm] 2.6.19-rc4: known unfixed regressions (v3) Adrian Bunk
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=m1hcxb7xes.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=bos@serpentine.com \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=olson@pathscale.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