From: drysdale@google.com (David Drysdale)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 2/9] seccomp: split filter prep from check and apply
Date: Thu, 26 Jun 2014 13:37:10 +0100 [thread overview]
Message-ID: <20140626123710.GA16204@google.com> (raw)
In-Reply-To: <1403560693-21809-3-git-send-email-keescook@chromium.org>
On Mon, Jun 23, 2014 at 02:58:06PM -0700, Kees Cook wrote:
> In preparation for adding seccomp locking, move filter creation away
> from where it is checked and applied. This will allow for locking where
> no memory allocation is happening. The validation, filter attachment,
> and seccomp mode setting can all happen under the future locks.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> kernel/seccomp.c | 97 +++++++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 67 insertions(+), 30 deletions(-)
>
> diff --git a/kernel/seccomp.c b/kernel/seccomp.c
> index afb916c7e890..edc8c79ed16d 100644
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> @@ -515,6 +551,7 @@ static long seccomp_set_mode(unsigned long seccomp_mode, char __user *filter)
> current->seccomp.mode = seccomp_mode;
> set_thread_flag(TIF_SECCOMP);
> out:
> + seccomp_filter_free(prepared);
> return ret;
> }
I think this needs to be inside #ifdef CONFIG_SECCOMP_FILTER to match
the definition of seccomp_filter_free:
../kernel/seccomp.c:554:2: error: implicit declaration of function ?seccomp_filter_free? [-Werror=implicit-function-declaration]
next prev parent reply other threads:[~2014-06-26 12:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 21:58 [PATCH v7 0/9] seccomp: add thread sync ability Kees Cook
2014-06-23 21:58 ` [PATCH v7 1/9] seccomp: create internal mode-setting function Kees Cook
2014-06-23 21:58 ` [PATCH v7 2/9] seccomp: split filter prep from check and apply Kees Cook
2014-06-26 12:37 ` David Drysdale [this message]
2014-06-27 18:45 ` Kees Cook
2014-06-23 21:58 ` [PATCH v7 3/9] seccomp: introduce writer locking Kees Cook
2014-06-24 16:52 ` Oleg Nesterov
2014-06-24 18:02 ` Kees Cook
2014-06-24 18:35 ` Oleg Nesterov
2014-06-24 20:26 ` Kees Cook
2014-06-24 18:30 ` Oleg Nesterov
2014-06-24 19:46 ` Kees Cook
2014-06-23 21:58 ` [PATCH v7 4/9] seccomp: move no_new_privs into seccomp Kees Cook
2014-06-24 19:18 ` Oleg Nesterov
2014-06-24 19:20 ` Andy Lutomirski
2014-06-24 19:30 ` Oleg Nesterov
2014-06-24 19:34 ` Andy Lutomirski
2014-06-24 19:50 ` Kees Cook
2014-06-24 19:51 ` Andy Lutomirski
2014-06-23 21:58 ` [PATCH v7 5/9] seccomp: split mode set routines Kees Cook
2014-06-23 21:58 ` [PATCH v7 6/9] seccomp: add "seccomp" syscall Kees Cook
2014-06-23 21:58 ` [PATCH v7 7/9] seccomp: implement SECCOMP_FILTER_FLAG_TSYNC Kees Cook
2014-06-24 17:08 ` Oleg Nesterov
2014-06-24 18:19 ` Kees Cook
2014-06-24 17:27 ` Oleg Nesterov
2014-06-24 18:05 ` Kees Cook
2014-06-24 18:37 ` Oleg Nesterov
2014-06-24 19:08 ` Kees Cook
2014-06-23 21:58 ` [PATCH v7 8/9] ARM: add seccomp syscall Kees Cook
2014-06-23 21:58 ` [PATCH v7 9/9] MIPS: " Kees Cook
2014-06-23 22:01 ` [PATCH v7 1/1] man-pages: seccomp.2: document syscall Kees Cook
2014-06-24 10:23 ` Michael Kerrisk (man-pages)
2014-06-24 16:43 ` Kees Cook
2014-06-24 17:48 ` [PATCH v7.1 " Kees Cook
2014-06-24 18:06 ` [PATCH v7 " Andy Lutomirski
2014-06-24 19:18 ` Kees Cook
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=20140626123710.GA16204@google.com \
--to=drysdale@google.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).