Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3437093imu; Mon, 19 Nov 2018 16:17:52 -0800 (PST) X-Google-Smtp-Source: AJdET5clTHz8Jqu6pHvtep7u6SWAenSPtzru3VjHDu0zagRrqlX9T2czVmYbTciFD+BAXZzkircW X-Received: by 2002:a62:4497:: with SMTP id m23-v6mr25216538pfi.189.1542673072818; Mon, 19 Nov 2018 16:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542673072; cv=none; d=google.com; s=arc-20160816; b=r6vJgrIv+LlF1wUbQiCjj64LchSx72Oe9i9FIsz2tDPELau+XaVzV1GskquZWourAk U8pwBlFJMmZBrx+StujgS+hg0HUyv15MjL11GEcGmxY5MWqCzr3PKNJuzDlvW3TU60Jt dgA0QbXhPTfTPr5ihoft/cCoLQSiObttwRDCvv9wmHD/t5x/9W0w5N+vq1oHeNqMQO/3 +pi3evlVCMPQ4Aqt9N/ICzBIIYk0ZV3atQhmdlRR/ZasGIj96YMKF/7wgBDFzN+pQzkc ATrWySUv6V30+TQdl72H9SQkgb6T/lCCkQ/M48b/AekUnik46XS5UfL4PvZt5Pm1ffdD zTJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=DemP72snyb0UhijeOjDt4D9cLG2gMVr4a4QI9Cj9Vc8=; b=TIiwhvbodE3GGHEd31BF8sVMtCagM2FQCUW44pcFHn4zQJDSBtn6fRg3uydmyTFhrZ iVBg55tDxkWbeK0Qn39XaSFnB5PzSKmy/6vqVez50Gq9+c9yvuOqR1zAsZ5q3WsDY4c1 8HW5iXRNGwGHK9ckDALuT0WZUwvnnVEPv5oGOavUuC94toqJcUXFhAZhYPnw6vHU5hXq 9m/iCxQoQfGIcUXtUR79h5semi6edKn2w1FMrqsJu0jYeZEMkui7k9bHcn1DpMaq+fXO oQiNoYA5/D9/HFKvBZmovN53BTuJOAf4iHhc4lDVOdp3xHACDpiShOSLNTcZRA7XEXN+ aqmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si40129805pgh.283.2018.11.19.16.17.38; Mon, 19 Nov 2018 16:17:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732388AbeKTKmp (ORCPT + 99 others); Tue, 20 Nov 2018 05:42:45 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:55672 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731789AbeKTKmo (ORCPT ); Tue, 20 Nov 2018 05:42:44 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id D6F1472CA5E; Tue, 20 Nov 2018 03:16:28 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id B3D277CD1FF; Tue, 20 Nov 2018 03:16:28 +0300 (MSK) Date: Tue, 20 Nov 2018 03:16:28 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Ley Foon Tan , Paul Moore , Eric Paris Cc: Elvira Khabirova , nios2-dev@lists.rocketboards.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/15] nios2: define syscall_get_arch() Message-ID: <20181120001628.GL11387@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120001128.GA11300@altlinux.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: unchanged since v1 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 #include #include @@ -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 b9ce3016e85b..205aa32d81ed 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -402,6 +402,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