From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B6C0138F for ; Mon, 16 May 2022 21:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vKe1O/08xax1V/m6L9bI7x35tnQuI4QqNSLdWeAAtRc=; b=jHCc4bH6LdXjXBLdU8eD04/agW vjVNarXQu5dDy7/lac0+WfgLcxwkRXvAFWfnLQvPH9v1cNoVSlfvNdQarYzWHzk6YoAF0Lp5Jz5Ca 6ZcI8I5dJmgjainqJrDfFW47GRZR6QPStuF4aYzS6oZSkmyqYmopHlTJjJIMd6XuFJA+XSQ54VnrL eJPkO+bYqHaU2FTn7TGXdHd9/gc5p9qSm4XbvjTmQ9+swnxz4gsBi/CSudUbW75t2lZ4L5VsNAeRN Dsn8+uhNXmLP9rWjbd4vXlAOaM9N++sEHf/9cG3YURS4neuu7ANHLoShuqBOgP5dHi+9IsHYUxSBd LQK73wLg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqiVj-00121p-5O; Mon, 16 May 2022 21:44:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id A9D32980DCC; Mon, 16 May 2022 23:44:14 +0200 (CEST) Date: Mon, 16 May 2022 23:44:14 +0200 From: Peter Zijlstra To: David Laight Cc: 'Sami Tolvanen' , "linux-kernel@vger.kernel.org" , Kees Cook , Josh Poimboeuf , "x86@kernel.org" , Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , "linux-hardening@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "llvm@lists.linux.dev" Subject: Re: [RFC PATCH v2 20/21] x86: Add support for CONFIG_CFI_CLANG Message-ID: <20220516214414.GR76023@worktop.programming.kicks-ass.net> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-21-samitolvanen@google.com> <19b3e040302d4d8aa240eee43427dfaa@AcuMS.aculab.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19b3e040302d4d8aa240eee43427dfaa@AcuMS.aculab.com> On Mon, May 16, 2022 at 09:32:55PM +0000, David Laight wrote: > > The compiler always generates this specific instruction sequence. > > Yes, but there are several ways to encode 'cmpl imm,-6(reg)'. Yes, but we don't care. This *always* uses the 32bit immediate form. Even if the immediate is small. 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 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 AC80FC433EF for ; Mon, 16 May 2022 21:45:44 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c1pVl2DYsMsEATGrlZcvR3CUPRufyIY8FfIDPdr1iwI=; b=M1YlpGA+gvlLKY kUqohN+hNyqQEiN8GN6kU2UakJTVlq2B8bYuqoofJn5yRWPsyb2oONHTV56Lk3pKKdImTlqcqn7eD /FN+zB5iJSHiJwkcjnqk+I7zfV9pIploE+4KahEV+tJSZ/FacR12sYmSWsJ5X1eZDATyC2H9cKS5m mfvWCvy/vJtcUAa3Z1ctMgRWnKUHByEKhtb1K85NFU335kC9eY8pMBebkYtEziYoitfTkFE7+thR6 aqOPj1OH3f6sVsOS4/XIgUkAqLyispkSYNUYvot0WByW1Nj5Abrtm5XKkQ+m0lBJWO/S5j2TPjWek pWxzU+AkB8ggcreLrMtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqiVr-00AMPx-Ac; Mon, 16 May 2022 21:44:23 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqiVp-00AMPp-M3 for linux-arm-kernel@bombadil.infradead.org; Mon, 16 May 2022 21:44:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vKe1O/08xax1V/m6L9bI7x35tnQuI4QqNSLdWeAAtRc=; b=jHCc4bH6LdXjXBLdU8eD04/agW vjVNarXQu5dDy7/lac0+WfgLcxwkRXvAFWfnLQvPH9v1cNoVSlfvNdQarYzWHzk6YoAF0Lp5Jz5Ca 6ZcI8I5dJmgjainqJrDfFW47GRZR6QPStuF4aYzS6oZSkmyqYmopHlTJjJIMd6XuFJA+XSQ54VnrL eJPkO+bYqHaU2FTn7TGXdHd9/gc5p9qSm4XbvjTmQ9+swnxz4gsBi/CSudUbW75t2lZ4L5VsNAeRN Dsn8+uhNXmLP9rWjbd4vXlAOaM9N++sEHf/9cG3YURS4neuu7ANHLoShuqBOgP5dHi+9IsHYUxSBd LQK73wLg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqiVj-00121p-5O; Mon, 16 May 2022 21:44:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id A9D32980DCC; Mon, 16 May 2022 23:44:14 +0200 (CEST) Date: Mon, 16 May 2022 23:44:14 +0200 From: Peter Zijlstra To: David Laight Cc: 'Sami Tolvanen' , "linux-kernel@vger.kernel.org" , Kees Cook , Josh Poimboeuf , "x86@kernel.org" , Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , "linux-hardening@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "llvm@lists.linux.dev" Subject: Re: [RFC PATCH v2 20/21] x86: Add support for CONFIG_CFI_CLANG Message-ID: <20220516214414.GR76023@worktop.programming.kicks-ass.net> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-21-samitolvanen@google.com> <19b3e040302d4d8aa240eee43427dfaa@AcuMS.aculab.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <19b3e040302d4d8aa240eee43427dfaa@AcuMS.aculab.com> 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 16, 2022 at 09:32:55PM +0000, David Laight wrote: > > The compiler always generates this specific instruction sequence. > > Yes, but there are several ways to encode 'cmpl imm,-6(reg)'. Yes, but we don't care. This *always* uses the 32bit immediate form. Even if the immediate is small. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel