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:	Thu, 29 Oct 2009 13:24:14 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Tejun Heo <teheo@...e.de>
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

On Thu, Oct 29, 2009 at 05:28:14PM +0100, Tejun Heo wrote:
>  struct sysfs_dirent {
> 	 atomic_t		s_count;
> 	 atomic_t		s_active;
> 	 struct sysfs_dirent	*s_parent;
> 	 struct sysfs_dirent	*s_sibling;
> 	 const char		*s_name;
> 
> 	 union {
> 		 struct sysfs_elem_dir		s_dir;
> 		 struct sysfs_elem_symlink	s_symlink;
> 		 struct sysfs_elem_attr		s_attr;
> 		 struct sysfs_elem_bin_attr	s_bin_attr;
> 	 };
> 
> 	 unsigned int		s_flags;
> 	 ino_t			s_ino;
> 	 umode_t			s_mode;
> 	 struct sysfs_inode_attrs *s_iattr;
> 	                          ^^

Oh, ouch.  That does change the calculus somewhat.

> It feels a bit too convoluted to me.  sysfs is already pretty
> convoluted and adding yet more convolution would require pretty good
> justification, so I'm curious about the numbers.

It is convoluted.  The advantage of this is that we get to create many
fewer dirents.  I wonder if we can do away with the dirents entirely, and
have dentries constructed dynamically instead.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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