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: <20070220222652.GB21696@kroah.com>
Date:	Tue, 20 Feb 2007 14:26:52 -0800
From:	Greg KH <greg@...ah.com>
To:	"Serge E. Hallyn" <serge@...lyn.com>
Cc:	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: securityfs_create_dir strange comment

On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote:
> Quoting Jan Engelhardt (jengelh@...ux01.gwdg.de):
> > Hello list,
> > 
> > 
> > in security/inode.c, the comment for securityfs_create_dir() reads:
> > 
> > 	If securityfs is not enabled in the kernel, the value -ENODEV 
> > 	will be returned.  It is not wise to check for this value, but 
> > 	rather, check for NULL or !NULL instead as to eliminate the need 
> > 	for #ifdef in the calling code.
> > 
> > What is the actual callee that can return NULL - and what should 
> > module_init() of a module return when securityfs_create_dir() returns 
> > NULL?
> 
> Hmm, this came from GregKH.  It does seem based on the code that
> checking for -ENODEV is necessary, so I don't understand the comment.

If securityfs_create_dir() returns NULL, then something bad happened and
your code needs to properly recover from it.

Other than that, I don't understand the issue here.

confused,

greg k-h
-
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