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


Groups > linux.kernel > #1483809

Re: [RFC v3 19/22] landlock: Add interrupted origin

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [RFC v3 19/22] landlock: Add interrupted origin
Date 2016-09-15 03:20 +0200
Message-ID <shtvj-dX-9@gated-at.bofh.it> (permalink)
References <shcNP-6gS-15@gated-at.bofh.it> <shcNQ-6gS-35@gated-at.bofh.it> <shngd-4l1-15@gated-at.bofh.it> <shqH7-6Kt-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 14, 2016 at 3:14 PM, Mickaël Salaün <mic@digikod.net> wrote:
>
> On 14/09/2016 20:29, Andy Lutomirski wrote:
>> On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün <mic@digikod.net> wrote:
>>> This third origin of hook call should cover all possible trigger paths
>>> (e.g. page fault). Landlock eBPF programs can then take decisions
>>> accordingly.
>>>
>>> Signed-off-by: Mickaël Salaün <mic@digikod.net>
>>> Cc: Alexei Starovoitov <ast@kernel.org>
>>> Cc: Andy Lutomirski <luto@amacapital.net>
>>> Cc: Daniel Borkmann <daniel@iogearbox.net>
>>> Cc: Kees Cook <keescook@chromium.org>
>>> ---
>>
>>
>>>
>>> +       if (unlikely(in_interrupt())) {
>>
>> IMO security hooks have no business being called from interrupts.
>> Aren't they all synchronous things done by tasks?  Interrupts are
>> driver things.
>>
>> Are you trying to check for page faults and such?
>
> Yes, that was the idea you did put in my mind. Not sure how to deal with
> this.
>

It's not so easy, unfortunately.  The easiest reliable way might be to
set a TS_ flag on all syscall entries when TIF_SECCOMP or similar is
set.

--Andy

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


Thread

[RFC v3 19/22] landlock: Add interrupted origin Mickaël Salaün <mic@digikod.net> - 2016-09-14 09:30 +0200
  Re: [RFC v3 19/22] landlock: Add interrupted origin Andy Lutomirski <luto@amacapital.net> - 2016-09-14 20:40 +0200
    Re: [RFC v3 19/22] landlock: Add interrupted origin Mickaël Salaün <mic@digikod.net> - 2016-09-15 00:20 +0200
      Re: [RFC v3 19/22] landlock: Add interrupted origin Andy Lutomirski <luto@amacapital.net> - 2016-09-15 03:20 +0200

csiph-web