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 X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 631C5C433E0 for ; Thu, 7 Jan 2021 22:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 396D9233A0 for ; Thu, 7 Jan 2021 22:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728784AbhAGW2e (ORCPT ); Thu, 7 Jan 2021 17:28:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:42140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728762AbhAGW2d (ORCPT ); Thu, 7 Jan 2021 17:28:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF989233A0; Thu, 7 Jan 2021 22:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610058473; bh=1PbX9hu0NL7rmJtULi9rAa4tgyH75fs0nUv2OGbIUHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FoIP2zgOJueDtSXbOah/fQoWqVsSbNzBTZDwPTw26V9mwRZb7c+QYRqPx+4CODHmH cOvPHjtPm6NPEjhZeaNq/WL1xTjOkDHOzsZmY3V90aGEmw2UID5ekd/TcsY0xQhCqI fgjQQK7zvUm0vk95l+gY1Go5avKOAKPzVXqoSJoUNdz18noxVHPAl4SYCXkbB+0jAQ bSjQahiAzBdeOJKV75hu3aRv284wUzUekHUIASdCImUaZYOjuBYKV11kxlIPdoizuJ TZdIVnH0j1SU3fo2G+yDeCDbOr+6QXfzsJOJLhbGV9lDDIbcxWnJ+1DAfl7QBTYbL6 sTYt433/xpo/Q== Date: Thu, 7 Jan 2021 14:27:51 -0800 From: Eric Biggers To: Arnd Bergmann Cc: Theodore Ts'o , Russell King - ARM Linux admin , Will Deacon , linux-toolchains@vger.kernel.org, Mark Rutland , "linux-kernel@vger.kernel.org" , Andreas Dilger , Ext4 Developers List , Linux ARM Subject: Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues Message-ID: References: <20210106115359.GB26994@C02TD0UTHF1T.local> <20210106135253.GJ1551@shell.armlinux.org.uk> <20210106172033.GA2165@willie-the-truck> <20210106223223.GM1551@shell.armlinux.org.uk> <20210107111841.GN1551@shell.armlinux.org.uk> <20210107124506.GO1551@shell.armlinux.org.uk> <20210107133747.GP1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > On Thu, Jan 07, 2021 at 01:37:47PM +0000, Russell King - ARM Linux admin wrote: > > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > > them in my git history. > > > > > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > > > or just for aarch64? > > > > Russell, Arnd, thanks so much for tracking down the root cause of the > > bug! > > There is one more thing that I wondered about when looking through > the ext4 code: Should it just call the crc32c_le() function directly > instead of going through the crypto layer? It seems that with Ard's > rework from 2018, that can just call the underlying architecture specific > implementation anyway. > It looks like that would work, although note that crc32c_le() uses the shash API too, so it isn't any more "direct" than what ext4 does now. Also, a potential issue is that the implementation of crc32c that crc32c_le() uses might be chosen too early if the architecture-specific implementation of crc32c is compiled as a module (e.g. crc32c-intel.ko). There are two ways this could be fixed -- either by making it a proper library API like blake2s() that can call the architecture-specific code directly, or by reconfiguring things when a new crypto module is loaded (like what lib/crc-t10dif.c does). Until one of those is done, switching to crc32c_le() might cause performance regressions. - 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 X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E25CC433DB for ; Thu, 7 Jan 2021 22:30:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D67F235FD for ; Thu, 7 Jan 2021 22:30:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D67F235FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=dLKCeSrGiBoOEKoLEHza7LRxTcLQ/9nD74jYwPbZiH8=; b=y89SxQhhFjsCQoGBYxErefhnX r0HKo4iJQZwt5lGSNSkLIwsCthUZE/K2Zi09SUvFQk0NYGlOUTrJihm0Cpr0kKDcJHNSj6eeBJP4E E69lNeikKrIoW1U2fioPZJfetFyOZmPlx2VoFE1VKhocwnje4scViSqZ1NK3PJ6A/zwURXeYdXMl8 XOyjLG3VnPbbH3NZYd8hzjdPlwdDgneEhknOKn/hJImSfZO8jLzqYcJHKz0loqqXeDFEjhVhcPLdN m5g447WmFkQQWVQrN9y/6qWl5vQjVQCGnLva6SnUE//v0M2GPMJawDs01BffM0m5nSdTdMeqXXe4k CpsXlw+jQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxdl6-0008I8-VH; Thu, 07 Jan 2021 22:27:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxdl3-0008Hl-SV for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2021 22:27:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF989233A0; Thu, 7 Jan 2021 22:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610058473; bh=1PbX9hu0NL7rmJtULi9rAa4tgyH75fs0nUv2OGbIUHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FoIP2zgOJueDtSXbOah/fQoWqVsSbNzBTZDwPTw26V9mwRZb7c+QYRqPx+4CODHmH cOvPHjtPm6NPEjhZeaNq/WL1xTjOkDHOzsZmY3V90aGEmw2UID5ekd/TcsY0xQhCqI fgjQQK7zvUm0vk95l+gY1Go5avKOAKPzVXqoSJoUNdz18noxVHPAl4SYCXkbB+0jAQ bSjQahiAzBdeOJKV75hu3aRv284wUzUekHUIASdCImUaZYOjuBYKV11kxlIPdoizuJ TZdIVnH0j1SU3fo2G+yDeCDbOr+6QXfzsJOJLhbGV9lDDIbcxWnJ+1DAfl7QBTYbL6 sTYt433/xpo/Q== Date: Thu, 7 Jan 2021 14:27:51 -0800 From: Eric Biggers To: Arnd Bergmann Subject: Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues Message-ID: References: <20210106115359.GB26994@C02TD0UTHF1T.local> <20210106135253.GJ1551@shell.armlinux.org.uk> <20210106172033.GA2165@willie-the-truck> <20210106223223.GM1551@shell.armlinux.org.uk> <20210107111841.GN1551@shell.armlinux.org.uk> <20210107124506.GO1551@shell.armlinux.org.uk> <20210107133747.GP1551@shell.armlinux.org.uk> 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-20210107_172754_015547_27AF8996 X-CRM114-Status: GOOD ( 23.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Theodore Ts'o , Russell King - ARM Linux admin , "linux-kernel@vger.kernel.org" , Andreas Dilger , linux-toolchains@vger.kernel.org, Ext4 Developers List , Will Deacon , Linux ARM 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 Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > On Thu, Jan 07, 2021 at 01:37:47PM +0000, Russell King - ARM Linux admin wrote: > > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > > them in my git history. > > > > > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > > > or just for aarch64? > > > > Russell, Arnd, thanks so much for tracking down the root cause of the > > bug! > > There is one more thing that I wondered about when looking through > the ext4 code: Should it just call the crc32c_le() function directly > instead of going through the crypto layer? It seems that with Ard's > rework from 2018, that can just call the underlying architecture specific > implementation anyway. > It looks like that would work, although note that crc32c_le() uses the shash API too, so it isn't any more "direct" than what ext4 does now. Also, a potential issue is that the implementation of crc32c that crc32c_le() uses might be chosen too early if the architecture-specific implementation of crc32c is compiled as a module (e.g. crc32c-intel.ko). There are two ways this could be fixed -- either by making it a proper library API like blake2s() that can call the architecture-specific code directly, or by reconfiguring things when a new crypto module is loaded (like what lib/crc-t10dif.c does). Until one of those is done, switching to crc32c_le() might cause performance regressions. - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel