All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: keescook@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com
Cc: dsaxena@linaro.org, arndb@arndb.de,
	linux-arm-kernel@lists.infradead.org,
	linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org,
	AKASHI Takahiro <takahiro.akashi@linaro.org>
Subject: [PATCH v6 0/6] arm64: add seccomp support
Date: Thu, 21 Aug 2014 17:56:39 +0900	[thread overview]
Message-ID: <1408611405-8943-1-git-send-email-takahiro.akashi@linaro.org> (raw)

This patch series enable secure computing (system call filtering) on arm64,
and contain related enhancements and bug fixes.

This code was tested on ARMv8 fast model with 64-bit/32-bit userspace
using
 * libseccomp v2.1.1 with modifications for arm64, especially its "live"
   tests: No.20, 21 and 24.
 * modified version of Kees' seccomp test for 'changing/skipping a syscall'
   and seccomp() system call
 * in-house tests for 'changing/skipping a system call' in tracing with
   ptrace(PTRACE_SYSCALL) (that is, without seccomp)'
with and without audit tracing.

Changes v5 -> v6:
* rebased to v3.17-rc
* changed the interface of changing/skipping a system call from re-writing
  x8 register [v5 1/3] to using dedicated PTRACE_SET_SYSCALL command
  [1/6, 2/6]
  Patch [1/6] contains a checkpatch error around a switch statement, but it
  won't be fixed as in compat_arch_ptrace().
* added a new system call, seccomp(), for compat task [4/6]
* added SIGSYS siginfo for compat task [5/6]
* changed to always execute audit exit tracing to avoid OOPs [2/6, 6/6]

Changes v4 -> v5:
* rebased to v3.16-rc
* add patch [1/3] to allow ptrace to change a system call
  (please note that this patch should be applied even without seccomp.)

Changes v3 -> v4:
* removed the following patch and moved it to "arm64: prerequisites for
  audit and ftrace" patchset since it is required for audit and ftrace in
  case of !COMPAT, too.
  "arm64: is_compat_task is defined both in asm/compat.h and linux/compat.h"

Changes v2 -> v3:
* removed unnecessary 'type cast' operations [2/3]
* check for a return value (-1) of secure_computing() explicitly [2/3]
* aligned with the patch, "arm64: split syscall_trace() into separate
  functions for enter/exit" [2/3]
* changed default of CONFIG_SECCOMP to n [2/3]

Changes v1 -> v2:
* added generic seccomp.h for arm64 to utilize it [1,2/3] 
* changed syscall_trace() to return more meaningful value (-EPERM)
  on seccomp failure case [2/3]
* aligned with the change in "arm64: make a single hook to syscall_trace()
  for all syscall features" v2 [2/3]
* removed is_compat_task() definition from compat.h [3/3]

AKASHI Takahiro (6):
  arm64: ptrace: add PTRACE_SET_SYSCALL
  arm64: ptrace: allow tracer to skip a system call
  asm-generic: add generic seccomp.h for secure computing mode 1
  arm64: add seccomp syscall for compat task
  arm64: add SIGSYS siginfo for compat task
  arm64: add seccomp support

 arch/arm64/Kconfig                   |   14 ++++++++++++
 arch/arm64/include/asm/compat.h      |    7 ++++++
 arch/arm64/include/asm/ptrace.h      |    9 ++++++++
 arch/arm64/include/asm/seccomp.h     |   25 ++++++++++++++++++++++
 arch/arm64/include/asm/unistd.h      |    5 ++++-
 arch/arm64/include/asm/unistd32.h    |    3 +++
 arch/arm64/include/uapi/asm/ptrace.h |    1 +
 arch/arm64/kernel/entry.S            |    6 ++++++
 arch/arm64/kernel/ptrace.c           |   39 +++++++++++++++++++++++++++++++++-
 arch/arm64/kernel/signal32.c         |    8 +++++++
 include/asm-generic/seccomp.h        |   28 ++++++++++++++++++++++++
 11 files changed, 143 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/include/asm/seccomp.h
 create mode 100644 include/asm-generic/seccomp.h

