Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp687206pxu; Thu, 7 Jan 2021 15:55:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKRttwcMT+LdGyhApJkEkZstPoCkgcUr4VjkiehIi04jgKfPJ4qzGgbaguaoyAJzhQZNqW X-Received: by 2002:aa7:c64e:: with SMTP id z14mr3426389edr.69.1610063748426; Thu, 07 Jan 2021 15:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610063748; cv=none; d=google.com; s=arc-20160816; b=WPc+3EYIdaXW1deRE6COERMwjL0/P4IKpFbbkeJyWSRqgLw87zTm5n+G84goICogif x2gD4UoKV2NpIUCOrN9JyzsCYxUpiswhT9GCQHic0QzfP85Empg6uqduK2X0slMCI+95 p1NK4G14u0Ji5Kr2lM+VC1EaDciQwV5GNNGUI/SmPlvSM8uI4cYN3ep1AQozq4a1c1gx A+zajUeWBw/3sMajKwhGKzV9K/n9U+c/eup+BDlEGntaks6WKpd4HnFDVPnbEpPWs4DR ev+TZUeZfhI8bVaP81/ZYKsPHnTqXi4ckPKpvJgVPOnWVKcYw4yYrddGRGmaMPCl5O50 ptEg== 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=XmsIp9Zfga5rvuoJrqoBPasGOnyJ8zj0Web421dIPCw=; b=L3Ru+Y4gtT3dMVzEvk3wlo3ckqew/zR9lZP2pkqZUfc52L/w8UFOn8r4cwimssY4my pdZ1d17oP5CEIXMAxTTqAPab5XM0Zx2Z3MXo9Wz6QS1Mdy6DEGNACpp0OhAlih0sorkD 2NOglswwFtFz8SBGlsc3HbCTj19TJMAJOPLiy6ny+PBuK9UsZcoIFQmW/qPkx05kqdNn 7fXhh7eHGm0+8bxqPs51RSMx2aIOaAjAMGcj8dkdiis53KBNeFTpDc/AGNvfuIIGcQU3 0gXUL6dq4o+YByL3oLIAmveF/7KZh4GiD86M5xtaytJwnQRq5G9Flp6xOYgNpSPbmOdx OSvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Bfq+C6ly; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr5si2767383ejb.59.2021.01.07.15.55.19; Thu, 07 Jan 2021 15:55:48 -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=@oracle.com header.s=corp-2020-01-29 header.b=Bfq+C6ly; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728674AbhAGXyv (ORCPT + 99 others); Thu, 7 Jan 2021 18:54:51 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:32906 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727858AbhAGXyv (ORCPT ); Thu, 7 Jan 2021 18:54:51 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107NrfIo142252; Thu, 7 Jan 2021 23:53:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=XmsIp9Zfga5rvuoJrqoBPasGOnyJ8zj0Web421dIPCw=; b=Bfq+C6lyaVF40FuIrCCO1zwWV+lWbh9cH9DbPqcm+elzaJ4M6/24+9I1/f8L6Ll4YbYb 9jBnpv1cqVikgPrEUALeI3gwbkMLQGCgy/i5y7m17vwizSAK2tvC5MMDeE04cAPqkAXC NPFkZAoZdhVhN6GSiu3zSTDNlfiRwpk4Oigf80GyS17H2tcb4x6GfR14bazuEgtSfPjT U9lby2T1KDcMMxDC3Uv+639IMaQf7daHnKROqR43dONIMZ1F30Z9xWeOO3zGsJO8h/f/ gZU+GDmPJQ8oHQqKeHtC0793SWcWOzHYTQZdghxURdkpwODzmQV5P5gczPbCtruTTiTr Gg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 35wftxegs2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 07 Jan 2021 23:53:41 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107NaUEB129484; Thu, 7 Jan 2021 23:53:32 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 35w3quga70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Jan 2021 23:53:32 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 107NrUWe004278; Thu, 7 Jan 2021 23:53:30 GMT Received: from localhost (/10.159.138.126) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jan 2021 23:53:30 +0000 Date: Thu, 7 Jan 2021 15:53:28 -0800 From: "Darrick J. Wong" To: Eric Biggers Cc: Arnd Bergmann , "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: <20210107235328.GI6908@magnolia> References: <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: X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070132 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 clxscore=1011 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070133 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jan 07, 2021 at 02:27:51PM -0800, Eric Biggers wrote: > 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. Yes. > 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). This was the primary reason I chose to do it this way for ext4. The other is that ext4 didn't use crc32c before metadata_csum, so there's no point in pulling in the crypto layer if you're only going to use older ext2 or ext3 filesystems. That was 2010, maybe people have stopped doing that? > 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). Though I would like to see the library functions gain the ability to use whatever is the fastest mechanism available once we can be reasonably certain that all the platform-specific drivers have been loaded. That said, IIRC most distros compile all of them into their (increasingly large) vmlinuz files so maybe this isn't much of practical concern? --D > > Until one of those is done, switching to crc32c_le() might cause performance > regressions. > > - Eric