From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 4064B385840C for ; Mon, 6 Jun 2022 11:00:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4064B385840C Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3EAB23A; Mon, 6 Jun 2022 04:00:40 -0700 (PDT) Received: from [10.2.79.23] (unknown [10.2.79.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E47913F73B; Mon, 6 Jun 2022 04:00:39 -0700 (PDT) Message-ID: <00728f04-2b84-13a3-2ebb-34f5953d28a5@foss.arm.com> Date: Mon, 6 Jun 2022 12:00:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: .eh_frame augmentation character for MTE stack tagging Content-Language: en-GB To: Florian Mayer , gcc@gcc.gnu.org Cc: Fangrui Song , Evgenii Stepanov References: From: Richard Earnshaw In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3492.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 11:00:43 -0000 On 04/06/2022 00:52, Florian Mayer via Gcc wrote: > Hey! > > We are in the process of implementing MTE (Memory Tagging Extension) > stack tagging in LLVM. To support stack tagging in combination with > exceptions, we need to make sure that the unwinder will untag stack > frames, to avoid leaving behind stale tags. As such, we need some way > to communicate to the unwinder to do that. > > In a discussion on llvm-dev [1], it was decided the best way to go > forward with this would be to add a new character ('G' for taG, as the > MTE instructions stg etc.) to the eh_frame augmentation string, and > then handle that in libunwind by clearing the tags of the respective > frame. > > How does that sound? Would that be a good course of action for GCC as well? > > Thanks, > Florian > > [1]: https://lists.llvm.org/pipermail/llvm-dev/2020-May/141345.html Hi Florian, This is something that needs to be specified in the ABI, not just agreed between a couple of compilers. So while the community input is helpful, it isn't enough. The correct place to do this is in the ABI project here: https://github.com/ARM-software/abi-aa R.