From: Will Drewry <wad@chromium.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: James Morris <jmorris@namei.org>,
Chris Evans <scarybeasts@gmail.com>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
djm@mindrot.org, segoon@openwall.com, kees.cook@canonical.com,
rostedt@goodmis.org, fweisbec@gmail.com, tglx@linutronix.de,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, Eric Paris <eparis@redhat.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH v9 05/13] seccomp_filter: Document what seccomp_filter is and how it works.
Date: Fri, 1 Jul 2011 16:34:41 -0500 [thread overview]
Message-ID: <BANLkTik2YtBbC+T3zyCooK71zZ_z2FdJuQ@mail.gmail.com> (raw)
In-Reply-To: <20110701210011.GA22171@elte.hu>
On Fri, Jul 1, 2011 at 4:00 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Will Drewry <wad@chromium.org> wrote:
>
>> On Fri, Jul 1, 2011 at 11:10 AM, Ingo Molnar <mingo@elte.hu> wrote:
>>
>> > But that's exactly my point: i consider it the right way forward
>> > because it maximizes kernel utility in the long run.
>>
>> Not if it never happens. Which is what happened with the proposals
>> from Adam and from Eric.
>
> Well, that's what my job is as a maintainer: to tell you if i dislike
> a solution and to suggest better solutions - and here this was really
> easy to do, as you already prototyped a solution i consider (far)
> superior.
But other maintainers disagreed. So as a non-maintainer, I get to
guess as to what happens next.
> I cannot force you to do it like that, but i do have to say 'no'.
It seems like a catch-22. There's not a perfectly clear path forward,
and anything that looks like the perf-style proof of concept will be
NACK'd by other maintainers. While I believe we could lift perf up
off its foundation and create a shared location for storing perf
events and ftrace events so that they will be inherited the same way
(currently nack'd by linus) and walked the same way (kinda), the
syscall interface couldn't currently be shared (also nack'd by perf),
and creating a new one is possible modeled on the perf one, but it's
also unclear what the ABI should be for a generic filtering system.
As I mentioned in a prior mail, syscalls should be whitelist only
(default fail), but random function call points in the kernel are more
likely to be fail-open. And as the policy mechanisms get more
complicated, so does the code that needs to manage them. I don't know
what the specification would look like or how it should look. (For
instance, I abused a seccomp mode for the poc to change the match
behavior for syscall events. I imagine that could be folded into the
event handler for the proposed system, but I don't know what we'd do
for any other event subsystems.)
>> > are not some bad side effect or quirk, they are all generic
>> > improvements we want in any case and not just for sandboxing.
>>
>> I didn't say they were bad side effects or quirks.
>
> That's a pretty important point as well.
Well I have very explicit concerns that (new) system calls will slip
through the cracks forever and then a non-system call focused system
for reducing the kernel attack surface will always be incomplete. The
biggest benefit of creating a highly targeted patch series that
focuses on the kernel syscall ABI is that future additions won't be
able to slip through the cracks without major system-level changes.
Perhaps this is why I am nervous about a generic solution. I find
that sometimes the specialized solution is the best one even when
there is some additional cost.
>> > You might not be interested in all of those items, you are only
>> > interested in getting the narrow feature-set you are interested
>> > in, but you sure are interested in getting sandboxing versus not
>> > getting anything at all, right?
>>
>> Unfortunately, that isn't the value proposition for me or many
>> other contributors. The real question is whether I am interested
>> in getting sandboxing in with mainline or if I want to sign up to
>> maintain the patches out of tree until my hair falls out.
>
> Well, if you implement the right solution then why should it stay out
> of tree?
"right" is subjective -- as always. We each have different value
judgements we make. Specialized verus generalized solutions. Shared
code versus duplicated code. Iterative improvements versus giant
overhauls, etc. I was just responding to the fact I interpreted the
language in your mail more like code-writing-extortion than working
towards a better Linux kernel. Perhaps I was reading it too harshly.
> If the code is clean and useful and resolves all the technical
> objections that were raised against it then i will certainly merge it
> - and i hope Linus will chime in if he finds the actual iteration
> unacceptable and the direction harmful, to save us all the trouble.
Any guidance here would certainly be welcomed. I had thought that
doing a larger more complicated solution had been shot down along with
supporting inheritance or other generic features. Instead, this patch
series is focused (attack surface reduction) and process-tied so that
could be iteratively improved and moved toward a longer term
shared-infrastructure goal without pulling in all the overhead and
design complexity right away.
I had hoped the current iteration would have been satisfactory from
both a usefulness and a technical quality perspective to potential API
consumers and maintainers alike.
> In the end the 'sandboxing' feature should be a few dozen lines at
> most - all the rest will just be shared infrastructure.
Anytime a powerful feature can be a few lines of code, it's a good
thing. It seems like we're still a ways away from defining what the
shared infrastructure is that would allow a few dozen lines of code to
be enough. The bones are there, but there's a large amount of missing
and under-designed work.
Thanks,
will
next prev parent reply other threads:[~2011-07-01 21:34 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 0:36 [PATCH v9 01/13] tracing: split out filter initialization and clean up uses Will Drewry
2011-06-24 0:36 ` [PATCH v9 02/13] tracing: split out syscall_trace_enter construction Will Drewry
2011-06-24 0:36 ` [PATCH v9 03/13] seccomp_filter: new mode with configurable syscall filters Will Drewry
2011-06-24 7:30 ` Damien Miller
2011-06-24 20:20 ` Kees Cook
2011-06-24 0:36 ` [PATCH v9 04/13] seccomp_filter: add process state reporting Will Drewry
2011-06-24 0:36 ` [PATCH v9 05/13] seccomp_filter: Document what seccomp_filter is and how it works Will Drewry
2011-06-24 7:24 ` Chris Evans
[not found] ` <BANLkTimtYUyXbZjWhjK61B_1WBXE4MoAeA@mail.gmail.com>
2011-06-26 23:20 ` James Morris
2011-06-29 19:13 ` Will Drewry
2011-06-30 1:30 ` James Morris
2011-07-01 11:56 ` Ingo Molnar
2011-07-01 12:56 ` Will Drewry
2011-07-01 13:07 ` Ingo Molnar
2011-07-01 15:46 ` Will Drewry
2011-07-01 16:10 ` Ingo Molnar
2011-07-01 16:43 ` Will Drewry
2011-07-01 18:04 ` Steven Rostedt
2011-07-01 18:09 ` Will Drewry
2011-07-01 18:48 ` Steven Rostedt
2011-07-04 2:19 ` James Morris
2011-07-05 12:40 ` Steven Rostedt
2011-07-05 23:46 ` James Morris
2011-07-06 0:37 ` [Ksummit-2011-discuss] " Ted Ts'o
2011-07-05 23:56 ` Steven Rostedt
2011-07-05 2:54 ` [Ksummit-2011-discuss] " Eugene Teo
2011-07-01 20:25 ` Kees Cook
2011-07-04 16:09 ` [Ksummit-2011-discuss] " Greg KH
2011-07-01 21:00 ` Ingo Molnar
2011-07-01 21:34 ` Will Drewry [this message]
2011-07-05 9:50 ` Ingo Molnar
2011-07-06 18:24 ` Will Drewry
2011-07-05 15:26 ` Vasiliy Kulikov
2011-06-24 0:36 ` [PATCH v9 06/13] x86: add HAVE_SECCOMP_FILTER and seccomp_execve Will Drewry
2011-06-24 0:36 ` [PATCH v9 07/13] arm: select HAVE_SECCOMP_FILTER Will Drewry
2011-06-24 0:36 ` [PATCH v9 08/13] microblaze: select HAVE_SECCOMP_FILTER and provide seccomp_execve Will Drewry
2011-06-24 0:36 ` [PATCH v9 09/13] mips: " Will Drewry
2011-06-24 0:36 ` [PATCH v9 10/13] s390: " Will Drewry
2011-06-24 0:36 ` [PATCH v9 11/13] powerpc: " Will Drewry
2011-08-30 5:28 ` Benjamin Herrenschmidt
2011-11-28 0:14 ` Benjamin Herrenschmidt
2011-11-28 1:45 ` Will Drewry
2011-06-24 0:36 ` [PATCH v9 12/13] sparc: " Will Drewry
2011-06-24 0:36 ` [PATCH v9 13/13] sh: select HAVE_SECCOMP_FILTER Will Drewry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTik2YtBbC+T3zyCooK71zZ_z2FdJuQ@mail.gmail.com \
--to=wad@chromium.org \
--cc=djm@mindrot.org \
--cc=eparis@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jmorris@namei.org \
--cc=kees.cook@canonical.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rdunlap@xenotime.net \
--cc=rostedt@goodmis.org \
--cc=scarybeasts@gmail.com \
--cc=segoon@openwall.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®