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:	Fri, 16 Nov 2007 13:33:16 -0500
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org
Subject: Re: [TOMOYO #5 02/18] Add wrapper functions for VFS
	helperfunctions.


On Sat, 2007-11-17 at 03:20 +0900, Tetsuo Handa wrote:
> Hello.
> 
> Trond Myklebust wrote:
> > > This patch allows LSM hooks refer previously associated "struct vfsmount" parameter
> > > so that they can calculate pathname of given "struct dentry".
> > 
> > NACK to this. Passing function parameters through the task_struct is
> > definitely not an acceptable hack (unless you're doing it through the
> > stack).
> 
> Thanks for your advise.
> But I don't know why it is not acceptable.
> The topmost vfsmount's address is retrievable through the task_struct,
> and non-topmost vfsmount's address (if any) are stored on the stack memory.
> Could you show me why this is bad?

The problem is that you have thrown away the main tool for documenting
the requirement, and for enforcing correctness (i.e. function argument
checking by the compiler).
The old functions are still there, are still exported, and still take
the same arguments as before, but you have now added a hidden
requirement that I have to set last_vfsmount when I call them. If I
haven't read your patch, and just call one of those vfs_* functions as
before, without setting last_vfsmount, I break your model, and I won't
find out until someone reports an obscure bug at runtime.

Trond

-
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