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]
Message-ID: <4AE9C0B0.3030304@suse.de>
Date:	Thu, 29 Oct 2009 17:20:00 +0100
From:	Tejun Heo <teheo@...e.de>
To:	Matthew Wilcox <matthew@....cx>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>, linux-kernel@...r.kernel.org,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	linux-pci@...r.kernel.org
Subject: Re: [PATCH 2/3] Sysfs: Allow directories to be populated dynamically

Hello,

> diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
> index af4c4e7..13843fa 100644
> --- a/fs/sysfs/sysfs.h
> +++ b/fs/sysfs/sysfs.h
> @@ -17,6 +17,9 @@ struct sysfs_elem_dir {
>  	struct kobject		*kobj;
>  	/* children list starts here and goes through sd->s_sibling */
>  	struct sysfs_dirent	*children;
> +	int (*populate)(struct dentry *, struct sysfs_dirent *);
> +	void (*depopulate)(struct dentry *, struct sysfs_dirent *);
> +	void *data;

This will increase the size of struct sysfs_dirent by three pointers
which is considerable.  Bloating the size of sysfs_dirent can waste
large amount of memory on machines with a lot of disks.

The implementation looks quite scary to me.  Is this the only way to
do this?  It it because trying to create individual entries for msix
will end up creating too many sysfs entries?  If so, how many are we
talking about?

Thanks.

-- 
tejun
--
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