|
Message-ID: <20130926024234.GE13318@ZenIV.linux.org.uk> Date: Thu, 26 Sep 2013 03:42:34 +0100 From: Al Viro <viro@...IV.linux.org.uk> To: Djalal Harouni <tixxdz@...ndz.org> Cc: "Eric W. Biederman" <ebiederm@...ssion.com>, Kees Cook <keescook@...omium.org>, Andrew Morton <akpm@...ux-foundation.org>, Linus Torvalds <torvalds@...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@...r.kernel.org, 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 09:14:37PM +0100, Djalal Harouni wrote: > The f_cred field of the file struct contains the cred of current at > open time. This field can be used to get the context of open, and track > current's cred changes after. > > The procfs is one of those fs that need to track current cred changes > in order to implement proper permission checks on each system call. > > The procfs make use of seq_file struct and its iterators to step through > /proc objects. These iterators and seq_file helpers must be able to > access the file->f_cred to perform various permission checks at any > time. > > Therefor add the f_cred field to the seq_file struct and a helper > seq_f_cred() to return it. NAK. This is completely irrelevant for most of seq_file users and it simply does not belong in struct seq_file.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.