From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4260A179958; Mon, 4 Nov 2024 18:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730743828; cv=none; b=o+pE9KC8wE/u5ao+w01qeRcXdBFDx19011Mwjc1EvczYMcCR0B27XCEQYVrfwo1SFCXuOKhzy5RSJRd/YLj8Xk6vay8WL2hRMg/K+PwowEjdwkgjA2a74F7QslAhvoJDUY5F/xheSYF2O6U3FFTKTVoMF7qG0o5JKPeMggTzgY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730743828; c=relaxed/simple; bh=A9QEobhM0Tk66PTKUxkoy2PH75AkXVl7kAtDO3RqV40=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XOV6DPlq1Mc9DQ6U52srcznqkmxy74+v00RZTkFo/+ZZj/K76iinpZ+f91xKDpp6kyqMpkn17c8/7Wra90l+b89ZmYd8Irvc3ZYRpDU9ViaByPh5FSUMaeavEdCgnQ8oaehEzFWm5+IXIo3DRmCC4QafFPSO3NusmuqF4VotuE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OMfO1/O0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OMfO1/O0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5F8FC4CECE; Mon, 4 Nov 2024 18:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730743828; bh=A9QEobhM0Tk66PTKUxkoy2PH75AkXVl7kAtDO3RqV40=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OMfO1/O0f3WTFHcevl3ZKLDtacBxMdE3BT7RFEx/b3+uCvKbbdhBTvloMt0wa0OwX n90Z5gcaPjxU3VikQM87AaL+farAbSj6GceGjTrdFooAVP1M8KvLcXwQ38fUeWBv8N nSueT0gGDtEoY8EFJAIpvIVUUWXl5Q+eF6EU53irRc2UnkG16rz8Z0sqp62Nd22MA5 VHQu3uGLJaQJEr8WHqAb0R2V4++l7ByYkHuVDtoe7B8G75lQBftyc2Y6tQRfZwmKhm h8Lgj1UBc9z/xdcPqGhAJ2c/yL+WIAA6KPIsfzCpa8AVQaSz9Mv0vPpuMxziyvvJML 5V3YtcPfQjK/A== Date: Mon, 4 Nov 2024 18:10:26 +0000 From: Eric Biggers To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org, Ard Biesheuvel Subject: Re: [PATCH v3 05/18] arm/crc32: expose CRC32 functions through lib Message-ID: <20241104181026.GC1049313@google.com> References: <20241103223154.136127-1-ebiggers@kernel.org> <20241103223154.136127-6-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241103223154.136127-6-ebiggers@kernel.org> On Sun, Nov 03, 2024 at 02:31:41PM -0800, Eric Biggers wrote: > -static int __init crc32_pmull_mod_init(void) > -{ > - if (elf_hwcap2 & HWCAP2_PMULL) { > - crc32_pmull_algs[0].update = crc32_pmull_update; > - crc32_pmull_algs[1].update = crc32c_pmull_update; > - > - if (elf_hwcap2 & HWCAP2_CRC32) { > - fallback_crc32 = crc32_armv8_le; > - fallback_crc32c = crc32c_armv8_le; > - } else { > - fallback_crc32 = crc32_le; > - fallback_crc32c = __crc32c_le; > - } > - } else if (!(elf_hwcap2 & HWCAP2_CRC32)) { > - return -ENODEV; > - } [...] > +static u32 crc32_le_scalar(u32 crc, const u8 *p, size_t len) > +{ > + if (static_branch_likely(&have_crc32)) > + return crc32_armv8_le(crc, p, len); > + return crc32_le_base(crc, p, len); > +} kernel test robot reported a build error on this patch, "undefined symbol: __kcfi_typeid_crc32_armv8_le". It's because crc32-core.S uses SYM_TYPED_FUNC_START(crc32_armv8_le), and this patch makes crc32_armv8_le be called only via direct calls, not indirect calls as it was before. I will fix this by replacing SYM_TYPED_FUNC_START by SYM_FUNC_START. - Eric 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 D0A2ED1BDDA for ; Mon, 4 Nov 2024 18:10:42 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1t81XH-0004Rq-1d; Mon, 04 Nov 2024 18:10:42 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t81X9-0004RZ-CI for linux-f2fs-devel@lists.sourceforge.net; Mon, 04 Nov 2024 18:10:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=t29gOT00reR4nbxlcJY0aptmffhd2gSsC1GS8E2B4Hw=; b=h9iMu0xGGGwnXMX5d9B+xd8Zqk K7/ksb0LnbpQLzpeaUVL/RMlxSD+v8BQr4ZZLyD51EqsyGIgcYtmksk2vOpzlVWVNql5SLAGjurOI guWZHbNIfJkZBvBKjnVFYx8YVRX+uMeIFmP1Bh9QqkIvViZeMAXrZLB3tE/bynL0nZVg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=t29gOT00reR4nbxlcJY0aptmffhd2gSsC1GS8E2B4Hw=; b=S691U5loKmmUl6CTEYwEVA5Ndr 81MRJrj8qt/1vaubvUzSw++dqsC3mYCRNNQvOo2U4vEwand/zFe7c6j0F5tvMG5ZmT1w26b57YIik bblMv/lhUzEs46Nali9V04SczqqeOEiu4MTiK7cIfJCuUE9DGAYt4a2rfrL8U6vWne4A=; Received: from nyc.source.kernel.org ([147.75.193.91]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1t81X8-000645-3Y for linux-f2fs-devel@lists.sourceforge.net; Mon, 04 Nov 2024 18:10:34 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 46F89A4251E; Mon, 4 Nov 2024 18:08:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5F8FC4CECE; Mon, 4 Nov 2024 18:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730743828; bh=A9QEobhM0Tk66PTKUxkoy2PH75AkXVl7kAtDO3RqV40=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OMfO1/O0f3WTFHcevl3ZKLDtacBxMdE3BT7RFEx/b3+uCvKbbdhBTvloMt0wa0OwX n90Z5gcaPjxU3VikQM87AaL+farAbSj6GceGjTrdFooAVP1M8KvLcXwQ38fUeWBv8N nSueT0gGDtEoY8EFJAIpvIVUUWXl5Q+eF6EU53irRc2UnkG16rz8Z0sqp62Nd22MA5 VHQu3uGLJaQJEr8WHqAb0R2V4++l7ByYkHuVDtoe7B8G75lQBftyc2Y6tQRfZwmKhm h8Lgj1UBc9z/xdcPqGhAJ2c/yL+WIAA6KPIsfzCpa8AVQaSz9Mv0vPpuMxziyvvJML 5V3YtcPfQjK/A== Date: Mon, 4 Nov 2024 18:10:26 +0000 To: linux-kernel@vger.kernel.org Message-ID: <20241104181026.GC1049313@google.com> References: <20241103223154.136127-1-ebiggers@kernel.org> <20241103223154.136127-6-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20241103223154.136127-6-ebiggers@kernel.org> X-Headers-End: 1t81X8-000645-3Y Subject: Re: [f2fs-dev] [PATCH v3 05/18] arm/crc32: expose CRC32 functions through lib X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eric Biggers via Linux-f2fs-devel Reply-To: Eric Biggers Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-ext4@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Sun, Nov 03, 2024 at 02:31:41PM -0800, Eric Biggers wrote: > -static int __init crc32_pmull_mod_init(void) > -{ > - if (elf_hwcap2 & HWCAP2_PMULL) { > - crc32_pmull_algs[0].update = crc32_pmull_update; > - crc32_pmull_algs[1].update = crc32c_pmull_update; > - > - if (elf_hwcap2 & HWCAP2_CRC32) { > - fallback_crc32 = crc32_armv8_le; > - fallback_crc32c = crc32c_armv8_le; > - } else { > - fallback_crc32 = crc32_le; > - fallback_crc32c = __crc32c_le; > - } > - } else if (!(elf_hwcap2 & HWCAP2_CRC32)) { > - return -ENODEV; > - } [...] > +static u32 crc32_le_scalar(u32 crc, const u8 *p, size_t len) > +{ > + if (static_branch_likely(&have_crc32)) > + return crc32_armv8_le(crc, p, len); > + return crc32_le_base(crc, p, len); > +} kernel test robot reported a build error on this patch, "undefined symbol: __kcfi_typeid_crc32_armv8_le". It's because crc32-core.S uses SYM_TYPED_FUNC_START(crc32_armv8_le), and this patch makes crc32_armv8_le be called only via direct calls, not indirect calls as it was before. I will fix this by replacing SYM_TYPED_FUNC_START by SYM_FUNC_START. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 28CADD1BDDA for ; Mon, 4 Nov 2024 18:20: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=8fU1aa+MN1NYBdMFvHGRZnqjKfKru/2uK72mvAYXjmk=; b=fqvUmyGikYiG75 eZYwnut66YWFQdXd9E/796kZkafVOZBcVoQjlsnhNV2A/Xvi0O9rxv4vX/Uto8oJpQCOGX9yLme1N FBe42jp0XbkzsWXVS4DeEQaUL90H3jw6vMzBg6m445HQTNMk67f1ofjdWWF3gB1UEwxdeimwdACeb e4jXL12gpt0Y0+Lbd0mj/r41DApxEgQ5NW/tNOWTtmTgy/viyCcPK4MefFR2TmhmlTnp7uvUwpWtf wAkjwz4+GGeTGuGySSCvuEkbmUIURfTx/DVYlFnHsmZ605VBDwhlwQJA8I/ktExBddmLAqXCmUBad MKwKfJ4k6W9QjkUwEMpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t81gP-0000000EjdU-0sCs; Mon, 04 Nov 2024 18:20:09 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t81X3-0000000EfWr-0nwj; Mon, 04 Nov 2024 18:10:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 46F89A4251E; Mon, 4 Nov 2024 18:08:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5F8FC4CECE; Mon, 4 Nov 2024 18:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730743828; bh=A9QEobhM0Tk66PTKUxkoy2PH75AkXVl7kAtDO3RqV40=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OMfO1/O0f3WTFHcevl3ZKLDtacBxMdE3BT7RFEx/b3+uCvKbbdhBTvloMt0wa0OwX n90Z5gcaPjxU3VikQM87AaL+farAbSj6GceGjTrdFooAVP1M8KvLcXwQ38fUeWBv8N nSueT0gGDtEoY8EFJAIpvIVUUWXl5Q+eF6EU53irRc2UnkG16rz8Z0sqp62Nd22MA5 VHQu3uGLJaQJEr8WHqAb0R2V4++l7ByYkHuVDtoe7B8G75lQBftyc2Y6tQRfZwmKhm h8Lgj1UBc9z/xdcPqGhAJ2c/yL+WIAA6KPIsfzCpa8AVQaSz9Mv0vPpuMxziyvvJML 5V3YtcPfQjK/A== Date: Mon, 4 Nov 2024 18:10:26 +0000 From: Eric Biggers To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org, Ard Biesheuvel Subject: Re: [PATCH v3 05/18] arm/crc32: expose CRC32 functions through lib Message-ID: <20241104181026.GC1049313@google.com> References: <20241103223154.136127-1-ebiggers@kernel.org> <20241103223154.136127-6-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20241103223154.136127-6-ebiggers@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241104_101029_323491_DBB94A39 X-CRM114-Status: GOOD ( 10.66 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Sun, Nov 03, 2024 at 02:31:41PM -0800, Eric Biggers wrote: > -static int __init crc32_pmull_mod_init(void) > -{ > - if (elf_hwcap2 & HWCAP2_PMULL) { > - crc32_pmull_algs[0].update = crc32_pmull_update; > - crc32_pmull_algs[1].update = crc32c_pmull_update; > - > - if (elf_hwcap2 & HWCAP2_CRC32) { > - fallback_crc32 = crc32_armv8_le; > - fallback_crc32c = crc32c_armv8_le; > - } else { > - fallback_crc32 = crc32_le; > - fallback_crc32c = __crc32c_le; > - } > - } else if (!(elf_hwcap2 & HWCAP2_CRC32)) { > - return -ENODEV; > - } [...] > +static u32 crc32_le_scalar(u32 crc, const u8 *p, size_t len) > +{ > + if (static_branch_likely(&have_crc32)) > + return crc32_armv8_le(crc, p, len); > + return crc32_le_base(crc, p, len); > +} kernel test robot reported a build error on this patch, "undefined symbol: __kcfi_typeid_crc32_armv8_le". It's because crc32-core.S uses SYM_TYPED_FUNC_START(crc32_armv8_le), and this patch makes crc32_armv8_le be called only via direct calls, not indirect calls as it was before. I will fix this by replacing SYM_TYPED_FUNC_START by SYM_FUNC_START. - Eric _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv