linux-mips
[Top] [All Lists]

Re: [PATCH v6 6/9] seccomp: add "seccomp" syscall

To: Alexei Starovoitov <ast@plumgrid.com>
Subject: Re: [PATCH v6 6/9] seccomp: add "seccomp" syscall
From: Kees Cook <keescook@chromium.org>
Date: Fri, 13 Jun 2014 14:53:37 -0700
Cc: LKML <linux-kernel@vger.kernel.org>, linux-api@vger.kernel.org, Andy Lutomirski <luto@amacapital.net>, Oleg Nesterov <oleg@redhat.com>, Will Drewry <wad@chromium.org>, Julien Tinnes <jln@chromium.org>, David Drysdale <drysdale@google.com>, John Johansen <john.johansen@canonical.com>, Andrew Morton <akpm@linux-foundation.org>, "x86@kernel.org" <x86@kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, linux-mips@linux-mips.org, linux-arch <linux-arch@vger.kernel.org>, linux-security-module <linux-security-module@vger.kernel.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Cvd41i5S1ZeYSIMTcOqPGqQfKGdYbmMOQISgXGVcd88=; b=YnRj1ubfamXqBgPbq8Ro4ZeirfnJEmLnjh68blkbQ7F/dy9GhrIJ+58ZongAspZg5K 1IfZnRfbUN1K09SOcIJzbNd+CPBpCaXKg4Dg8RzsHQ42CDXYJTXX7mXvKTzFGQFYOmww kEqpypNcxsJiyuC8cqw9AFKFPyx1tMVL9BkYbMi0CzIbEeLTws9Ii27uEUu6fhKHAbL6 y5z72ZIug/Yqm8sjGHFStYogWqTc7NtdMAGoOwtwQ9xLUP733qNFNFPpPTIdqumTHMdU dsQ7U1oYg2X7VM1icxb6bNTQYpShvd9CC9QZaFzyWq83kIPHpxRUhvd+qbJ0qRDkzYBK HgcA==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Cvd41i5S1ZeYSIMTcOqPGqQfKGdYbmMOQISgXGVcd88=; b=YdVLJPy5ZQiY3+uMWH0pfQvuwllwhv/ebxE3bjmN3S9iZkKpNqd1qbK+K1pZnBdIbv YVg5V/jSpMfI7u1AAqliUfp3xrADZ0wWuiybsYVAZyer++Ov5LTh1nPm+Cwu/znVx94a CfJBL8m6wk+IRLUXPJWB694Lz9fOe+PEJ2xTk=
In-reply-to: <CAMEtUuwKRUYN_qdnCj42G3Z1UT3vMYPoJqXd2_PjV+_J3WA+8w@mail.gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1402457121-8410-1-git-send-email-keescook@chromium.org> <1402457121-8410-7-git-send-email-keescook@chromium.org> <CAMEtUuwKRUYN_qdnCj42G3Z1UT3vMYPoJqXd2_PjV+_J3WA+8w@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Fri, Jun 13, 2014 at 2:22 PM, Alexei Starovoitov <ast@plumgrid.com> wrote:
> On Tue, Jun 10, 2014 at 8:25 PM, Kees Cook <keescook@chromium.org> wrote:
>> This adds the new "seccomp" syscall with both an "operation" and "flags"
>> parameter for future expansion. The third argument is a pointer value,
>> used with the SECCOMP_SET_MODE_FILTER operation. Currently, flags must
>> be 0. This is functionally equivalent to prctl(PR_SET_SECCOMP, ...).
>>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>> Cc: linux-api@vger.kernel.org
>> ---
>> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
>> index b0881a0ed322..1713977ee26f 100644
>> --- a/include/linux/syscalls.h
>> +++ b/include/linux/syscalls.h
>> @@ -866,4 +866,6 @@ asmlinkage long sys_process_vm_writev(pid_t pid,
>>  asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type,
>>                          unsigned long idx1, unsigned long idx2);
>>  asmlinkage long sys_finit_module(int fd, const char __user *uargs, int 
>> flags);
>> +asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
>> +                           const char __user *uargs);
>
> It looks odd to add 'flags' argument to syscall that is not even used.

FWIW, "flags" is given use in the next patch to support the tsync option.

-Kees

-- 
Kees Cook
Chrome OS Security

<Prev in Thread] Current Thread [Next in Thread>