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] [day] [month] [year] [list]
Date:	Mon, 17 Nov 2008 15:52:22 +0900
From:	Kentaro Takeda <takedakn@...data.co.jp>
To:	akpm@...ux-foundation.org
CC:	haradats@...data.co.jp, linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, penguin-kernel@...ove.SAKURA.ne.jp
Subject: Re: [TOMOYO #12 (2.6.28-rc2-mm1) 04/11] Introduce d_realpath().

Andrew Morton wrote:
> On Tue, 04 Nov 2008 15:08:51 +0900
> Kentaro Takeda <takedakn@...data.co.jp> wrote:
> 
>> +		/*
>> +		 * Exception: Use /proc/self/ rather than /proc/\$/
>> +		 * for current process.
>> +		 */
>> +		name = dentry->d_name.name;
>> +		name_len = dentry->d_name.len;
>> +		if (IS_ROOT(parent) &&
>> +		    parent->d_sb->s_magic == PROC_SUPER_MAGIC &&
>> +		    !strict_strtoul(name, 10, &pid)) {
> 
> Well that looks like rather a hack.
> 
> It would still be a hack, but a better implementation might be to save
> the procfs superblock's address in a global then do
> 
> 
> #ifdef CONFIG_PROCFS
> static inline bool is_procfs_sb(struct super_block *sb)
> {
> 	return sb == saved_procfs_sb;
> }
> #else
> static inline bool is_procfs_sb(struct super_block *sb)
> {
> 	return false;
> }
> #endif
It seems to me that the procfs superblock's address is not a single value
because proc_get_sb() in fs/proc/root.c could be called for multiple times.
Thus, I'd like to continue using "parent->d_sb->s_magic == PROC_SUPER_MAGIC"
rather than "is_procfs_sb(parent->d_sb)".

I think I've replied to most of your comments.
Is there anything we can do before reposting TOMOYO #13 ?

Regards,


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