From patchwork Fri Nov 9 03:16:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 995290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ptwu/Cy5"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="FxuvVdpi"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rlfv6GVqz9sB7 for ; Fri, 9 Nov 2018 14:16:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=WUyWCzh+oQBG0PACT7OyYCKRt/NHgKjui5j2E+cO7vo=; b=Ptwu/Cy5BHT+Pe NU4qCwXA/2b8MAhRmR4EJqZLimtesbjxFMrI1X3/MNV8RDUY5OB+RHg6X72BZyjGJwo2+bSInG8gj cHcJag6n7W0orLRulruE+jmqH8u17NN5cFDez5kD3Qsz2ha1XXzIQxg/5cIJn1H+z1jZVQX1ngIr5 ULIRufwDUJCDNea85ak9Fg0KCYaoA3lk5Zk8Anlw7eGO6PjALDIBnKaTE6oqFqOv1YKYPB3tUZ1Lh 84NgnU34uIRS49c1C1HFV2TfJtKGgc44jiWR3fNuU3tWJqkh1MXzav4I7uqZMJS5B33zCAHe6vBnq 6JC2Z7RYae/elyRDxDvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKxHQ-00028W-Gd; Fri, 09 Nov 2018 03:16:20 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKxHO-00028Q-SQ for linux-snps-arc@bombadil.infradead.org; Fri, 09 Nov 2018 03:16:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hlId/YR+79HC+WACW0v6EMyNVCJi359hgv4JpRAwLcA=; b=FxuvVdpifJq0kZVmDJL2PBcrYY r2l470MmoqjxmRiYgBLYNCgp49InKTvyU6zwRH2xI3TTnXjaKpWtOah7vNm/gQgdrS7S1WI34sLt5 vkkBn6VPbLdQwwITzp9xXzwVTHQyX0XQ7omgf83PxzAhkysO1Y3VXKGqFqWoSRSp3tO9Fs0C5tSbH ISYdqy8lvHawplLttq0AN/yQzkKK8yiO06ejGL/QftwdkPlAc+Re30bubLfRuyguweUvvhT3w7dLL xIQ2o9prjhpZMdYZD+Cu1t/w4Fpb8PIpU5U8lvsKqFIXgfGnaSETfMKPRkIVdqzvftmkUENpmebpl RJ3lXfCg==; Received: from vmicros1.altlinux.org ([194.107.17.57]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKxHM-0000Qa-EB for linux-snps-arc@lists.infradead.org; Fri, 09 Nov 2018 03:16:17 +0000 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 8BB4372CC59; Fri, 9 Nov 2018 06:16:05 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 658B47CD1FF; Fri, 9 Nov 2018 06:16:05 +0300 (MSK) Date: Fri, 9 Nov 2018 06:16:05 +0300 From: "Dmitry V. Levin" To: Andy Lutomirski , Vineet Gupta , Paul Moore , Eric Paris Subject: [PATCH 06/13] arc: define syscall_get_arch() Message-ID: <20181109031605.GF21511@altlinux.org> Mail-Followup-To: Andy Lutomirski , Vineet Gupta , Paul Moore , Eric Paris , Elvira Khabirova , linux-snps-arc@lists.infradead.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181109031303.GA20906@altlinux.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_221616_624252_B79509EC X-CRM114-Status: UNSURE ( 8.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Elvira Khabirova , linux-kernel@vger.kernel.org, linux-audit@redhat.com Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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/arc/include/asm/syscall.h | 6 ++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arc/include/asm/syscall.h b/arch/arc/include/asm/syscall.h index 29de09804306..5662778a7411 100644 --- a/arch/arc/include/asm/syscall.h +++ b/arch/arc/include/asm/syscall.h @@ -9,6 +9,7 @@ #ifndef _ASM_ARC_SYSCALL_H #define _ASM_ARC_SYSCALL_H 1 +#include #include #include #include @@ -68,4 +69,9 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, } } +static inline int syscall_get_arch(void) +{ + return AUDIT_ARCH_ARC; +} + #endif diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 818ae690ab79..a7149ceb5b98 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -375,6 +375,7 @@ enum { #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_ARC (EM_ARC) #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARMEB (EM_ARM) #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)