From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Jonas Bonn <jonas@southpole.se>,
Al Viro <viro@zeniv.linux.org.uk>, Eric Paris <eparis@redhat.com>,
Kees Cook <keescook@chromium.org>,
David Howells <dhowells@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
linux@openrisc.net
Subject: [PATCH] audit: define AUDIT_ARCH_OPENRISC
Date: Thu, 20 Sep 2012 15:46:06 -0700 [thread overview]
Message-ID: <20120920224605.GA896@www.outflux.net> (raw)
When using audit on OpenRISC, an audit arch is needed. This defines
it and fixes a compile-time bug uncovered in linux-next, likely from a
cut/paste from an arch with 64/32-bit modes that defined arch_arch():
arch/openrisc/kernel/ptrace.c:190:2: error: implicit declaration of function 'audit_arch'
This replaces it with the newly defined AUDIT_ARCH_OPENRISC, since it
is only 32-bit, and currently only operates in big-endian mode.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
arch/openrisc/kernel/ptrace.c | 2 +-
include/linux/audit.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
index e71781d..71a2a0c 100644
--- a/arch/openrisc/kernel/ptrace.c
+++ b/arch/openrisc/kernel/ptrace.c
@@ -187,7 +187,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;
- audit_syscall_entry(audit_arch(), regs->gpr[11],
+ audit_syscall_entry(AUDIT_ARCH_OPENRISC, regs->gpr[11],
regs->gpr[3], regs->gpr[4],
regs->gpr[5], regs->gpr[6]);
diff --git a/include/linux/audit.h b/include/linux/audit.h
index d3fe97a..df19592 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -337,6 +337,7 @@ enum {
#define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT)
#define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_OPENRISC (EM_OPENRISC)
#define AUDIT_ARCH_PARISC (EM_PARISC)
#define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
#define AUDIT_ARCH_PPC (EM_PPC)
--
1.7.0.4
--
Kees Cook
Chrome OS Security
next reply other threads:[~2012-09-20 22:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 22:46 Kees Cook [this message]
2012-09-21 6:26 ` Jonas Bonn
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=20120920224605.GA896@www.outflux.net \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=dhowells@redhat.com \
--cc=eparis@redhat.com \
--cc=jonas@southpole.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@openrisc.net \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®