lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181120001701.GO11387@altlinux.org>
Date:   Tue, 20 Nov 2018 03:17:01 +0300
From:   "Dmitry V. Levin" <ldv@...linux.org>
To:     Andy Lutomirski <luto@...nel.org>,
        Max Filippov <jcmvbkbc@...il.com>,
        Chris Zankel <chris@...kel.net>,
        Paul Moore <paul@...l-moore.com>,
        Eric Paris <eparis@...hat.com>
Cc:     Elvira Khabirova <lineprinter@...linux.org>,
        linux-xtensa@...ux-xtensa.org, linux-audit@...hat.com,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 15/15] xtensa: define syscall_get_arch()

syscall_get_arch() is required to be implemented on all architectures
in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO
request.

Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
Acked-by: Max Filippov <jcmvbkbc@...il.com>
---
v2: added Acked-by to v1

 arch/xtensa/include/asm/syscall.h | 7 +++++++
 include/uapi/linux/audit.h        | 1 +
 2 files changed, 8 insertions(+)

diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
index 3673ff1f1bc5..84144567095a 100644
--- a/arch/xtensa/include/asm/syscall.h
+++ b/arch/xtensa/include/asm/syscall.h
@@ -8,6 +8,13 @@
  * Copyright (C) 2001 - 2007 Tensilica Inc.
  */
 
+#include <uapi/linux/audit.h>
+
+static inline int syscall_get_arch(void)
+{
+	return AUDIT_ARCH_XTENSA;
+}
+
 struct pt_regs;
 asmlinkage long xtensa_ptrace(long, long, long, long);
 asmlinkage long xtensa_sigreturn(struct pt_regs*);
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index b032748cb8ba..904d713f6cdd 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -425,6 +425,7 @@ enum {
 #define AUDIT_ARCH_TILEPRO	(EM_TILEPRO|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_UNICORE	(EM_UNICORE|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_X86_64	(EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_XTENSA	(EM_XTENSA)
 
 #define AUDIT_PERM_EXEC		1
 #define AUDIT_PERM_WRITE	2
-- 
ldv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