Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196409

Re: [PATCHv2 1/1] Documentation: describe how to add a system call

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCHv2 1/1] Documentation: describe how to add a system call
Date 2015-07-30 22:10 +0200
Message-ID <pS2jo-dO-17@gated-at.bofh.it> (permalink)
References (1 earlier) <pRQUW-t0-21@gated-at.bofh.it> <pRRxD-1rf-5@gated-at.bofh.it> <pRU2u-56l-5@gated-at.bofh.it> <pS0KC-6m6-9@gated-at.bofh.it> <pS1nk-7kq-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 30, 2015 at 12:04 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> On Thu, Jul 30, 2015 at 11:21:54AM -0700, Kees Cook wrote:
>> I like this, it's a good description of both options. I'm still biased
>> about the approach: I prefer flags, since pointers to user structures
>> complicate syscall filtering. ;)
>
> Seems like we should do two things to make that easier:
>
> 1) Create a standardized kernel mechanism for parameter-struct handling,
>    implementing the recommendations mentioned here.

It's been suggested in the past that nlmsg is appropriate for such a
thing, but I remain suspicious. :)

> 2) Integrate into that mechanism a way to filter the resulting parameter
>    struct with BPF *after* it has been copied to kernel space (and thus
>    can no longer be tampered with).

Yeah, this is a irritating part: the structures operated on are copied
from userspace adhoc in each syscall. Doing argument checking would
mean double copies initially, and perhaps teaching syscalls about
optional "already copied" arguments or something as an optimization.

-Kees

-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2 1/1] Documentation: describe how to add a system call David Drysdale <drysdale@google.com> - 2015-07-30 10:00 +0200
  Re: [PATCHv2 1/1] Documentation: describe how to add a system call Ingo Molnar <mingo@kernel.org> - 2015-07-30 10:40 +0200
    Re: [PATCHv2 1/1] Documentation: describe how to add a system call David Drysdale <drysdale@google.com> - 2015-07-30 13:20 +0200
      Re: [PATCHv2 1/1] Documentation: describe how to add a system call Kees Cook <keescook@chromium.org> - 2015-07-30 20:30 +0200
        Re: [PATCHv2 1/1] Documentation: describe how to add a system call Josh Triplett <josh@joshtriplett.org> - 2015-07-30 21:10 +0200
          Re: [PATCHv2 1/1] Documentation: describe how to add a system call Kees Cook <keescook@chromium.org> - 2015-07-30 22:10 +0200
    Re: [PATCHv2 1/1] Documentation: describe how to add a system call Josh Triplett <josh@joshtriplett.org> - 2015-07-30 20:30 +0200
  Re: [PATCHv2 1/1] Documentation: describe how to add a system call Josh Triplett <josh@joshtriplett.org> - 2015-07-30 21:00 +0200

csiph-web