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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, 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 612B3C4CECE for ; Thu, 12 Mar 2020 22:11:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 33D39206CD for ; Thu, 12 Mar 2020 22:11:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AtIjgGHb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="lLp+JNv1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33D39206CD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q1S2Kf+5W2g0qYwjKkG10/9Y6afItAomVMHS6PGDK00=; b=AtIjgGHbGQYD7W AV4FOsQoy2gcKxAprCDTw1I+GY7Wc4m64VQgy3fxYsjljQBlqdgsKZ3ijKGvsEeeNMOzupE4SIKnJ dMvrnK6xLxeXJhzGvZLoN/1gqm/NaV7P9/SKDVfIiBenqy8O9qtcXVdWIMcP2muNrREJqbdX+8G3H 8PWyy2zD6rnR3i2xslYnPR02lRINVoOqfSP7yWlo3axBbJbfxSxjBGByi4jZAzYd5ryuI9iaA/ZsO yIjbIMyg9F/gU414zv3BCXsC3c98q84KrMRh1ZWknMzrSKgkGjHDGuctPMVw4SUD95xlbrrazVWgE cbFzzmuiGjabK9R4b//Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCW3D-0005W6-9q; Thu, 12 Mar 2020 22:11:35 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCW3A-0005UW-Oi for linux-mtd@lists.infradead.org; Thu, 12 Mar 2020 22:11:34 +0000 Received: by mail-lf1-x141.google.com with SMTP id q10so6188369lfo.8 for ; Thu, 12 Mar 2020 15:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f+nbJgOAkU3OKGNy5HAiFcAe6BZ2/dfnnfHDkezdsLM=; b=lLp+JNv1GIglmiE7sOrC1qiIR92TS5cKLDQInmmSnSrfr1qRJIqEePz4qZzmCMaXQg WfjeGL9/4gKBTTDka+GpLlLtpbiD1yloqRAJ0j1uaN1RPyfrSudbA4agtp71u5vQLvVh kbfpE2jpEmTv+gLLK2bdDBoWn9tFPGdA8uR+LZOOg0cNSMA//V8Yzq7FYJEWfGS9egxp ssrmkKAtsOcFrY+F+ktTdm/G2ys1pRbkX5kFFOvXt+HDZmd1myZbaTJUa01dn3e+L37B lhEYR0ODVOxYIzPOrxSPTQoqyVKo30x+HMDzyYjtalF/Xk6Pf7WKXUgxp0pP1/UDQYLp ZXFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f+nbJgOAkU3OKGNy5HAiFcAe6BZ2/dfnnfHDkezdsLM=; b=cB8O1yulu/8+t/gbxcidhYVZg0LaLeyKFjCFeCwcQJIBp/ChB4TLN4vP7hU1/Ye0Sj DunC6HFlsYd9YAYfQvmfoXA1OgmrSOVW2NYT16ZzB4x/SMhlbPrw3yvTUqdDU25Mu9N0 SlsH0Zuevtq4Gz/6MFwCCLaR6jUGA3wXhtVujUZhQClCdtrjBjmkAWIOF3cL2/XBiOrd 57DPglXxPD6iJo8VtjICqlSQM8V3tuvCnuM759U1V/e83G0itwNAfm2hSFtfNwiYg4VY TtzZQltXEncU4XeFgQlisuVfO440GPw+jjW7cCz1A2xGoKtTh3s38mHbtMcMKjF0Suie yC7A== X-Gm-Message-State: ANhLgQ3SgtrZTYOa/itKm2oC4XxeRTD/gtmJBg424cOZgzXE2OU0/Wsw VJuym2TvXqyoq1baSNCfZNdQ7rZyLJnaSKon+myLEQ== X-Google-Smtp-Source: ADFU+vuw+qDSh0ZHQbXiX986v1sXjlwq0l/RRl8ekqAVAeCDt4hyCXShVedgqdcfYfGOHvVzkalKAjAB5l3YONcMxRA= X-Received: by 2002:a19:4354:: with SMTP id m20mr2516445lfj.166.1584051087657; Thu, 12 Mar 2020 15:11:27 -0700 (PDT) MIME-Version: 1.0 References: <20200307023611.204708-1-drosen@google.com> <20200307023611.204708-3-drosen@google.com> <20200307034850.GH23230@ZenIV.linux.org.uk> In-Reply-To: <20200307034850.GH23230@ZenIV.linux.org.uk> From: Daniel Rosenberg Date: Thu, 12 Mar 2020 15:11:16 -0700 Message-ID: Subject: Re: [PATCH v8 2/8] fs: Add standard casefolding support To: Al Viro X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200312_151132_829914_9059D35D X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-team@android.com, Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , Chao Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Fri, Mar 6, 2020 at 7:48 PM Al Viro wrote: > > On Fri, Mar 06, 2020 at 06:36:05PM -0800, Daniel Rosenberg wrote: > > Have you even tested that? Could you tell me where does the calculated > hash go? And just what is it doing trying to check if the name we are about to > look up in directory specified by 'dentry' might be pointing to dentry->d_iname? Turns out I tested exactly not that :/ Ran tests on the wrong kernel. I've fixed my setup so that shouldn't happen again. The calculated hash there goes exactly nowhere because I failed to copy it back into the original qstr. I'm trying to see if the name is a small name, which, if my understanding is correct, is the only time a name might change from underneath you in an RCU context. This assumes that the name either comes from the dentry, or is otherwise not subject to changes. It's based around the check that take_dentry_name_snapshot does. It does feel a bit sketchy to assume that, so I'm very open to other suggestions there. I'm going through that hassle because the various utf8 functions do a lot of dereferencing the string and manipulating pointers by those values, expecting them to be consistent. It might be enough to just go through that code and add a bunch of checks to make sure we can't accidentally walk off of either end. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/