Re: [PATCH 04/12] seq_file: Make seq_file able to access the file'sopener cred

From: Al Viro
Date: Wed Sep 25 2013 - 22:42:57 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/