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


Groups > linux.kernel > #1576197

Re: [PATCH v2 4/4] seccomp: Add tests for SECCOMP_RET_LOG

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/4] seccomp: Add tests for SECCOMP_RET_LOG
Date 2017-02-08 01:50 +0100
Message-ID <t8oCl-1zo-5@gated-at.bofh.it> (permalink)
References <t6ELf-5LJ-1@gated-at.bofh.it> <t6ELf-5LJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 2, 2017 at 9:37 PM, Tyler Hicks <tyhicks@canonical.com> wrote:
> Extend the kernel selftests for seccomp to test the newly added
> SECCOMP_RET_LOG action. The added tests follow the example of existing
> tests.
>
> Unfortunately, the tests are not capable of inspecting the audit log to
> verify that the syscall was logged.
>
> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
> ---
>  tools/testing/selftests/seccomp/seccomp_bpf.c | 94 +++++++++++++++++++++++++++
>  1 file changed, 94 insertions(+)
>
> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
> index 03f1fa4..a39f620 100644
> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> @@ -87,6 +87,10 @@ struct seccomp_data {
>  };
>  #endif
>
> +#ifndef SECCOMP_RET_LOG
> +#define SECCOMP_RET_LOG       0x7ffe0000U /* allow after logging */

Except changing this to match my suggested tweak, this all looks
great. (Though it would be fun to find a clean way to actually examine
the dmesg buffer...)

-Kees

-- 
Kees Cook
Pixel Security

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


Thread

[PATCH v2 0/4] Improved seccomp logging Tyler Hicks <tyhicks@canonical.com> - 2017-02-03 06:40 +0100
  [PATCH v2 3/4] seccomp: Create an action to log before allowing Tyler Hicks <tyhicks@canonical.com> - 2017-02-03 06:40 +0100
    Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing Kees Cook <keescook@chromium.org> - 2017-02-08 01:40 +0100
      Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing Kees Cook <keescook@chromium.org> - 2017-02-09 23:00 +0100
      Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing Kees Cook <keescook@chromium.org> - 2017-02-11 01:20 +0100
        Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing Tyler Hicks <tyhicks@canonical.com> - 2017-02-11 01:20 +0100
      Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing Tyler Hicks <tyhicks@canonical.com> - 2017-02-11 01:20 +0100
  [PATCH v2 2/4] seccomp: Add sysctl to configure actions that should be logged Tyler Hicks <tyhicks@canonical.com> - 2017-02-03 06:40 +0100
    Re: [PATCH v2 2/4] seccomp: Add sysctl to configure actions that  should be logged Kees Cook <keescook@chromium.org> - 2017-02-08 01:40 +0100
      Re: [PATCH v2 2/4] seccomp: Add sysctl to configure actions that  should be logged Tyler Hicks <tyhicks@canonical.com> - 2017-02-11 01:00 +0100
        Re: [PATCH v2 2/4] seccomp: Add sysctl to configure actions that  should be logged Kees Cook <keescook@chromium.org> - 2017-02-11 01:10 +0100
  [PATCH v2 1/4] seccomp: Add sysctl to display available actions Tyler Hicks <tyhicks@canonical.com> - 2017-02-03 06:40 +0100
    Re: [PATCH v2 1/4] seccomp: Add sysctl to display available actions Kees Cook <keescook@chromium.org> - 2017-02-08 01:10 +0100
      Re: [PATCH v2 1/4] seccomp: Add sysctl to display available actions Tyler Hicks <tyhicks@canonical.com> - 2017-02-08 01:50 +0100
        Re: [PATCH v2 1/4] seccomp: Add sysctl to display available actions Kees Cook <keescook@chromium.org> - 2017-02-08 01:50 +0100
  [PATCH v2 4/4] seccomp: Add tests for SECCOMP_RET_LOG Tyler Hicks <tyhicks@canonical.com> - 2017-02-03 06:40 +0100
    Re: [PATCH v2 4/4] seccomp: Add tests for SECCOMP_RET_LOG Kees Cook <keescook@chromium.org> - 2017-02-08 01:50 +0100
  Re: [PATCH v2 0/4] Improved seccomp logging Kees Cook <keescook@chromium.org> - 2017-02-08 01:00 +0100

csiph-web