From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>, Will Drewry <wad@chromium.org>,
Geremy Condra <gcondra@google.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Kees Cook <keescook@chromium.org>
Subject: [PATCH 1/4] arch/arm: add syscall_get_arch
Date: Thu, 1 Nov 2012 12:46:36 -0700 [thread overview]
Message-ID: <1351799199-6853-2-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1351799199-6853-1-git-send-email-keescook@chromium.org>
From: Will Drewry <wad@chromium.org>
Provide an ARM implementation of syscall_get_arch. This is a pre-requisite
for CONFIG_HAVE_ARCH_SECCOMP_FILTER.
Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
arch/arm/include/asm/syscall.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h
index 9fdded6..803f433 100644
--- a/arch/arm/include/asm/syscall.h
+++ b/arch/arm/include/asm/syscall.h
@@ -7,6 +7,8 @@
#ifndef _ASM_ARM_SYSCALL_H
#define _ASM_ARM_SYSCALL_H
+#include <linux/audit.h> /* for AUDIT_ARCH_* */
+#include <linux/elf.h> /* for ELF_EM */
#include <linux/err.h>
#include <linux/sched.h>
@@ -95,4 +97,15 @@ static inline void syscall_set_arguments(struct task_struct *task,
memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0]));
}
+static inline int syscall_get_arch(struct task_struct *task,
+ struct pt_regs *regs)
+{
+ /* ARM tasks don't change audit architectures on the fly. */
+#ifdef __ARMEB__
+ return AUDIT_ARCH_ARMEB;
+#else
+ return AUDIT_ARCH_ARM;
+#endif
+}
+
#endif /* _ASM_ARM_SYSCALL_H */
--
1.7.9.5
next prev parent reply other threads:[~2012-11-01 19:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 19:46 [PATCH v2 0/4] arch/arm: support seccomp Kees Cook
2012-11-01 19:46 ` Kees Cook [this message]
2012-11-01 19:46 ` [PATCH 2/4] arch/arm: move secure_computing into trace Kees Cook
2012-11-01 20:33 ` Russell King - ARM Linux
2012-11-01 20:50 ` Kees Cook
2012-11-01 19:46 ` [PATCH 3/4] arch/arm: allow a scno of -1 to not cause a SIGILL Kees Cook
2012-11-01 20:25 ` Russell King - ARM Linux
2012-11-01 21:51 ` Kees Cook
2012-11-01 19:46 ` [PATCH 4/4] arch/arm: select HAVE_ARCH_SECCOMP_FILTER Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2012-11-10 22:44 [PATCH v5 0/4] arch/arm: support seccomp Kees Cook
2012-11-10 22:44 ` [PATCH 1/4] arch/arm: add syscall_get_arch Kees Cook
2012-11-08 20:59 [PATCH v4 0/4] arch/arm: support seccomp Kees Cook
2012-11-08 20:59 ` [PATCH 1/4] arch/arm: add syscall_get_arch Kees Cook
2012-11-02 0:14 [PATCH v3 0/4] arch/arm: support seccomp Kees Cook
2012-11-02 0:14 ` [PATCH 1/4] arch/arm: add syscall_get_arch Kees Cook
2012-11-05 13:29 ` Will Deacon
2012-10-30 0:41 [PATCH 0/4] arch/arm: support seccomp Kees Cook
2012-10-30 0:41 ` [PATCH 1/4] arch/arm: add syscall_get_arch 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=1351799199-6853-2-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=catalin.marinas@arm.com \
--cc=gcondra@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=viro@zeniv.linux.org.uk \
--cc=wad@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome