patch for #1852 works,
thanks! (was: Please fix bug #1852 (hald causes SYM53C8xx SCSI
errors, device disconnects + GNOME hang))
Matthias Andree
ma at dt.e-technik.uni-dortmund.de
Mon May 16 12:01:30 PDT 2005
Short: the patch works for me. Thank you!
Long: read on :-)
On Mon, 16 May 2005, David Zeuthen wrote:
> The kernel should really be fixed such that simply reading the 'config'
> attribute doesn't result in this. I'm also worried about this because
> even unprivileged users may read "config" attributes as the mode is
> 0644.
I'm told the PCI configuration space is 256 bytes, so this is probably
the place that needs to be attacked as well. Matthew Wilcox (53C8XX
maintainer) mentioned something like hacking the code to hide the upper
128 bytes in the .../config files for these adapters in November 2004,
but hasn't done this until 2.6.11. I started a new discussion on
<linux-scsi at vger.kernel.org> and asked to implement this, I believe on
in-depth fixes. hal was merely a "consumer" of this data.
> diff -u -p -r1.3.2.1 sysfs_dir.c
> --- hald/linux/libsysfs/sysfs_dir.c 20 Jan 2005 17:03:54 -0000 1.3.2.1
> +++ hald/linux/libsysfs/sysfs_dir.c 16 May 2005 15:03:14 -0000
> @@ -624,6 +624,8 @@ int sysfs_read_dir_attributes(struct sys
> continue;
> if (0 == strcmp(dirent->d_name, ".."))
> continue;
> + if (0 == strcmp(dirent->d_name, "config"))
> + continue;
> memset(file_path, 0, SYSFS_PATH_MAX);
> safestrcpy(file_path, sysdir->path);
> safestrcat(file_path, "/");
This patch works for me. Interesting that hal was reading files it
doesn't need, so as a side effect, it should be a tiny bit more
efficient now. Thanks again.
For those interested in trying the patch not having sufficient expertise
with patch/rebuild procedures, I have uploaded patched RPMS for SUSE
Linux 9.3 to http://home.pages.de/~mandree/suse-9.3-i586.de/ - just
download all the hal* packages and type rpm -Uhv hal*.i586.rpm
I chose the version numbers to that the full SUSE update packages will
be considered newer than mine, but delta and patch RPMs will not work
for these, you'd have to use the full .i586.rpm files.
--
Matthias Andree
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list