From patchwork Mon Jul 22 09:41:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 13738581 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 514F1C3DA59 for ; Mon, 22 Jul 2024 09:43:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB4D16B0082; Mon, 22 Jul 2024 05:43:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A65716B0083; Mon, 22 Jul 2024 05:43:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92CF26B0085; Mon, 22 Jul 2024 05:43:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 74BE96B0082 for ; Mon, 22 Jul 2024 05:43:28 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E0A76816BA for ; Mon, 22 Jul 2024 09:43:27 +0000 (UTC) X-FDA: 82366900854.24.6983F97 Received: from smtpout42.security-mail.net (smtpout42.security-mail.net [85.31.212.42]) by imf14.hostedemail.com (Postfix) with ESMTP id AE352100011 for ; Mon, 22 Jul 2024 09:43:24 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kalrayinc.com header.s=sec-sig-email header.b=WmV+DRpn; spf=pass (imf14.hostedemail.com: domain of ysionneau@kalrayinc.com designates 85.31.212.42 as permitted sender) smtp.mailfrom=ysionneau@kalrayinc.com; dmarc=pass (policy=quarantine) header.from=kalrayinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721641383; h=from:from: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:dkim-signature; bh=xPMqrcQ0NsOAEg+XbvkcO6Xll0ovqdBEIm73/KpzX9M=; b=mfmtjvUmsrdNDgpPgu8jIGTyZqYeGReBNfJL2SGix3w95X/QW8HzpG4+TOAiDsDgofpd9m Dua0Rpul5KjDV5IqnB7eE0Pg9ORoOTXO0jjtkHhl31U4M4p/wQdz8/3V/3N5VOxCDi6ttU FmBy2DZcOZWxLHQVpdRHCs2ewn1SAjU= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kalrayinc.com header.s=sec-sig-email header.b=WmV+DRpn; spf=pass (imf14.hostedemail.com: domain of ysionneau@kalrayinc.com designates 85.31.212.42 as permitted sender) smtp.mailfrom=ysionneau@kalrayinc.com; dmarc=pass (policy=quarantine) header.from=kalrayinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721641383; a=rsa-sha256; cv=none; b=5auDvlTySGw/0ImomEZT7rCDly6sitbD+54i1uyc/hGg+Vml62g8245rUbt4yM/851tNYV jzvCN/SnGFGTd8Yq+gLRfe43eW3zYQ29JRvj2i8fpbyTZUxdVcp89UVLdwITY09J0P/VKv I9HM/Hi7v/7zNbs1rhKZOpec8zqa/bA= Received: from localhost (localhost [127.0.0.1]) by fx302.security-mail.net (Postfix) with ESMTP id A7F2680B1AE for ; Mon, 22 Jul 2024 11:43:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalrayinc.com; s=sec-sig-email; t=1721641402; bh=hBw3JMQA4zvpLtBy+6/1m/DQmJRkpxpnzq6/ZBHGrP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WmV+DRpnUUOg4D08q68w+Zh2MkHRv7p9UonTFtjGxBx4hag6W6dYFg3qLgKlMhWdL 2EGHbIwC1gpCDOjAyjaYWD8S59qy/HRhqRQ9DoSznovl1Pir7MmljvWDMa2vwEAlXH 7FkihZUcutlHxGVeXQBOVMH+lV2ZC1AdXB8n0mjc= Received: from fx302 (localhost [127.0.0.1]) by fx302.security-mail.net (Postfix) with ESMTP id 7F0E280AFDB; Mon, 22 Jul 2024 11:43:22 +0200 (CEST) Received: from srvsmtp.lin.mbt.kalray.eu (unknown [217.181.231.53]) by fx302.security-mail.net (Postfix) with ESMTPS id 6319480AE53; Mon, 22 Jul 2024 11:43:20 +0200 (CEST) Received: from junon.lan.kalrayinc.com (unknown [192.168.37.161]) by srvsmtp.lin.mbt.kalray.eu (Postfix) with ESMTPS id 2F44740317; Mon, 22 Jul 2024 11:43:20 +0200 (CEST) X-Secumail-id: From: ysionneau@kalrayinc.com To: linux-kernel@vger.kernel.org, Paul Moore , Eric Paris , Eric Biederman , Kees Cook Cc: Jonathan Borne , Julian Vetter , Yann Sionneau , Clement Leger , audit@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH v3 12/37] kvx: Add ELF-related definitions Date: Mon, 22 Jul 2024 11:41:23 +0200 Message-ID: <20240722094226.21602-13-ysionneau@kalrayinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240722094226.21602-1-ysionneau@kalrayinc.com> References: <20240722094226.21602-1-ysionneau@kalrayinc.com> MIME-Version: 1.0 X-ALTERMIMEV2_out: done X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AE352100011 X-Stat-Signature: sukoqf35pfstnfm5wodfuhn984mhnmmd X-HE-Tag: 1721641404-889909 X-HE-Meta: U2FsdGVkX1/EzLFJWhMY2LGeauO8o0/WWLdpQ3fOJhcGEoyVGtwpB7IpZTZH8hmjy+fUQ0IBsgMzs1r8s7QZ5VIfDrgQejUmRy4qGgAtgalZERsG+130oJvT2D3qYy/Bvt8TW9SnOmbxP0qw8BrcvXkPVpJO3xgL1VJx9FpDS/l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TBdO3RHk5otRBy7Vx3xVs3Vbk+uSC4GtezvKPZNwIwSeQMDqY2Drclju+Zj+kBJsoH4opaoR9S2vWiQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001064, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Yann Sionneau Add ELF-related definitions for kvx, including: EM_KVX, AUDIT_ARCH_KVX and NT_KVX_TCA. Co-developed-by: Clement Leger Signed-off-by: Clement Leger Signed-off-by: Yann Sionneau --- Notes: V2 -> V3: update NT_KVX_TCA register set number macro --- 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 d676ed2b246ec..4db7aa3f84c70 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 ef38c2bc5ab7a..9cc348be7f860 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 b54b313bcf073..2d4885f2e4995 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h @@ -448,6 +448,7 @@ typedef struct elf64_shdr { #define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */ #define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */ #define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */ +#define NT_KVX_TCA 0x902 /* kvx TCA registers */ #define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */ #define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */ #define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */