Re: [PATCH 4/7] seccomp_filter: add process state reporting
From: Will Drewry
Date: Wed Apr 27 2011 - 23:43:12 EST
On Wed, Apr 27, 2011 at 10:40 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Apr 27, 2011 at 10:24:20PM -0500, Will Drewry wrote:
>
>> Definitely. Would it make sense to have /proc/<pid>/seccomp and
>> /proc/<pid>/seccomp_filter?
>
> Just one question: WTF bother with S_IRUSR? Note that it's absolutely
> _useless_ in procfs; any kind of permission checks must be done in
> read(2) time since doing it in open(2) is worthless. Consider execve()
> on suid binary; oops, there goes your uid and there goes the effect
> of checks done by open(2). And if you *do* checks in read(2), why bother
> duplicating them in open(2)?
In earlier versions I was allowing filter/bitmask updating via the
proc file (which I nixed :). Is S_IRUGO preferred? I don't see any
crazy information leakage by sharing the filters/ruleset. I'll fold
it into the next version of this patch.
thanks!
will
--
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/