lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 31 Oct 2007 10:52:35 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
CC:	Greg KH <greg@...ah.com>,
	James Bottomley <James.Bottomley@...elEye.com>,
	Kay Sievers <kay.sievers@...y.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sysfs: add filter function to groups

Cornelia Huck wrote:
> Greg KH <greg@...ah.com> wrote:
>> On Tue, Oct 30, 2007 at 01:25:43PM -0500, James Bottomley wrote:
>>> +	for (i = 0, attr = grp->attrs; *attr; i++, attr++)
>>> +		if (grp->is_visible &&
>>> +		    grp->is_visible(kobj, *attr, i))
>>> +			sysfs_hash_and_remove(dir_sd, (*attr)->name);
>> Hm, doesn't this break for the zillions of attribute groups that do not
>> have the is_visible function set?
...
> Would it make more sense then to turn the meaning of the callback
> around?
> 
> for (...) {
> 	if (grp->mask_out && grp->mask_out(kobj, *attr, i))
> 		continue;
> 	error |= sysfs_add_file(...);
> }

		if (!grp->is_visible ||
		    grp->is_visible(kobj, *attr, i))
			add or remove();

-- 
Stefan Richter
-=====-=-=== =-=- =====
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