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 3A575C43334 for ; Sat, 23 Jul 2022 11:23:16 +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=p3SG/WaAXnZpp3MtAhmlZX56YzIw0LJEY6PDgPSfw4M=; b=xPsn69fVD//mVS ydhuXgj8omdjVnK0Z9H9Ktajz+pTHhhv+420R2W8vKQpNiqv1qoMxoxDGmHd+EB2ff2FJdvw754EY UOFrM8GztHGbYuB7qxdmygsH5k5ELwjMspAAZMORD86Lc20E00Q3tjridaDppoHfZBuiRJjaUODQD 3YP9iOhxOaPAYQoOoRCSqn1DId/padK+Fl3RVH+bZHrhJaeN77KfOoiNXBBsa7Ws6Ie88du94wy6x xsT3c8MHEDpNTclMT1Y2IXOiknyFceGrKS0unfPV1oGk0+DjZFmHck6nFYzaL+mAplCjgqJ37pbbE YyaHah1ITFHNCXqDgbeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFDCa-00245V-Mw; Sat, 23 Jul 2022 11:21:44 +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 1oFDCY-00242X-9W for linux-arm-kernel@bombadil.infradead.org; Sat, 23 Jul 2022 11:21:42 +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=dcy6i7FRX4l5Gbr0LDQ+gwpAZaDUrfwf4W+C0zpF9zY=; b=XzjWAAubT+U3O39VOBD7COtuQo AOf9QP0iEkwskFRAAfV1kC1nLpuLSrszaEmxvEeuo990Q9Rq+UeITy/5G3WtlRuF3o3qfYIaeBMg8 9b5IqKho5Nsp9pHrndUHstA+vAhdW1N4gLtDFYGzSWhrW3sU3ksbV2hW7dZIE0Iu9SxnUXBsl96L8 WFOii/NhiO75NBOK1USoyAuejuWJw3374X7yUQfbvIaXOw3TUiA0GdfGvKdhdb5ECmh2wiG090taA 8/54Ml179UxlGL7PyBjGIsxgu0iY+y8jASEmQaQtaWopJWnfSFOefldSo6UcC/yzTB650j52dVspG 6LSRR++A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFDCR-0067Mf-Ps; Sat, 23 Jul 2022 11:21:36 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 01AA898016F; Sat, 23 Jul 2022 13:21:33 +0200 (CEST) Date: Sat, 23 Jul 2022 13:21:33 +0200 From: Peter Zijlstra To: Sami Tolvanen Cc: 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 v3 20/20] x86: Add support for CONFIG_CFI_CLANG Message-ID: References: <20220610233513.1798771-1-samitolvanen@google.com> <20220610233513.1798771-21-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220610233513.1798771-21-samitolvanen@google.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 Fri, Jun 10, 2022 at 04:35:13PM -0700, Sami Tolvanen wrote: > +#ifdef CONFIG_CFI_CLANG > +#define __CFI_TYPE(name) \ > + .fill 7, 1, 0xCC ASM_NL \ > + SYM_START(__cfi_##name, SYM_L_LOCAL, SYM_A_NONE) \ > + int3 ASM_NL \ > + int3 ASM_NL \ > + mov __kcfi_typeid_##name, %eax ASM_NL \ > + int3 ASM_NL \ > + int3 ASM_NL \ > + SYM_FUNC_END(__cfi_##name) > +#endif Like said on IRC yesterday, this doesn't generate the right mov encoding. .byte 0xb8 ; .long __kcfi_typeid_##name ; \ works. Your LLVM tree already has the ZExt patch you gave me yesterday to fix up the linker fallout from this change. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel