From patchwork Wed Dec 8 12:19:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 12695329 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4A8A6C433EF for ; Wed, 8 Dec 2021 12:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AEOMxp9Eby/ySOa1yyaowVoYYxZYzCsB7YLA8qSb+fI=; b=F3T24M1aRxgVWH Auph7nk6t8eHkYPVdI8gAipp2sr2N9rmczR92gBNu29+K7eBn6Mh1P4nYcu7RhF17IUOZtPzCC8Kd ag6f6ZjwXC6TAFbBhRtHG2UYrO+k9RmBrrkgJN66XVcJNfHpV4Go0fuH6ED/1+exdcEUxOxDYiZZw vFoCB6hijjdIDYz1UoBLCRThkfL89jq/h8Jor1hzfxo1uyM7ST74QOnbp6qvF5dEBJgdPMXdk69Se +tJtriqHgvu+sLuaa94TXpVZqCMEHCKDB82ObET9gwrsifWQC8TJiPdPQmFr1w4bsMCt26DWiWEgT DBzbgKI65qAfdEz0rdug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muvvk-00CRwO-Ti; Wed, 08 Dec 2021 12:20:17 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muvvQ-00CRra-9H for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 12:19:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DF1BBCE1FCF; Wed, 8 Dec 2021 12:19:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BEC0C341CA; Wed, 8 Dec 2021 12:19:49 +0000 (UTC) From: Catalin Marinas To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Luis Machado , John Baldwin , Arnd Bergmann , "Eric W. Biederman" , Kees Cook , Szabolcs Nagy , Andrew Morton Subject: [PATCH 2/5] elf: Introduce the ARM MTE ELF segment type Date: Wed, 8 Dec 2021 12:19:38 +0000 Message-Id: <20211208121941.494956-3-catalin.marinas@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211208121941.494956-1-catalin.marinas@arm.com> References: <20211208121941.494956-1-catalin.marinas@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_041956_550190_A99CE04B X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Memory tags will be dumped in the core file as segments with their own type. Discussions with the binutils and the generic ABI community settled on using new definitions in the PT_*PROC space (and to be documented in the processor-specific ABIs). Introduce PT_ARM_MEMTAG_MTE as (PT_LOPROC + 0x1). Not included in this patch since there is no upstream support but the CHERI/BSD community will also reserve: #define PT_ARM_MEMTAG_CHERI (PT_LOPROC + 0x2) #define PT_RISCV_MEMTAG_CHERI (PT_LOPROC + 0x3) Signed-off-by: Catalin Marinas Acked-by: Luis Machado --- include/uapi/linux/elf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 61bf4774b8f2..fe8e5b74cb39 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h @@ -40,6 +40,9 @@ typedef __s64 Elf64_Sxword; #define PT_GNU_STACK (PT_LOOS + 0x474e551) +/* ARM MTE memory tag segment type */ +#define PT_ARM_MEMTAG_MTE (PT_LOPROC + 0x1) + /* * Extended Numbering *