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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 741DDC2BA83 for ; Sat, 8 Feb 2020 02:12:37 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 440FF206DB for ; Sat, 8 Feb 2020 02:12:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="M5hpoJHM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="T/niSLj5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 440FF206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Fbo-0000xT-Pj; Sat, 08 Feb 2020 02:12:36 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j0Fbn-0000xI-53 for linux-f2fs-devel@lists.sourceforge.net; Sat, 08 Feb 2020 02:12:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Sender:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hBDMXf4vxhewV58fdRcsCvQIgTioNM3MzXdpE7IEX+Q=; b=M5hpoJHMpKrm3loMXQ+PhuPhf DrZmt/urIPkdoL0goyuyAIo5PqB7f92uyCP4Rc7eagMDFcFi6WF1sbHW89apoajlTt2v75/46LzOd Dh5tpQIvSo1xsm2T6EGQkQ8P7aTL89C5KMXAmFByYnb4QYROW44TvG5JVPK4CIXOIBuy8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hBDMXf4vxhewV58fdRcsCvQIgTioNM3MzXdpE7IEX+Q=; b=T/niSLj5XPIHGKT0WwQLx+t8hw AsRQOMFA+8SWV3r3TJn1C6iw/vh/hElQn9Us3HzPr5Mv9BoK7v7neTj7M5a9EJsJksJhuckNroncR QHXzQ3tPA+B4g2H9O1sCJqV3TBtPuJijfqnMkIClsLB91ryLVpu4Z74PcerhgDOS5UU8=; Received: from zeniv.linux.org.uk ([195.92.253.2]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1j0Fbl-00Du53-AD for linux-f2fs-devel@lists.sourceforge.net; Sat, 08 Feb 2020 02:12:35 +0000 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0FbU-0098pV-DJ; Sat, 08 Feb 2020 02:12:16 +0000 Date: Sat, 8 Feb 2020 02:12:16 +0000 From: Al Viro To: Daniel Rosenberg Message-ID: <20200208021216.GE23230@ZenIV.linux.org.uk> References: <20200208013552.241832-1-drosen@google.com> <20200208013552.241832-3-drosen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200208013552.241832-3-drosen@google.com> X-Headers-End: 1j0Fbl-00Du53-AD Subject: Re: [f2fs-dev] [PATCH v7 2/8] fs: Add standard casefolding support X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-team@android.com, Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , 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 Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Feb 07, 2020 at 05:35:46PM -0800, Daniel Rosenberg wrote: > +int generic_ci_d_compare(const struct dentry *dentry, unsigned int len, > + const char *str, const struct qstr *name) > +{ > + const struct dentry *parent = READ_ONCE(dentry->d_parent); > + const struct inode *inode = READ_ONCE(parent->d_inode); > + const struct super_block *sb = dentry->d_sb; > + const struct unicode_map *um = sb->s_encoding; > + struct qstr entry = QSTR_INIT(str, len); > + int ret; > + > + if (!inode || !needs_casefold(inode)) > + goto fallback; > + > + ret = utf8_strncasecmp(um, name, &entry); Again, is that safe in case when the contents of the string str points to keeps changing under you? _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel