From: Matthias Andree <matthias.andree@gmx.de>
To: linux-scsi@vger.kernel.org
Cc: Matthew Wilcox <matthew@wil.cx>
Subject: 53C8XX /sys/devices/pci*/*/config revisited
Date: Sun, 15 May 2005 13:02:37 +0200 [thread overview]
Message-ID: <m3br7c4ur6.fsf@merlin.emma.line.org> (raw)
Matthew,
remember the discussion we had in Late November last year about root
reading the upper 128 bytes of SYM53C8XX's /sys/devices/pci/*/*/config
file? See <http://marc.theaimsgroup.com/?l=linux-scsi&m=110113027015843&w=2>
The bug also affects a different user-space package, Freedesktop's
"hal", that now ships with the new SUSE Linux 9.3.
I filed two bug reports/additions against the user space, SUSE Ticket ID
[20050515990000057] and FreeDesktop's bugzilla as #1852.
<https://bugs.freedesktop.org/show_bug.cgi?id=1852>
BTW, the hald bug #1852 has been open since 2004-11-14, and so is
actually older than the discussion we had here, but SUSE wasn't using
HAL at that time so I was unaware - I've posted the contents of my
addition to that bug on the HAL list but if they haven't fixed the bug
in half a year, I don't see why they'd fix the bug just now.
In the message above, you offered
| > 2. is it a kernel bug if reading offset #216 (byte-wise) in the config
| > file in sysfs confuses the hardware?
|
| No, but it does seem to me that we could do better. Unfortunately,
| the obvious thing to do (set the file size to less than 256 bytes) isn't
| really possible in sysfs. But we could use the 'undocumented feature'
| in drivers/pci/pci-sysfs.c:pci_read_config() of setting the pci_dev's
| cfg_size to 128 bytes. This would prevent even root from reading more
| than 128 bytes. That'd be OK -- there's no *PCI* data in this range,
| even on the latest 1010/1030 controllers. The operating registers are
| exposed in the 0x80-0xFF range only up to the 875; the 876 and later
| return only 0 in that range.
And I ask you to hack the driver as suggested to the bug keeps from
coming back as soon as a new user-space tool by $RANDOM_VENDOR feels
like it must read the whole range again.
Note also that the bug is visible on the 895, too. And it hurts, as it,
in connection with the GNOME desktop, offlines my CD-ROM drive, which
some automation component doesn't detect and hang, with GNOME not
starting up properly.
I fear that trying to fix user-space is going to become a neverending
story, with new packages causing trouble every other quarter.
I also filed a kernel bug against SUSE Linux, Ticket [20050515990000068]
Thanks in advance,
--
Matthias Andree
next reply other threads:[~2005-05-15 11:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-15 11:02 Matthias Andree [this message]
2005-05-15 11:13 ` 53C8XX /sys/devices/pci*/*/config revisited Arjan van de Ven
2005-05-15 11:26 ` Arjan van de Ven
2005-05-15 12:56 ` Matthias Andree
2005-05-15 14:48 ` Matthew Wilcox
2005-05-15 17:57 ` 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=m3br7c4ur6.fsf@merlin.emma.line.org \
--to=matthias.andree@gmx.de \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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