Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp264194imu; Thu, 8 Nov 2018 19:19:04 -0800 (PST) X-Google-Smtp-Source: AJdET5cz/nQySCbPB+0eloJA5DjS2K8Uu0gLc3AL9kAtta3yag4L4oN+/9f19+ZU/OYXpcr6Nwtf X-Received: by 2002:a62:20c1:: with SMTP id m62-v6mr7548634pfj.111.1541733544355; Thu, 08 Nov 2018 19:19:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541733544; cv=none; d=google.com; s=arc-20160816; b=xH+39zk9H6oFIuMLRjtIU5JYgRbVG7FaNGIrIRxPZFULAClMDL7OTIfhlJjWWBAwyS muScpZWbnBSJgm6J1z4+AAs2+8OdNCE8XkbRuAgCUtRrNoMhRM0GMJpKkz+ddes0VJCY qcBDHtah1hW4xvCPbc4UmvWAQxXadtGj7G02oRBq8/5BGTVdz5os4VoQLAw4pi8EslS2 31FG1xCM0zkXvx+O7OuofgsIbRFFlQ1qi2SAbb7sQRN36VBY0TiZ+n4RT1t42U8MonsG gxW4Dmukq8FX/Js8z/zgi0ljjQzhBnFB27cKXkYhI0Q7WydPFvaVVQgPL+4XzQmheEeT F5Zw== 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=3PRCloeWO+kD2LYxhIOff3GQR8ZLyvivZq3AHgcSh8A=; b=GHLCK43Tsi65CXEN+3rH8vXaXd3hgBM9+9P6BDVJq4294UOvEcKpTdzBogapIXa4/k utu+5URIZ3splYd43607JMVv0Dh3YmGxXS5womzLjrH1pTvxLr+PhyCn9tY95zEy3myN /VL0t9fPpEBo1Zxj7D4L6Z0jbuTbZq/SykjJXK5p+bbb+W8mpLt81aw1Hx+gxQaU4gXc Qn5DBJyAg+4umQCXcVLKrJOz1XMDwWVNClYsNCBK4X1R88T5JTVVp1eXhf/Md6bC0kN7 ++r2QUyf1SmTf1Eo0q0d8NHCoFU5WvXf37jT5bGR7EBDsypVVtg+Co1qX1LAHKNYWEEt G4Rw== 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 r18si5383645pgo.9.2018.11.08.19.18.48; Thu, 08 Nov 2018 19:19:04 -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 S1727972AbeKIMzL (ORCPT + 99 others); Fri, 9 Nov 2018 07:55:11 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:49212 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbeKIMzL (ORCPT ); Fri, 9 Nov 2018 07:55:11 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 742C572CC6B; Fri, 9 Nov 2018 06:16:31 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 6752F7CD1FF; Fri, 9 Nov 2018 06:16:31 +0300 (MSK) Date: Fri, 9 Nov 2018 06:16:31 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Richard Kuo , Paul Moore , Eric Paris Cc: Elvira Khabirova , linux-hexagon@vger.kernel.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 09/13] hexagon: define syscall_get_arch() Message-ID: <20181109031631.GI21511@altlinux.org> Mail-Followup-To: Andy Lutomirski , Richard Kuo , Paul Moore , Eric Paris , Elvira Khabirova , linux-hexagon@vger.kernel.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/hexagon/include/asm/syscall.h | 8 ++++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 9 insertions(+) diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h index 4af9c7b6f13a..de3917aad3fd 100644 --- a/arch/hexagon/include/asm/syscall.h +++ b/arch/hexagon/include/asm/syscall.h @@ -21,6 +21,8 @@ #ifndef _ASM_HEXAGON_SYSCALL_H #define _ASM_HEXAGON_SYSCALL_H +#include + typedef long (*syscall_fn)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); @@ -43,4 +45,10 @@ static inline void syscall_get_arguments(struct task_struct *task, BUG_ON(i + n > 6); memcpy(args, &(®s->r00)[i], n * sizeof(args[0])); } + +static inline int syscall_get_arch(void) +{ + return AUDIT_ARCH_HEXAGON; +} + #endif diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 2319283f00e5..d5a4f623e47e 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -382,6 +382,7 @@ enum { #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) #define AUDIT_ARCH_FRV (EM_FRV) #define AUDIT_ARCH_H8300 (EM_H8_300) +#define AUDIT_ARCH_HEXAGON (EM_HEXAGON) #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_M32R (EM_M32R) -- ldv