Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2014159imu; Sat, 10 Nov 2018 06:11:26 -0800 (PST) X-Google-Smtp-Source: AJdET5dKDo2K3vlNb4GIV5pq3D6huN6voAaFZtmk7nm9onsZmJWutbQZRtu9FV9H0PsNQ6fQuTUV X-Received: by 2002:a17:902:be0e:: with SMTP id r14-v6mr4354466pls.23.1541859086100; Sat, 10 Nov 2018 06:11:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541859086; cv=none; d=google.com; s=arc-20160816; b=eaf2MWFFcnNWRje11bljYbRikEXqbOXEvX/jtJHEgvIetnqT3XwyUxpQGXnZOwJ5WM A3xeVYbejOFTcff9MDpJxDPSgI4SHHpkATu2FfP8PisPTOqOHGEK3Hsa1aPVbjJBQ2+M 02Lz2nPLf/Y1CpEl4RjPn+dRqGrczQZwLAfn9e0K4gSAwRTlW/M1pPUfHVQhMF7qGgCm bONCUec7OI0OOS+2Epauxt3B8xvYXnDac19EA47IGO+ucXL5JRXXgv2FYsTlPTe8z+pd wJYeD1pCQ6a6pJJMpq9vAG+eGco+CU3qrnnt6j2r1/mBtP4XvO/0olz6b9kHuwdZl6ux XDew== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=A2wA+8eDp4fZXv4YqBGebNGEZcyGce88bVgdsS6z5FE=; b=KNwwIDjIe9CpFEYASyXkJug7WfGpwvpWTKb3Bilz1n4FrTICvfbVaRnMYFJFVg+aQF JkgkLuX7c5tn+hflNfy3erFS7G7NPQaDYc0jJpfID1uG1AANMKoaCvIpndZ+HDCEDeuz HZr/ELOvz+j6dqgu2ZsBY6ZdMBgb/4cQUzndxZJ+t0cXGRmcV1pxMfUxeswosHk+muSX 7glt0PF19KyRhZ5ph+TSyBQpT7MnSElyuvQqSDDfdGIMT3XRo7epvI0QT8MhN4Vq6tAw wz7QKwgirBayX6Q+5K/VAY3J1DqS/8C5mXRKOJIJXuMzsHZZ6qJNb50NXw9FBS88Xwjw 3FgQ== 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 k13-v6si11066622pgp.145.2018.11.10.06.11.10; Sat, 10 Nov 2018 06:11:26 -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 S1729129AbeKJXzL convert rfc822-to-8bit (ORCPT + 99 others); Sat, 10 Nov 2018 18:55:11 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:59546 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729013AbeKJXzL (ORCPT ); Sat, 10 Nov 2018 18: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 38C9372CC6B; Sat, 10 Nov 2018 17:10:01 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 00E587CD1FF; Sat, 10 Nov 2018 17:10:00 +0300 (MSK) Date: Sat, 10 Nov 2018 17:10:00 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Guan Xuetao Cc: Paul Moore , Eric Paris , Elvira Khabirova , linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 15/13] unicore32: define syscall_get_arch() Message-ID: <20181110140959.GB12698@altlinux.org> References: <20181107042751.3b519062@akathisia> <20181109031303.GA20906@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT 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 in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Signed-off-by: Dmitry V. Levin --- Apparently, we need to implement syscall_get_arch() on all architectures where linux/tracehook.h is compiled, not just those that use tracehook_report_syscall_entry(). This adds one more architecture to the initial list of 9 architectures where syscall_get_arch() has to be implemented. arch/unicore32/include/asm/syscall.h | 12 ++++++++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 13 insertions(+) create mode 100644 arch/unicore32/include/asm/syscall.h diff --git a/arch/unicore32/include/asm/syscall.h b/arch/unicore32/include/asm/syscall.h new file mode 100644 index 000000000000..3a6b885476b4 --- /dev/null +++ b/arch/unicore32/include/asm/syscall.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_UNICORE_SYSCALL_H +#define _ASM_UNICORE_SYSCALL_H + +#include + +static inline int syscall_get_arch(void) +{ + return AUDIT_ARCH_UNICORE; +} + +#endif /* _ASM_UNICORE_SYSCALL_H */ diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index c3127e6cde2c..904d713f6cdd 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -423,6 +423,7 @@ enum { #define AUDIT_ARCH_TILEGX (EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE) #define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE) #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_XTENSA (EM_XTENSA) -- ldv