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 1BD6FC433FE for ; Fri, 18 Nov 2022 22:34:14 +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=0KXuH4zE/xsk6+LnMJT2HzEkncIr+RiBNPsigW/Kz4M=; b=mPjisWRp7o5kX2 RvUilFSMLxxWAoDB/Jqm9SCyH3x7eLhyME3v+A7MJvQ/ioXKk37zTTnV1KKch4/9GIu16kXC8Ur5N se80mriX4wiyJJkwPHQ3PKIXX3fzULbC1PeP2aDQ0DdeEOk7nkoB6tZOi3X20/A+tP1SBp8+l1ACF M3zKMo9typS6J8bFFusVS5W/AqvHzIhKwjHlOnaGs5eDDHiJn1iLxqwsyPUmi1IqUe0KU4m9FCDFx LMzyZr6ONNxRNXRWko7WkolrUtKlXkKe506pokqJtAp90AeyvyliPlU5lDqbzdILIWwsjIho5mviS DPyVN8Panwncjm7TEitQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow9vC-008mSl-Kx; Fri, 18 Nov 2022 22:33:18 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow9v9-008mSD-2A for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2022 22:33:16 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 8EA236277F; Fri, 18 Nov 2022 22:33:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A41DDC433C1; Fri, 18 Nov 2022 22:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668810793; bh=Qn+bhuDN4Uq8dMdeJ49qjwh7QjWi1Pb6Ow16TnENIWA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bpbVUy562ncoA0HYnNrkzFAXqmO1O2ZdgN+kbR68FqT/zXa2/ZmYb/rVaLBQazQs/ VgBAISIoPdSvt9JkDstJt3HHXV4jXMwC8NtxnMzIzAOdoO7Qgg9PzVS7gNGhjoiIuw XR/8cMtIYY7Sw8g1+8gmEYZYVNjUwh5TyU8R4AmpQKjSZSdE8zcYkAcDBRRGxWKGC0 v3XqIaTT9xCgv705L+OFHRBvh/Fd2LLbHopZDKEJr+gVcFoXyNDe1Kqxph+2eHbvlO 8aMF39mCgq173Fne5KXHYKqTeU1DLiZ+1ot26LQ3rXwydu7xArgGIFSxVK0r47lRK9 p/Jxzvto51wTA== Date: Fri, 18 Nov 2022 14:33:11 -0800 From: Eric Biggers To: Sami Tolvanen Cc: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH v2 08/12] crypto: x86/sm4 - fix crash with CFI enabled Message-ID: References: <20221118194421.160414-1-ebiggers@kernel.org> <20221118194421.160414-9-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221118_143315_162019_9DE0F970 X-CRM114-Status: GOOD ( 19.10 ) 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, Nov 18, 2022 at 02:01:40PM -0800, Sami Tolvanen wrote: > On Fri, Nov 18, 2022 at 12:53 PM Sami Tolvanen wrote: > > > > On Fri, Nov 18, 2022 at 12:27 PM Sami Tolvanen wrote: > > > > > > On Fri, Nov 18, 2022 at 12:10 PM Eric Biggers wrote: > > > > Sami, is it expected that a CFI check isn't being generated for the indirect > > > > call to 'func' in sm4_avx_cbc_decrypt()? I'm using LLVM commit 4a7be42d922af0. > > > > > > If the compiler emits an indirect call, it should also emit a CFI > > > check. What's the assembly code it generates here? > > > > With CONFIG_RETPOLINE, the check is emitted as expected, but I can > > reproduce this issue without retpolines. It looks like the cfi-type > > attribute is dropped from the machine instruction in one of the X86 > > specific passes. I'll take a look. > > This should now be fixed in ToT LLVM after commit 7c96f61aaa4c. Thanks > for spotting the issue! > Thanks, it seems to work now. (If I revert my sm4 fix, I get a CFI failure as expected.) - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel