Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp76461imu; Mon, 19 Nov 2018 18:05:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/XXXsZA7zZaGYZw4+kS9YEPegMRivgnbYlSi54Kbz9gTWhlUlAzHXse2Y62XCoeWiuNn2/W X-Received: by 2002:a63:a30a:: with SMTP id s10mr133126pge.234.1542679500062; Mon, 19 Nov 2018 18:05:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542679500; cv=none; d=google.com; s=arc-20160816; b=Bl77h6onMJBA+p90H7VSpbvLcASQsE5cfLuASWIvlRYWRqbMbkAD0DnHhS9n0fiCwm Q5mE/iut7NpQE4P7jQK57YQmYscQURKiL6gytYVIobRzVCYY/xCa+Yz3K76eHtIDJ4r0 8MaetK14X9b9w1JRrASzb5t0tHukqxrngS4/Y+DNj5+9kB0trUFTiNxGx44yi731sriV rJGiMVVKd/RhXJxITtwjpDqBH69zrVXpzgJcdnWKwCa2Y0QEImKGAr3dtds21cx3byRX ppM3EHcj2CuCeoAF1ertKcnIqsgSuCsT54y/SSP+f2mdHiIXhuUpozX4fNkIp/ApMoZa g9oA== 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=0pvzZp6ObHxn41R4D3x/5xdxT1cbYojXqgZf7hhosdI=; b=GWMdinEkKqNBWmbc+kzueG9OmH4Kh5tbtd2jTdSbvIdkduZFVMFdzOu8tgJUwkQcvy LhWyRu9yGnBghfFa1usOL9LeyGcYbV8Nr3EVZkx3UerC/7w1Nznl7NhkmGIB5k3nzaUU 2aNry486WjuDFxNSt93obaXmQ1OxwuU7Ec+8uvU9D+G+gv/ZgDiU8btXZVGLynk9K6wO nhjfX3u3UxNZLFqxX+Qc/y4Tqlw/SD06ZG/Bo7KF8TQnr4gELA3VYsW2euTK7e02mC0L Q3eREzlHvDmR55V3tkRsleS2MUpDuUinQP8xCigEnDgqQB8PFaQMUxeD8d+dCoBdL45T IgfQ== 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 k5si24139965pfj.153.2018.11.19.18.04.45; Mon, 19 Nov 2018 18:05:00 -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 S1732343AbeKTKmO (ORCPT + 99 others); Tue, 20 Nov 2018 05:42:14 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:54994 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731074AbeKTKmN (ORCPT ); Tue, 20 Nov 2018 05:42:13 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id A870F72CA65; Tue, 20 Nov 2018 03:15:58 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 7F44B7CD1FF; Tue, 20 Nov 2018 03:15:58 +0300 (MSK) Date: Tue, 20 Nov 2018 03:15:58 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Mark Salter , Aurelien Jacquiot , Paul Moore , Eric Paris Cc: Elvira Khabirova , linux-c6x-dev@linux-c6x.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/15] c6x: define syscall_get_arch() Message-ID: <20181120001558.GH11387@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 [PATCH 07/13 v2] arch/c6x/include/asm/syscall.h | 7 +++++++ include/uapi/linux/audit.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/arch/c6x/include/asm/syscall.h b/arch/c6x/include/asm/syscall.h index ae2be315ee9c..39dbd1ef994c 100644 --- a/arch/c6x/include/asm/syscall.h +++ b/arch/c6x/include/asm/syscall.h @@ -11,6 +11,7 @@ #ifndef __ASM_C6X_SYSCALL_H #define __ASM_C6X_SYSCALL_H +#include #include #include @@ -120,4 +121,10 @@ static inline void syscall_set_arguments(struct task_struct *task, } } +static inline int syscall_get_arch(void) +{ + return IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) + ? AUDIT_ARCH_C6XBE : AUDIT_ARCH_C6X; +} + #endif /* __ASM_C6X_SYSCALLS_H */ diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index bedf3bf54c3a..72aeea0a740d 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -381,6 +381,8 @@ enum { #define AUDIT_ARCH_ARCV2BE (EM_ARCV2) #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARMEB (EM_ARM) +#define AUDIT_ARCH_C6X (EM_TI_C6000|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_C6XBE (EM_TI_C6000) #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) #define AUDIT_ARCH_FRV (EM_FRV) #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) -- ldv