Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2903042ybl; Mon, 20 Jan 2020 11:37:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyeH2dCnQBitCGSvFNeOrhiInkLthfnJSPXITdXxLbeyklTHQ1oA6Os4X7Qngx8lsq/+g/R X-Received: by 2002:a9d:6544:: with SMTP id q4mr824705otl.194.1579549032303; Mon, 20 Jan 2020 11:37:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579549032; cv=none; d=google.com; s=arc-20160816; b=QHZc1Tk7Db0KcUQ84C7+9LVcioighmqt0LJcQfLp7qMcR32jN59sk2mZwx9tOjX+sD DRU4wT4Aon+GCig2sGOpOo3nrXohvoPt6ukrUutzu/wwxVD9PVDYY/vglNkVmV1Z9oFZ ScmIQBlOEvFCruxeuQWc9pytHnsZmLxxdYGIwjONNDZH1G714i1zLhXVh+bUJokz3HyH derY8qr35VcHsTvy9BCYlx2q8J5Ohcv/Qf0M8Xov8hU8+fnsz9MX9EQt6n57gTBRoq6k AYY621UYQzPu8Mt1xuNdVbm+EhlAWSqFtQ3VPbBo9vCUMN3x7WaRGg+L/SyIkoODc4uT PVAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2BnJBFCdMLV8FjSa0D2ROJ9Q2USHdBExD6uh7JBP0C4=; b=d8z/HZbhKx9SlZWKQsHkK277qkWKE1hyeVPE6Z5UP+DOs8WwY+Ln7A5Lju//UjhMs7 yUhuvuN3gp0e7z4ErMl1VFzhtlQVT+TUzpdVT+RjSeml4wGPWKJ5UL7myJcet4gpMdRf w+BDrO90MNiGmrB6+0v3sFw9YoAXifSJxLPUyxwEJGTUrHO4SX2jU6haPeTRusphQ5Y9 U66OYIeO83dmjK5UumuFpeEeNeSOrNarK1/kQDfspu304phTeCBsRZ3AZlCcwJnqlMLw KTMnrkAKq00rXmiYEB6F/CnfUH/8SnvzgOdYsdnWE8X7zvI03YZcTD4Zgy5a5uX8ANzn K6zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s129si17989504oig.177.2020.01.20.11.36.59; Mon, 20 Jan 2020 11:37:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbgATTgD (ORCPT + 99 others); Mon, 20 Jan 2020 14:36:03 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:54342 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbgATTgD (ORCPT ); Mon, 20 Jan 2020 14:36:03 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1itcq6-00CD2L-9O; Mon, 20 Jan 2020 19:35:58 +0000 Date: Mon, 20 Jan 2020 19:35:58 +0000 From: Al Viro To: OGAWA Hirofumi Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Theodore Y. Ts'o" , Namjae Jeon , Gabriel Krisman Bertazi , Linus Torvalds Subject: Re: oopsably broken case-insensitive support in ext4 and f2fs (Re: vfat: Broken case-insensitive support for UTF-8) Message-ID: <20200120193558.GD8904@ZenIV.linux.org.uk> References: <20200119221455.bac7dc55g56q2l4r@pali> <87sgkan57p.fsf@mail.parknet.co.jp> <20200120073040.GZ8904@ZenIV.linux.org.uk> <20200120074558.GA8904@ZenIV.linux.org.uk> <20200120080721.GB8904@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200120080721.GB8904@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2020 at 08:07:21AM +0000, Al Viro wrote: > > > I hadn't checked ->d_compare() instances for a while; somebody needs to > > > do that again, by the look of it. The above definitely is broken; > > > no idea how many other instaces had grown such bugs... > > > > f2fs one also has the same bug. Anyway, I'm going down right now, will > > check the rest tomorrow morning... > > We _probably_ can get away with just checking that inode for NULL and > buggering off if it is (->d_seq mismatch is guaranteed in that case), > but I suspect that we might need READ_ONCE() on both dereferences. > I hate memory barriers... FWIW, other instances seem to be OK; HFS+ one might or might not be OK in the face of concurrent rename (wrong result in that case is no problem; oops would be), but it doesn't play silly buggers with pointer-chasing. ext4 and f2fs do, and ->d_compare() is broken in both of them.