Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp263705imu; Thu, 8 Nov 2018 19:18:23 -0800 (PST) X-Google-Smtp-Source: AJdET5dQ7XilOezeYqn0PIo6++7r7WOy19ZHCJzuS43Ufge3pnXNPycNxVaQuNEUrxsNVP9yXgpt X-Received: by 2002:a62:b9b:: with SMTP id 27-v6mr4018593pfl.235.1541733503569; Thu, 08 Nov 2018 19:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541733503; cv=none; d=google.com; s=arc-20160816; b=KhZjUST5ge0gOyjV7OCh21PdKE92QfX2/Ogjs2X7ahOfNU3ABfQLfsj+wbsJ7m9alQ tPbB3YvDtJTEzHwg2W3lVff1iXK1HKnDcEfVm6L8GPZq3g7WRabr3YGwCCPUzS6MSE1q ZOKksX/Z7mNEgp1RqnwSg/nfFuDYRmfS3MOcJNr6kY7yCsC/esjHa4xxYfvqiceexdMS NWgrZbh7Kh11AN3rrEdmdhRUU/Pg4hoXAXa0T9IrzXrrohw5UTUDl+hTOPbaLVYCmsSp 2M5x5ODWxvucQoFD1kPF0AixkKuoyVcpI67pjiAesGgHXduDuhEAxbFPW7BVLwv/PHG4 p7bQ== 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:mail-followup-to:message-id:subject:cc:to:from:date; bh=hlId/YR+79HC+WACW0v6EMyNVCJi359hgv4JpRAwLcA=; b=Gr1xxTEOaU5YI42/Y+ZxX/GxLVb69sQvqnI9EHcsHwUTV3RuaX7X4GTnDl5mBG2qCo F7Py7HHf/BDnNMJHLkR0TXX8sanhFHGsYwJ6lcsUTfi1NYMg8MeJNq1U5s9XWzxHekd2 ++L2w6qdz9M4aK+uXGpNCDjwVf3FxbLdTyTMicsm9f0lwhsrdu+UiP4j8/faC8+GwdOc ZQGmoFCjLksQJXnGF0MmMkF8LLLqytHgweEuO4jSZHzdqJi7TBUIA1bBjbdCuy5kYCGo asyvQ715p3+0EMOZrJZp5kbXEMxBxsYGg3gQd9WAfHv20J6ur+uuohGG54cMr1QdRf4U XFZQ== 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 u64si5647055pgd.262.2018.11.08.19.18.08; Thu, 08 Nov 2018 19:18:23 -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 S1727836AbeKIMyn (ORCPT + 99 others); Fri, 9 Nov 2018 07:54:43 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:48476 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbeKIMyn (ORCPT ); Fri, 9 Nov 2018 07:54:43 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 8BB4372CC59; Fri, 9 Nov 2018 06:16:05 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 658B47CD1FF; Fri, 9 Nov 2018 06:16:05 +0300 (MSK) Date: Fri, 9 Nov 2018 06:16:05 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Vineet Gupta , Paul Moore , Eric Paris Cc: Elvira Khabirova , linux-snps-arc@lists.infradead.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 06/13] arc: define syscall_get_arch() Message-ID: <20181109031605.GF21511@altlinux.org> Mail-Followup-To: Andy Lutomirski , Vineet Gupta , Paul Moore , Eric Paris , Elvira Khabirova , linux-snps-arc@lists.infradead.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181109031303.GA20906@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 that use tracehook_report_syscall_entry() in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Signed-off-by: Dmitry V. Levin --- arch/arc/include/asm/syscall.h | 6 ++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arc/include/asm/syscall.h b/arch/arc/include/asm/syscall.h index 29de09804306..5662778a7411 100644 --- a/arch/arc/include/asm/syscall.h +++ b/arch/arc/include/asm/syscall.h @@ -9,6 +9,7 @@ #ifndef _ASM_ARC_SYSCALL_H #define _ASM_ARC_SYSCALL_H 1 +#include #include #include #include @@ -68,4 +69,9 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, } } +static inline int syscall_get_arch(void) +{ + return AUDIT_ARCH_ARC; +} + #endif diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 818ae690ab79..a7149ceb5b98 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -375,6 +375,7 @@ enum { #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_ARC (EM_ARC) #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARMEB (EM_ARM) #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) -- ldv