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: <20130927083435.GA2340@dztty>
Date:	Fri, 27 Sep 2013 09:34:35 +0100
From:	Djalal Harouni <tixxdz@...ndz.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Kees Cook <keescook@...omium.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	"Serge E. Hallyn" <serge.hallyn@...ntu.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	"kernel-hardening@...ts.openwall.com" 
	<kernel-hardening@...ts.openwall.com>, tixxdz@...il.com
Subject: Re: [PATCH 04/12] seq_file: Make seq_file able to access the file's
 opener cred

On Wed, Sep 25, 2013 at 05:22:51PM -0700, Linus Torvalds wrote:
> On Wed, Sep 25, 2013 at 1:14 PM, Djalal Harouni <tixxdz@...ndz.org> wrote:
> >
> > Therefor add the f_cred field to the seq_file struct and a helper
> > seq_f_cred() to return it.
> 
> I hate how you've split up this patch from the next one that actually
> _initializes_ the new field.
> 
> The two patches should have been one.
Ok, noted.

> I think the patch should also remove the 'user_ns' member, since it's
> now available as f_cred->user_ns.
> 
> I also suspect that it would be better to just make the the new
> seq_file member point to the 'struct file' instead. Sure, it's an
> extra level of indirection, but the lifetime of f_cred is not as clear
> otherwise. You don't increment the reference count, which is correct
> *only* because 'seq_file' has the same lifetime as 'struct file', and
> thus the reference count from struct file for the f_cred is
> sufficient.
Yes.

For the seq_file struct, yes we can make it point to the 'struct file'.

Or, I've also found other ways, perhaps they will make Al happy, one of
them is to use the 'struct file' as you point, but in an other way, or
change the file_operations of these sensitive files.
Please Linus see my next response to Al, thanks

> [ Time passes, I look over the other patches ]
> 
> Oh, and I note that you remove user_ns in patch 12. Again, I think
> that's just splitting things up too much. It actually gets harder to
> see what happens when you do this.
Ok, will improve it.

Will also wait to see what others think, then resend as a V2

Thanks.

> 
>                Linus

-- 
Djalal Harouni
http://opendz.org
--
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