-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 0/6] arm64: add seccomp support
Date: Thu, 21 Aug 2014 17:56:39 +0900	[thread overview]
Message-ID: <1408611405-8943-1-git-send-email-takahiro.akashi@linaro.org> (raw)

This patch series enable secure computing (system call filtering) on arm64,
and contain related enhancements and bug fixes.

This code was tested on ARMv8 fast model with 64-bit/32-bit userspace
using
 * libseccomp v2.1.1 with modifications for arm64, especially its "live"
   tests: No.20, 21 and 24.
 * modified version of Kees' seccomp test for 'changing/skipping a syscall'
   and seccomp() system call
 * in-house tests for 'changing/skipping a system call' in tracing with
   ptrace(PTRACE_SYSCALL) (that is, without seccomp)'
with and without audit tracing.

Changes v5 -> v6:
* rebased to v3.17-rc
* changed the interface of changing/skipping a system call from re-writing
  x8 register [v5 1/3] to using dedicated PTRACE_SET_SYSCALL command
  [1/6, 2/6]
  Patch [1/6] contains a checkpatch error around a switch statement, but it
  won't be fixed as in compat_arch_ptrace().
* added a new system call, seccomp(), for compat task [4/6]
* added SIGSYS siginfo for compat task [5/6]
* changed to always execute audit exit tracing to avoid OOPs [2/6, 6/6]

Changes v4 -> v5:
* rebased to v3.16-rc
* add patch [1/3] to allow ptrace to change a system call
  (please note that this patch should be applied even without seccomp.)

Changes v3 -> v4:
* removed the following patch and moved it to "arm64: prerequisites for
  audit and ftrace" patchset since it is required for audit and ftrace in
  case of !COMPAT, too.
  "arm64: is_compat_task is defined both in asm/compat.h and linux/compat.h"

Changes v2 -> v3:
* removed unnecessary 'type cast' operations [2/3]
* check for a return value (-1) of secure_computing() explicitly [2/3]
* aligned with the patch, "arm64: split syscall_trace() into separate
  functions for enter/exit" [2/3]
* changed default of CONFIG_SECCOMP to n [2/3]

Changes v1 -> v2:
* added generic seccomp.h for arm64 to utilize it [1,2/3] 
* changed syscall_trace() to return more meaningful value (-EPERM)
  on seccomp failure case [2/3]
* aligned with the change in "arm64: make a single hook to syscall_trace()
  for all syscall features" v2 [2/3]
* removed is_compat_task() definition from compat.h [3/3]

AKASHI Takahiro (6):
  arm64: ptrace: add PTRACE_SET_SYSCALL
  arm64: ptrace: allow tracer to skip a system call
  asm-generic: add generic seccomp.h for secure computing mode 1
  arm64: add seccomp syscall for compat task
  arm64: add SIGSYS siginfo for compat task
  arm64: add seccomp support

 arch/arm64/Kconfig                   |   14 ++++++++++++
 arch/arm64/include/asm/compat.h      |    7 ++++++
 arch/arm64/include/asm/ptrace.h      |    9 ++++++++
 arch/arm64/include/asm/seccomp.h     |   25 ++++++++++++++++++++++
 arch/arm64/include/asm/unistd.h      |    5 ++++-
 arch/arm64/include/asm/unistd32.h    |    3 +++
 arch/arm64/include/uapi/asm/ptrace.h |    1 +
 arch/arm64/kernel/entry.S            |    6 ++++++
 arch/arm64/kernel/ptrace.c           |   39 +++++++++++++++++++++++++++++++++-
 arch/arm64/kernel/signal32.c         |    8 +++++++
 include/asm-generic/seccomp.h        |   28 ++++++++++++++++++++++++
 11 files changed, 143 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/include/asm/seccomp.h
 create mode 100644 include/asm-generic/seccomp.h

