From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D08FBC5479D for ; Tue, 3 Jan 2023 21:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238354AbjACVgO (ORCPT ); Tue, 3 Jan 2023 16:36:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238116AbjACVgJ (ORCPT ); Tue, 3 Jan 2023 16:36:09 -0500 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99F1F12D19 for ; Tue, 3 Jan 2023 13:36:07 -0800 (PST) Received: from in01.mta.xmission.com ([166.70.13.51]:35338) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pCox2-00DQGM-KE; Tue, 03 Jan 2023 14:36:04 -0700 Received: from ip68-110-29-46.om.om.cox.net ([68.110.29.46]:38124 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pCox1-009hFk-GF; Tue, 03 Jan 2023 14:36:04 -0700 From: "Eric W. Biederman" To: Yann Sionneau Cc: Paul Moore , Eric Paris , Kees Cook , linux-audit@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Clement Leger References: <20230103164359.24347-1-ysionneau@kalray.eu> <20230103164359.24347-3-ysionneau@kalray.eu> Date: Tue, 03 Jan 2023 15:35:28 -0600 In-Reply-To: <20230103164359.24347-3-ysionneau@kalray.eu> (Yann Sionneau's message of "Tue, 3 Jan 2023 17:43:36 +0100") Message-ID: <875ydnmhcv.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1pCox1-009hFk-GF;;;mid=<875ydnmhcv.fsf@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.110.29.46;;;frm=ebiederm@xmission.com;;;spf=pass X-XM-AID: U2FsdGVkX18zTivb3taYGRDictjAGoI8aGmfYtFodes= X-SA-Exim-Connect-IP: 68.110.29.46 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [RFC PATCH 02/25] kvx: Add ELF-related definitions X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yann Sionneau writes: > Add ELF-related definitions for kvx, including: EM_KVX, > AUDIT_ARCH_KVX and NT_KVX_TCA. Has someone written an SYSVABI architecture specification for your architecture? I feel uncomfortable with the linux-kernel headers being the authoritative place for the ELF abi definitions. Especially since the linux kernel does not deal with relocations, and the kernel headers could diverge from the real world and no one would notice.. I know at least at one point the linux standards base was taking up the work on collecting up some of these definitions. I would be happy if there was anything outside of the linux kernel that people could refer too. Eric > CC: Paul Moore > CC: Eric Paris > CC: Eric Biederman > CC: Kees Cook > CC: linux-audit@redhat.com > CC: linux-kernel@vger.kernel.org > CC: linux-mm@kvack.org > Co-developed-by: Clement Leger > Signed-off-by: Clement Leger > Signed-off-by: Yann Sionneau > --- > include/uapi/linux/audit.h | 1 + > include/uapi/linux/elf-em.h | 1 + > include/uapi/linux/elf.h | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h > index d676ed2b246e..4db7aa3f84c7 100644 > --- a/include/uapi/linux/audit.h > +++ b/include/uapi/linux/audit.h > @@ -402,6 +402,7 @@ enum { > #define AUDIT_ARCH_HEXAGON (EM_HEXAGON) > #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) > #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) > +#define AUDIT_ARCH_KVX (EM_KVX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) > #define AUDIT_ARCH_M32R (EM_M32R) > #define AUDIT_ARCH_M68K (EM_68K) > #define AUDIT_ARCH_MICROBLAZE (EM_MICROBLAZE) > diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h > index ef38c2bc5ab7..9cc348be7f86 100644 > --- a/include/uapi/linux/elf-em.h > +++ b/include/uapi/linux/elf-em.h > @@ -51,6 +51,7 @@ > #define EM_RISCV 243 /* RISC-V */ > #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ > #define EM_CSKY 252 /* C-SKY */ > +#define EM_KVX 256 /* Kalray VLIW Architecture */ > #define EM_LOONGARCH 258 /* LoongArch */ > #define EM_FRV 0x5441 /* Fujitsu FR-V */ > > diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h > index c7b056af9ef0..49094f3be06c 100644 > --- a/include/uapi/linux/elf.h > +++ b/include/uapi/linux/elf.h > @@ -444,6 +444,7 @@ typedef struct elf64_shdr { > #define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */ > #define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */ > #define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */ > +#define NT_KVX_TCA 0x900 /* kvx TCA registers */ > > /* Note types with note name "GNU" */ > #define NT_GNU_PROPERTY_TYPE_0 5 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 819A6C4332F for ; Wed, 4 Jan 2023 14:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672841248; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XD+DQcHlY80/ZDZXep2fxQ93iCkJ7oLhvSL4JTj26LY=; b=XHW4nKNIL589/dUeFb0Ga1NFLV5h7+gZ6Vm8/pRC5S3++zoE7GBhKxWgNM5XN9bG/wUP8W Bppsy9qRNWvChV+wDnbILWF9uE6Rrmtg4gszfoatvZuM5Ro1OagseJDiqMgQD9ZbXYE1Jz tmX3cvTWjeRXVQoNcXzuDPi/wqZpmt0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-WgRY7zQvM2aHeJJrmv1UHQ-1; Wed, 04 Jan 2023 09:07:25 -0500 X-MC-Unique: WgRY7zQvM2aHeJJrmv1UHQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4764A2802E2D; Wed, 4 Jan 2023 14:07:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2523049BB6A; Wed, 4 Jan 2023 14:07:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5CFD6194706D; Wed, 4 Jan 2023 14:07:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6C9621946587 for ; Tue, 3 Jan 2023 22:59:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 516341121315; Tue, 3 Jan 2023 22:59:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4880E1121314 for ; Tue, 3 Jan 2023 22:59:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1774C29AA2C5 for ; Tue, 3 Jan 2023 22:59:30 +0000 (UTC) Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-42-cJ4yy5kCP1GihvdOom3g4g-1; Tue, 03 Jan 2023 17:59:28 -0500 X-MC-Unique: cJ4yy5kCP1GihvdOom3g4g-1 Received: from in01.mta.xmission.com ([166.70.13.51]:35338) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pCox2-00DQGM-KE; Tue, 03 Jan 2023 14:36:04 -0700 Received: from ip68-110-29-46.om.om.cox.net ([68.110.29.46]:38124 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pCox1-009hFk-GF; Tue, 03 Jan 2023 14:36:04 -0700 From: "Eric W. Biederman" To: Yann Sionneau References: <20230103164359.24347-1-ysionneau@kalray.eu> <20230103164359.24347-3-ysionneau@kalray.eu> Date: Tue, 03 Jan 2023 15:35:28 -0600 In-Reply-To: <20230103164359.24347-3-ysionneau@kalray.eu> (Yann Sionneau's message of "Tue, 3 Jan 2023 17:43:36 +0100") Message-ID: <875ydnmhcv.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-XM-SPF: eid=1pCox1-009hFk-GF; ; ; mid=<875ydnmhcv.fsf@email.froward.int.ebiederm.org>; ; ; hst=in01.mta.xmission.com; ; ; ip=68.110.29.46; ; ; frm=ebiederm@xmission.com; ; ; spf=pass X-XM-AID: U2FsdGVkX18zTivb3taYGRDictjAGoI8aGmfYtFodes= X-SA-Exim-Connect-IP: 68.110.29.46 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [RFC PATCH 02/25] kvx: Add ELF-related definitions X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mailman-Approved-At: Wed, 04 Jan 2023 14:07:19 +0000 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Eric Paris , linux-mm@kvack.org, linux-audit@redhat.com, Clement Leger , Kees Cook Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Yann Sionneau writes: > Add ELF-related definitions for kvx, including: EM_KVX, > AUDIT_ARCH_KVX and NT_KVX_TCA. Has someone written an SYSVABI architecture specification for your architecture? I feel uncomfortable with the linux-kernel headers being the authoritative place for the ELF abi definitions. Especially since the linux kernel does not deal with relocations, and the kernel headers could diverge from the real world and no one would notice.. I know at least at one point the linux standards base was taking up the work on collecting up some of these definitions. I would be happy if there was anything outside of the linux kernel that people could refer too. Eric > CC: Paul Moore > CC: Eric Paris > CC: Eric Biederman > CC: Kees Cook > CC: linux-audit@redhat.com > CC: linux-kernel@vger.kernel.org > CC: linux-mm@kvack.org > Co-developed-by: Clement Leger > Signed-off-by: Clement Leger > Signed-off-by: Yann Sionneau > --- > include/uapi/linux/audit.h | 1 + > include/uapi/linux/elf-em.h | 1 + > include/uapi/linux/elf.h | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h > index d676ed2b246e..4db7aa3f84c7 100644 > --- a/include/uapi/linux/audit.h > +++ b/include/uapi/linux/audit.h > @@ -402,6 +402,7 @@ enum { > #define AUDIT_ARCH_HEXAGON (EM_HEXAGON) > #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) > #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) > +#define AUDIT_ARCH_KVX (EM_KVX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) > #define AUDIT_ARCH_M32R (EM_M32R) > #define AUDIT_ARCH_M68K (EM_68K) > #define AUDIT_ARCH_MICROBLAZE (EM_MICROBLAZE) > diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h > index ef38c2bc5ab7..9cc348be7f86 100644 > --- a/include/uapi/linux/elf-em.h > +++ b/include/uapi/linux/elf-em.h > @@ -51,6 +51,7 @@ > #define EM_RISCV 243 /* RISC-V */ > #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ > #define EM_CSKY 252 /* C-SKY */ > +#define EM_KVX 256 /* Kalray VLIW Architecture */ > #define EM_LOONGARCH 258 /* LoongArch */ > #define EM_FRV 0x5441 /* Fujitsu FR-V */ > > diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h > index c7b056af9ef0..49094f3be06c 100644 > --- a/include/uapi/linux/elf.h > +++ b/include/uapi/linux/elf.h > @@ -444,6 +444,7 @@ typedef struct elf64_shdr { > #define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */ > #define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */ > #define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */ > +#define NT_KVX_TCA 0x900 /* kvx TCA registers */ > > /* Note types with note name "GNU" */ > #define NT_GNU_PROPERTY_TYPE_0 5 -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit