Re: [PATCH 10/14] nios2: define syscall_get_arch()

From: Ley Foon Tan
Date: Fri Mar 01 2019 - 02:30:27 EST


On Wed, 2019-02-27 at 18:31 +0300, Dmitry V. Levin wrote:
> 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: Paul Moore <paul@xxxxxxxxxxxxxx>
> Cc: Elvira Khabirova <lineprinter@xxxxxxxxxxxx>
> Cc: Eugene Syromyatnikov <esyr@xxxxxxxxxx>
> Cc: Ley Foon Tan <lftan@xxxxxxxxxx>
> Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
> Cc: Andy Lutomirski <luto@xxxxxxxxxx>
> Cc: nios2-dev@xxxxxxxxxxxxxxxxxxxxxx
> Cc: linux-audit@xxxxxxxxxx
> Signed-off-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx>

Acked-by: Ley Foon Tan <ley.foon.tan@xxxxxxxxx>

Regards
Ley Foon

> ---
> ÂThis is just a gentle ping, the patch is unchanged.
>
> Âarch/nios2/include/asm/syscall.h | 6 ++++++
> Âinclude/uapi/linux/audit.hÂÂÂÂÂÂÂ| 1 +
> Â2 files changed, 7 insertions(+)
>
> diff --git a/arch/nios2/include/asm/syscall.h
> b/arch/nios2/include/asm/syscall.h
> index 9de220854c4a..cf35e210fc4d 100644
> --- a/arch/nios2/include/asm/syscall.h
> +++ b/arch/nios2/include/asm/syscall.h
> @@ -17,6 +17,7 @@
> Â#ifndef __ASM_NIOS2_SYSCALL_H__
> Â#define __ASM_NIOS2_SYSCALL_H__
>
> +#include <uapi/linux/audit.h>
> Â#include <linux/err.h>
> Â#include <linux/sched.h>
>
> @@ -135,4 +136,9 @@ static inline void syscall_set_arguments(struct
> task_struct *task,
> ÂÂÂÂÂÂÂÂ}
> Â}
>
> +static inline int syscall_get_arch(void)
> +{
> +ÂÂÂÂÂÂÂreturn AUDIT_ARCH_NIOS2;
> +}
> +
> Â#endif
> diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
> index 1568ddc1c945..efeb0bbd6c4d 100644
> --- a/include/uapi/linux/audit.h
> +++ b/include/uapi/linux/audit.h
> @@ -403,6 +403,7 @@ enum {
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__AUDIT_ARCH_CONVENTION_MIPS64_N32)
> Â#define AUDIT_ARCH_NDS32ÂÂÂÂÂÂÂ(EM_NDS32|__AUDIT_ARCH_LE)
> Â#define AUDIT_ARCH_NDS32BEÂÂÂÂÂ(EM_NDS32)
> +#define AUDIT_ARCH_NIOS2ÂÂÂÂÂÂÂ(EM_ALTERA_NIOS2|__AUDIT_ARCH_LE)
> Â#define AUDIT_ARCH_OPENRISCÂÂÂÂ(EM_OPENRISC)
> Â#define AUDIT_ARCH_PARISCÂÂÂÂÂÂ(EM_PARISC)
> Â#define AUDIT_ARCH_PARISC64ÂÂÂÂ(EM_PARISC|__AUDIT_ARCH_64BIT)
> --
> ldv
>
> ________________________________
>
> Confidentiality Notice.
> This message may contain information that is confidential or
> otherwise protected from disclosure. If you are not the intended
> recipient, you are hereby notified that any use, disclosure,
> dissemination, distribution, or copying of this message, or any
> attachments, is strictly prohibited. If you have received this
> message in error, please advise the sender by reply e-mail, and
> delete the message and any attachments. Thank you.