-- 
1.7.9.5

             reply	other threads:[~2014-08-21  8:57 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21  8:56 AKASHI Takahiro [this message]
2014-08-21  8:56 ` [PATCH v6 0/6] arm64: add seccomp support AKASHI Takahiro
2014-08-21  8:56 ` [PATCH v6 1/6] arm64: ptrace: add PTRACE_SET_SYSCALL AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro
2014-08-21 16:47   ` Kees Cook
2014-08-21 16:47     ` Kees Cook
2014-08-22  0:19     ` AKASHI Takahiro
2014-08-22  0:19       ` AKASHI Takahiro
2014-08-26 17:46       ` Will Deacon
2014-08-26 17:46         ` Will Deacon
2014-08-27  5:32         ` AKASHI Takahiro
2014-08-27  5:32           ` AKASHI Takahiro
2014-09-03 18:34           ` Kees Cook
2014-09-03 18:34             ` Kees Cook
2014-08-21  8:56 ` [PATCH v6 2/6] arm64: ptrace: allow tracer to skip a system call AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro
2014-08-21 17:08   ` Kees Cook
2014-08-21 17:08     ` Kees Cook
2014-08-22  0:35     ` AKASHI Takahiro
2014-08-22  0:35       ` AKASHI Takahiro
2014-08-26 17:51       ` Will Deacon
2014-08-26 17:51         ` Will Deacon
2014-08-27  5:55         ` AKASHI Takahiro
2014-08-27  5:55           ` AKASHI Takahiro
2014-09-01 11:37           ` Will Deacon
2014-09-01 11:37             ` Will Deacon
2014-09-02  7:58             ` AKASHI Takahiro
2014-09-02  7:58               ` AKASHI Takahiro
2014-09-01 11:47           ` Russell King - ARM Linux
2014-09-01 11:47             ` Russell King - ARM Linux
2014-09-02  8:47             ` AKASHI Takahiro
2014-09-02  8:47               ` AKASHI Takahiro
2014-09-02  9:16               ` Russell King - ARM Linux
2014-09-02  9:16                 ` Russell King - ARM Linux
2014-09-02  9:31                 ` Russell King - ARM Linux
2014-09-02  9:31                   ` Russell King - ARM Linux
2014-09-05 10:08                 ` AKASHI Takahiro
2014-09-05 10:08                   ` AKASHI Takahiro
2014-10-01 11:08         ` AKASHI Takahiro
2014-10-01 11:08           ` AKASHI Takahiro
2014-10-03 15:23           ` Will Deacon
2014-10-03 15:23             ` Will Deacon
2014-10-06  8:04             ` AKASHI Takahiro
2014-10-06  8:04               ` AKASHI Takahiro
2014-08-21  8:56 ` [PATCH v6 3/6] asm-generic: add generic seccomp.h for secure computing mode 1 AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro
2014-08-21 17:51   ` Kees Cook
2014-08-21 17:51     ` Kees Cook
2014-08-22  0:38     ` AKASHI Takahiro
2014-08-22  0:38       ` AKASHI Takahiro
2014-08-21  8:56 ` [PATCH v6 4/6] arm64: add seccomp syscall for compat task AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro
2014-08-21 17:52   ` Kees Cook
2014-08-21 17:52     ` Kees Cook
2014-08-22  0:39     ` AKASHI Takahiro
2014-08-22  0:39       ` AKASHI Takahiro
2014-08-26 17:53   ` Will Deacon
2014-08-26 17:53     ` Will Deacon
2014-08-27  5:57     ` AKASHI Takahiro
2014-08-27  5:57       ` AKASHI Takahiro
2014-08-21  8:56 ` [PATCH v6 5/6] arm64: add SIGSYS siginfo " AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro
2014-08-21 17:54   ` Kees Cook
2014-08-21 17:54     ` Kees Cook
2014-08-22  0:44     ` AKASHI Takahiro
2014-08-22  0:44       ` AKASHI Takahiro
2014-08-26 17:55   ` Will Deacon
2014-08-26 17:55     ` Will Deacon
2014-08-27  5:58     ` AKASHI Takahiro
2014-08-27  5:58       ` AKASHI Takahiro
2014-08-21  8:56 ` [PATCH v6 6/6] arm64: add seccomp support AKASHI Takahiro
2014-08-21  8:56   ` AKASHI Takahiro

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=1408611405-8943-1-git-send-email-takahiro.akashi@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=arndb@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=dsaxena@linaro.org \
    --cc=keescook@chromium.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.