Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp264854imu; Thu, 8 Nov 2018 19:19:59 -0800 (PST) X-Google-Smtp-Source: AJdET5c9Z/YuWlmeQSLtsqwRkaNz2NYqX06nNoPbQFkcOHh+rSNe+gOA1gswOk09ByjsNWcxoVeB X-Received: by 2002:a63:89c2:: with SMTP id v185mr5624226pgd.97.1541733599836; Thu, 08 Nov 2018 19:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541733599; cv=none; d=google.com; s=arc-20160816; b=XayYm378A3bSV4xZYluZF1T8mkZ83TMwEbDFh+cY9QTbV3SRjwT6stsWKjyAA31b/J WoBgjK4WLnFmRELYZzP4wvA1K+Rwa0jWxmVVa9HGT4IEXKya58W6PpB/uxUfh9Jpaewf 4GURBYVdfGy8QDJpdf2mdpkcKsgqEiAsQBIwMaJYoUif1JzLDCfQp3eZ631WoJhl2kBc 5JkDIq3Xs18uZUkeESoJ5eBrWWDkiREaIIpqlWABFmDCpfCw4HqwGj8zEa6jPrXLcYCg D81DNZ9VOSDTZiX53XAYu+D9gQxBaOMRSeBzLkWqatnxT2wQ/lrzNajby5Leh9GbEJi6 VWFw== 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=rQ2a5T95rCvWluOC5AcwKEc2O2mOF778Q/N3pb9l3GQ=; b=EdlI6sviGCPLww3GntKTG4LBFU3HlEoxklNbUwNkCCHxWS1MuiF08oHxbzGuL/s444 Ubc60bxYZmdwc5hc2Czcdg4STAH8woLwrgQc80CQAgmv8D+Z9y/VG8ranx+VQOiDURJw fUHp2N0NbCTE4zOtLZu9vXfAjM+Rg0hsxgEjJVwkB0uf2B2s3n5qLm/s4Mt9ltgq2Z1o mjRLZmCgdkrANF9iLy6J3StWnhVfKM6U8mtg3/xvGixpdfYWrqSoeVBDu53j/esFSiqL bZeSj8nI6BfziLgTNdAM7q9XA1cZ7/1vB9Fq3j7TB3nY3g6ODwvEt2SuzuOqypAXj/HN 4Dhg== 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 b76-v6si6911271pfb.89.2018.11.08.19.19.44; Thu, 08 Nov 2018 19:19:59 -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 S1727751AbeKIM4J (ORCPT + 99 others); Fri, 9 Nov 2018 07:56:09 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:50650 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727362AbeKIM4J (ORCPT ); Fri, 9 Nov 2018 07:56:09 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 06AA372CC59; Fri, 9 Nov 2018 06:17:31 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id F22687CD1FF; Fri, 9 Nov 2018 06:17:30 +0300 (MSK) Date: Fri, 9 Nov 2018 06:17:30 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Chris Zankel , Max Filippov , Paul Moore , Eric Paris Cc: Elvira Khabirova , linux-xtensa@linux-xtensa.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 13/13] xtensa: define syscall_get_arch() Message-ID: <20181109031730.GM21511@altlinux.org> Mail-Followup-To: Andy Lutomirski , Chris Zankel , Max Filippov , Paul Moore , Eric Paris , Elvira Khabirova , linux-xtensa@linux-xtensa.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/xtensa/include/asm/syscall.h | 7 +++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 8 insertions(+) diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index 3673ff1f1bc5..84144567095a 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h @@ -8,6 +8,13 @@ * Copyright (C) 2001 - 2007 Tensilica Inc. */ +#include + +static inline int syscall_get_arch(void) +{ + return AUDIT_ARCH_XTENSA; +} + struct pt_regs; asmlinkage long xtensa_ptrace(long, long, long, long); asmlinkage long xtensa_sigreturn(struct pt_regs*); diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index ad4105c602a1..28102e1430fa 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -418,6 +418,7 @@ enum { #define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE) #define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE) #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_XTENSA (EM_XTENSA) #define AUDIT_PERM_EXEC 1 #define AUDIT_PERM_WRITE 2 -- ldv