Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3436761imu; Mon, 19 Nov 2018 16:17:31 -0800 (PST) X-Google-Smtp-Source: AJdET5ftNDe9wBteMtArQo/2lU/xOtfr78ygjSCizmWX5sPu48vzVUJ7AIm4XV0nchNdRq64foIi X-Received: by 2002:a62:11c7:: with SMTP id 68mr25114522pfr.21.1542673051538; Mon, 19 Nov 2018 16:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542673051; cv=none; d=google.com; s=arc-20160816; b=YqCc8jLueOWWx5yDdc4lzCaQ/pKLkA70OGFdrlBYM4BoCs0I6gUz8najV1HsRKLw6P b4jmR8+3BWT2IFhcfYvLAiRdSK4m1fNiSqYfBVVNPPz++QazHKWA+yl44dWjdf3b4nZX JpEsNl+367MmgrshuIkkBEy3lgnENvKoCkQ/wGMPGSH4Zeh/2/+yGoo4HNTZruTt98/9 2MHI5jMx32G9PW5lDAbfehoW8YES+GaH2dzQP1aUbG0x7jZNGDYrxntGTMBVrch5s5/u SRptPo5WDaZ8jvwxuanTIRFMkCxnFgdvjfeZQCndYzlSOzwF2i4YsHz9a560VCaUgUCI tnNQ== 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=XsUROzbHiNmcEzpLQ6tJRs1+7qn7N4l4ZuTuVYINrYo=; b=wrNTjucrPbIOkvt1JlCuizQoP+3K7V+aJZZL3zhY2vf6dygnH85gcFHxl5VGICf/Eu naP21TZW8HNp6oOYKMougrpt70aidh9YsndoRPI/cnzLIBwmO239qVXsUG3QWNQnVjpR wAz155eaAQMkNX/+dSJs4lQqh71XaxtjhupW8QLoKfpmIsRl6RNlc9rqltsa8DGOWq/9 oOclVBdt8vK8rm1dJrHjYYUez6/aV1dzgoLfjX4R9TJtQ/wwVvh8yHab1dYnfBr6+vh4 M3rHT8M++JswvtyxBlSJvIqwv4vEeMIUyX7rCb+wIQdrOAfX521BIy1ssPP5gQbXJPbs ePlg== 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 12-v6si21323459pfu.2.2018.11.19.16.17.17; Mon, 19 Nov 2018 16:17:31 -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 S1732358AbeKTKm3 (ORCPT + 99 others); Tue, 20 Nov 2018 05:42:29 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:55396 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbeKTKm3 (ORCPT ); Tue, 20 Nov 2018 05:42:29 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 310E172CA5E; Tue, 20 Nov 2018 03:16:13 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 266137CD1FF; Tue, 20 Nov 2018 03:16:13 +0300 (MSK) Date: Tue, 20 Nov 2018 03:16:13 +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 v2 10/15] hexagon: define syscall_get_arch() Message-ID: <20181120001612.GJ11387@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/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 d7fa1ba8dc82..421953fc2f13 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -386,6 +386,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