Re: [PATCH 4/7] seccomp_filter: add process state reporting

From: Al Viro
Date: Wed Apr 27 2011 - 23:40:16 EST


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)?
--
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/