Skip to content

Commit a43e664

Browse files
ldv-altpcmoore
authored andcommitted
c6x: define syscall_get_arch()
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by: Mark Salter <msalter@redhat.com> Acked-by: Paul Moore <paul@paul-moore.com> Cc: Elvira Khabirova <lineprinter@altlinux.org> Cc: Eugene Syromyatnikov <esyr@redhat.com> Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: linux-c6x-dev@linux-c6x.org Cc: linux-audit@redhat.com Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 67f2a8a commit a43e664

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎arch/c6x/include/asm/syscall.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef __ASM_C6X_SYSCALL_H
1212
#define __ASM_C6X_SYSCALL_H
1313

14+
#include <uapi/linux/audit.h>
1415
#include <linux/err.h>
1516
#include <linux/sched.h>
1617

@@ -120,4 +121,10 @@ static inline void syscall_set_arguments(struct task_struct *task,
120121
}
121122
}
122123

124+
static inline int syscall_get_arch(void)
125+
{
126+
return IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)
127+
? AUDIT_ARCH_C6XBE : AUDIT_ARCH_C6X;
128+
}
129+
123130
#endif /* __ASM_C6X_SYSCALLS_H */

‎include/uapi/linux/audit.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,8 @@ enum {
381381
#define AUDIT_ARCH_ARCV2BE (EM_ARCV2)
382382
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
383383
#define AUDIT_ARCH_ARMEB (EM_ARM)
384+
#define AUDIT_ARCH_C6X (EM_TI_C6000|__AUDIT_ARCH_LE)
385+
#define AUDIT_ARCH_C6XBE (EM_TI_C6000)
384386
#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
385387
#define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE)
386388
#define AUDIT_ARCH_FRV (EM_FRV)

0 commit comments

Comments
 (0)