Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp903335pxp; Wed, 16 Mar 2022 20:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkmcok8Ca1vkTk2GfBXLHeSSjdIF0sa1ee8n4+R7TgkXR03JJjaObXgzkM0N6UzfXJLR+A X-Received: by 2002:a17:902:d511:b0:153:a664:bb3b with SMTP id b17-20020a170902d51100b00153a664bb3bmr2758138plg.147.1647488692197; Wed, 16 Mar 2022 20:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647488692; cv=none; d=google.com; s=arc-20160816; b=hw4TNoRRIIIpCUkxXjpbmVkA/noOetcQHYx8fc50LgUeOI8TyzyzllK2CPENQPIerP 1a1rOgP6beEG7IFgu6Ebc41eAAJd+T7R+wHwV1hIgE+iFgg6msiezveeV45GK079kXpz eAr+UUL4VvyRftpJTGvQI7zLQu+pGvrXQb2mZKUOFzZd8bCmohDrBhTLqhQdBlFGIE/B p23eVSwcNf36yOBRI2HzJYrPn6XfJobPl7X0kgBx2nyc1SLYa+bVhB4Mne2A5g0SuCg1 7rFW6Q3l77TCOK/21rdmsDk3T5Ux+/4bsG6OsCuy76tHDB99BcC8Y4Qvo2CS1OAizdS8 nFPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=+41MFpKRhqNaQrWRi+ngw6IHebcbmsk9SqhRzEgY4gI=; b=audb2UkodHuGFhrcxKJJ3MlDb5etArrCZckjDG0gtM+g/j2oACVNf0bWKW50BeOTil qiKJta/vfxB0IrDT32adKynQoYMAavkHUq22ZkNa3IQEzKFar9kasZEVvGzvTIVdLvXe d9Dgjwt9Of+2oeKPpyZPazvAjmgnAuzNaxGh6ykK5JEif/HcoyjMEp3yoaPxtvm+k/go 4cRWgaTxIHvlcpjp59Ihv1a9m3Xyr/NPyDuFMb6MlrVvP7nVwtjl7zWR9BVPf2FaLwqV KwfsBMW+4+aRbsJiuT5t5gXt4PsGlLFVU+H1gdiIgyHxjJ3ZxzHGGyIDWtWxKCg7O3IU KqDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=FULCV+NT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="1wcK8B/1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w5-20020a17090aaf8500b001bd14e01fb5si6311621pjq.163.2022.03.16.20.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:44:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=FULCV+NT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="1wcK8B/1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 419B66D4F9; Wed, 16 Mar 2022 20:36:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351722AbiCPNrF (ORCPT + 99 others); Wed, 16 Mar 2022 09:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241647AbiCPNrE (ORCPT ); Wed, 16 Mar 2022 09:47:04 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BE935D65B; Wed, 16 Mar 2022 06:45:50 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F188E1F38A; Wed, 16 Mar 2022 13:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647438347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+41MFpKRhqNaQrWRi+ngw6IHebcbmsk9SqhRzEgY4gI=; b=FULCV+NTmRSfcme8M/VF5SzcGZFFOrp6lLSpW6Lm1mgbulqHj1ZGzumfmBGna2rwEuMXaa XABD0kT/EhICC05Zk6tYEnlslRUGeUQLJ3Omi5TS+1eycx2f/fwl+Y6joalnb9Us/oLbU7 HPeWGYw5c325OnHcmGnPfUQxO0UDkh0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647438347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+41MFpKRhqNaQrWRi+ngw6IHebcbmsk9SqhRzEgY4gI=; b=1wcK8B/1rxo/P1AU6eROXdFEIeR/cSE9y09MmLZ5N4YM9w7CxDj61D0RC4Hgm6xmfELABl FzJvXUHHbxPUvGCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BDB6F13322; Wed, 16 Mar 2022 13:45:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nZIBLQvqMWK6dgAAMHmgww (envelope-from ); Wed, 16 Mar 2022 13:45:47 +0000 Date: Wed, 16 Mar 2022 14:45:46 +0100 From: David Disseldorp To: "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp\" "@imap2.suse-dmz.suse.de Cc: 'Vasant Karasulli' , 'Sungjong Seo' , "'linux-fsdevel@vger.kernel.org'" , "'linux-kernel@vger.kernel.org'" , 'Takashi Iwai' , 'Namjae Jeon' Subject: Re: [PATCH v2 2/2] exfat currently unconditionally strips trailing periods '.' when performing path lookup, but allows them in the filenames during file creation. This is done intentionally, loosely following Windows behaviour and specifications which ... Message-ID: <20220316144546.2da266c3@suse.de> In-Reply-To: References: <20220310142455.23127-1-vkarasulli@suse.de> <20220310142455.23127-3-vkarasulli@suse.de> <20220310210633.095f0245@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi T.Kohada, On Mon, 14 Mar 2022 03:52:08 +0000, Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp wrote: > Hi, Vasant Karasulli. > > > > > I think it makes sense to mention your findings from the Windows > > > > tests here. E.g. "Windows 10 also retains leading and trailing space > > > > characters". > > > Windows 10 do also strip them. So you can make another patch to strip > > > it as well as trailing periods. > > Actually I found contradicting behavior between Window 10 File Explorer and Commandline. Commandline seems to strip > > trailing spaces, but File Explorer doesn't. > > The exfat specification specifies an invalid character set, but there are no restrictions on the use of leading or trailing white-space or dots. > Even if the filename has trailing-dot as shown below, it conforms to the exfat specification and can be created on Windows. > "a" > "a." > "a.." > These are treated as "a" in the current implementation of linix-exfat, so the intended file cannot be accessed. > The specified filename should not be modified to comply with the exfat specification. > Therefore, exfat_striptail_len() should not be used. > > Note: > Windows explorer removes trailing white-space and dots, but not the behavior of the filesystem. > Also, you can create a trailing-dot filename by quoting it on the command line. Please explain how you came to that conclusion. I did some further tests using the win32 CopyFile() API directly[1] on Windows10 and observe that both trailing periods and trailing spaces are trimmed for an exfat destination path. Cheers, David 1: calling win32 CopyFile() from powershell https://devblogs.microsoft.com/scripting/use-powershell-to-interact-with-the-windows-api-part-1/