Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp645615pxu; Thu, 7 Jan 2021 14:29:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYrAkwsVXQ3kvH2NaBjMSbl05KZsclchDKcPCI7Ss5o3dKxIezHOGj+qh6+P5xZnyC+H0+ X-Received: by 2002:a17:906:ce3c:: with SMTP id sd28mr662662ejb.485.1610058580515; Thu, 07 Jan 2021 14:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610058580; cv=none; d=google.com; s=arc-20160816; b=tNe0tay5bNElX7bdHk9wyq8DtqSL4RS8Thi8yTKXHj+5WbimGqEKqEHt+UqWT0oKS8 +4Ggcyz9W9UJiaazdHEym59eQYvdRrDBri0OeftSPGlh/X8TVWivLnfbZnbo+eiG4ctV zfNs6NAcIyrIg0A3Wb8ig64iV07CkcsS11R5qfZkKchhT+vFI3gTDNMUfZNltQU19Ezo dUEnjQKdH9qzCHK9TX63DJWfPLiIE1FQJAWYt36h8R0n5INXskLB/Nr2z1yK+f0J/PSB cPPn3o0v7MeRDXgGrY3K6jNeO8vMKTejxG+1JZvMwumkEybxqAwm8eSBxlu0w4x6OyQ5 LH3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oJmDv51Yi49OJdK7lt+VI7l/mdAGQaKhGLC7aX5zYVo=; b=S8/yIFAGlWcBm2oMJM0squssAkfsHRlzzZdv7GXlthjasjKH5rjAr0eYXsHFdmotbM 3JGo8njqiPnGKLqZnZEGWLXR3jg0mzHt9c4WmsCfju60GT6Oj614I9kkp3n4p4WnOpRv JI7TEcTaB6PJe7uSTU3ILRExypJRyqJA8E5S7M9IhVArOfupHTLsM/z8BMeQNRDqdiQQ H2ikRXbiJrN6Ey6QEs9oMu1IxG/zNfqatvrBCcn+gEEFwUKzfrnXp0XG/YXd3lvWHf1o mVKtleDspAVae62tyHABjCR+872G5o5oQ/Ap1vm1MhKDcFgn4/c8VSlpxVOL5NllgP4g hctg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoIP2zgO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si2855543edy.380.2021.01.07.14.29.15; Thu, 07 Jan 2021 14:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoIP2zgO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728738AbhAGW2e (ORCPT + 99 others); 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-ext4@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