Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1200693imu; Tue, 11 Dec 2018 14:41:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vjbyy8sun18Owckkv89Tco4tQ61mzmQ4cfwysYw8BwDsrwBgCDm28g5KG3JgCo0Ta6aNQh X-Received: by 2002:a62:8949:: with SMTP id v70mr17613867pfd.85.1544568116518; Tue, 11 Dec 2018 14:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544568116; cv=none; d=google.com; s=arc-20160816; b=j2WsgADHO8jBeCFFLwlHjP5oG2i8Qa/h1vq7upLIBJIrm4S1jrZb12pFuvc3ELbtot e5j4poQqZuMpRFENtgpltzRCurh8gfAIdB68xH1NtBEvowCHN3CJtWnmuB8+EKvzTonx v/iG08se6jmHZvx3rXkSbuLDSzKE8F78c+V7HcmGDJ0sMQI4vhy+KyEQEaA5KxbLvriY OuzJFY2o+woOrs/ajaq4kem60t27BfcETth+/TptBXO/eI/fhZUTqOYE6s3yGI8ENJTL xxi5pHTlYb3NeFhsYtLzhcz06uodHzwToJpyHDzVlSuxxQVV8cWZAMEz6Yw3lpXYUP2b MYhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=lIjnBq1xKIGPywuVdtXDYtMCw3w/9+sa7JfTqdeLWJU=; b=hDICUsgVIk1hWFjGvunFjSUIm7C3lCBZmgZdTpkuJGO3Gwi356hjsAcX63vc5xK0Fp PCHoVhY/UhafkyHcdw1g1h3J326yLHe6JwiXD/xYyQLEaDByAfW/yxY8Ar6hHoz05OPk xccJi3hHTsxjzUdDeM7jn20bB4YD4kXH9ysXvP9K7yspK327LJG9prQnLX0a/DpmqUWz 8UHY/nRRTkCNjOwqDGiVhN9bRC6Sne5XP//o6KGDxMZg5ecz8xrTLTBc+nXgbTzviaE0 UAUknM/BFyfmwgCwC1a8HzquUG95M26dEYng9VduaGNJovx1xDbYUHHYXAoCayjjiPe8 KdaA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q32si12458813pgm.410.2018.12.11.14.41.41; Tue, 11 Dec 2018 14:41:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726220AbeLKWkw (ORCPT + 99 others); Tue, 11 Dec 2018 17:40:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeLKWkw (ORCPT ); Tue, 11 Dec 2018 17:40:52 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD6545F; Tue, 11 Dec 2018 22:40:51 +0000 (UTC) Received: from ovpn-120-31.rdu2.redhat.com (ovpn-120-31.rdu2.redhat.com [10.10.120.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0D15600C9; Tue, 11 Dec 2018 22:40:33 +0000 (UTC) Message-ID: <32ecedb571206e462f2bc683219b8b8c349a1702.camel@redhat.com> Subject: Re: [PATCH v5 04/25] c6x: define syscall_get_arch() From: Mark Salter To: "Dmitry V. Levin" , Aurelien Jacquiot , Paul Moore , Eric Paris , Oleg Nesterov , Andy Lutomirski Cc: Elvira Khabirova , Eugene Syromyatnikov , linux-c6x-dev@linux-c6x.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Date: Tue, 11 Dec 2018 17:40:33 -0500 In-Reply-To: <20181210042912.GD6131@altlinux.org> References: <20181210042352.GA6092@altlinux.org> <20181210042912.GD6131@altlinux.org> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.2 (3.30.2-2.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 11 Dec 2018 22:40:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-12-10 at 07:29 +0300, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > in addition to already implemented syscall_get_nr(), > syscall_get_arguments(), syscall_get_error(), and > syscall_get_return_value() functions in order to extend the generic > ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Cc: Mark Salter > Cc: Aurelien Jacquiot > Cc: Paul Moore > Cc: Eric Paris > Cc: Oleg Nesterov > Cc: Andy Lutomirski > Cc: Elvira Khabirova > Cc: Eugene Syromyatnikov > Cc: linux-c6x-dev@linux-c6x.org > Cc: linux-audit@redhat.com > Signed-off-by: Dmitry V. Levin > --- > > Notes: > v5: added Cc > > 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) Acked-by: Mark Salter