From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by sourceware.org (Postfix) with ESMTPS id 72E613858C78 for ; Tue, 1 Mar 2022 09:45:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72E613858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=overdrivepizza.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=overdrivepizza.com Received: (Authenticated sender: joao@overdrivepizza.com) by mail.gandi.net (Postfix) with ESMTPA id F330FFF806; Tue, 1 Mar 2022 09:45:20 +0000 (UTC) MIME-Version: 1.0 Date: Tue, 01 Mar 2022 01:45:20 -0800 From: Joao Moreira To: Rui Ueyama Cc: "H.J. Lu" , "Moreira, Joao" , Andi Kleen , x86-64-abi , Binutils , i@maskray.me Subject: Re: x86-64: new CET-enabled PLT format proposal In-Reply-To: References: <0e246cb968d3da5d8e9afa4055d432a1@overdrivepizza.com> Message-ID: X-Sender: joao@overdrivepizza.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, LIKELY_SPAM_FROM, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 09:45:26 -0000 On 2022-03-01 01:32, Rui Ueyama wrote: > On Tue, Mar 1, 2022 at 6:27 PM Joao Moreira > wrote: >> >> > This is what I tried first but I then realized that I needed to insert >> > another `endbr` between `jmp` and `call`. `jmp GOT[foo]` can jump only >> > to `endbr` if CET is enabled, so it can't directly jump to the >> > following `call`. >> > >> Ugh, there we go... dead. Thanks for not letting me waste a ton of >> time >> :) > > I actually wasted my time by implementing it only to find that it > wouldn't work. :) If you are interested, this is my commit to my > linker. > https://github.com/rui314/mold/commit/4ec0bbf04841e514aca2000f3d780d14efcaefc9 I'm glad I posted it here before trying to go and implement :) Regarding the projects mentioned by HJ, I assume one of them is this (in case you are curious): https://static.sched.com/hosted_files/lssna2021/8f/LSS_FINEIBT_JOAOMOREIRA.pdf In FineIBT we use R11 to pass hashes around through direct calls to enable fine-grain CFI on top of IBT.