Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4086258ybl; Tue, 21 Jan 2020 12:35:19 -0800 (PST) X-Google-Smtp-Source: APXvYqy+ESdEflE3OpTQuH1NRk+C264LY1Wra6Cbbqhc97ayxXu78RoTKl+6Bt8nMY++XDcW29nq X-Received: by 2002:a9d:7357:: with SMTP id l23mr4780928otk.10.1579638919389; Tue, 21 Jan 2020 12:35:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579638919; cv=none; d=google.com; s=arc-20160816; b=dVTlENgX06eBRibvoXpzTwQ67DjImif6DUC/EbPa7RjnoshG3gX71X6h7gDefklVS+ JUeHh5PRU0BnQQKK2ROtg8CP1+v9mFfIh0SPo47gdjZ8H/I4G2qiLRlNsc7U9HUME6Lr Q8WTWFD/jkjUExhteBdRtpW4lv5hFNdWYWPJZyQoL8VTRSsnROI5J3iADhMwHSCv/iWH f1J4kw5jkFheh3YSFQtUNkniL7qG1Ejpa66bop57TA59oSeVvwb4OeierYpCraTbMVWn K6q7rbRPfF/0ToAO+Nqiiu8DpPnbXqMAUeHCv9oWATn8fEUB/dozHO9b+zGTH8csb6zu BvmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xvURL+gVfEg8Eqm3Y43MGH+QfOTBmpitIlmBm28iq70=; b=lekKlURys4wdKc5UP0HxyvdQXywBMpUbQH8K28ZlJwkuXb4a5LMS2Z9vXKPgRWaK5x GeAhn9S46gKnndbnNxlPxkCsgPyCIwH3rmvBLMv+pM8+rZGOhubdgxK9/hX6ap94q0/O 9ChgSXj6OAvNT86ubpwOeAeB3NlrnP/JiXMuX3z38R3hTI6/F6m5HTorIz4stESme1G6 PnNRvk3E5IHmX4jB936QOXY+VAOg1BegnbCGZpD8lDJnnLNBXsLx9dGXFWRo4nDuF7/a 0a0pi9e2j04zScP7xWOoyt2lzbuBeTLsMGcQvc1dh2ftTSjOEPNuLu0fo384X04lISXo 1frQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YQr8bsI3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w81si20233830oig.107.2020.01.21.12.35.06; Tue, 21 Jan 2020 12:35:19 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YQr8bsI3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728748AbgAUUeK (ORCPT + 99 others); Tue, 21 Jan 2020 15:34:10 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33789 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbgAUUeK (ORCPT ); Tue, 21 Jan 2020 15:34:10 -0500 Received: by mail-wr1-f67.google.com with SMTP id b6so4875588wrq.0; Tue, 21 Jan 2020 12:34:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xvURL+gVfEg8Eqm3Y43MGH+QfOTBmpitIlmBm28iq70=; b=YQr8bsI3WrYcpnJWuL+E4wf6VRgtPI1ia3e/h9CaQX4VPgQj010pUtsybymEAunP/x MpAKt8sVrw4RpT+IrhWQNCv9RrR/dEhjJFAYZfLbdrMsfsVI7KuC0lWURzvbzBFciPnO gLqwfb8DnukXu8pY0vXoH1RAnOzPaA+/d66xOrCy4aprFdc1VfESJ2LydXYZ/Eg7Jsve PUsi9zqwDAYU88X+yYWlGv1ksgWAe2AF5LMhLgPCHj0DeQrn2IowejIz9B+L5xidk7Bm 0NNcyYZIkCiH//EMWmLviNRnb39X+Y1sKSWekxIFj2+42Kd3ggcB9aIssGcHRid2eP2q QJKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xvURL+gVfEg8Eqm3Y43MGH+QfOTBmpitIlmBm28iq70=; b=uIQIMWDecIr13GFj/+6xTCcQge4jX4UI9QQwt3AcEuTyIOG3NgCLSaLfilXnhUyKii rPei08zd0nvgnmJDeok8VJkNpO+TavEAFymFahglaevrHAoJjCOeAorTFHvRCRx4nSht MCVqpoXd9YS3CjFzTHRfFpq4SS3AuKJ0ya23owgJpk37d/GUAZwHC6bKHPywF1My+vf8 kxHBrEWCnwAoWADDEXZ63gfUfnxxZWjKvcnqEaLufhcThB61S4JyUFwe35hJ7/s1jtRz VGaQNtPKAu1ocklykWaj8FyRbNdJNTgVcIfDqFvJB/iz2zAyr3gNQ6JJ8vpWXyQ11qAS PLQQ== X-Gm-Message-State: APjAAAVPw+y8CxVuOxgCef6S2ueHEXSCPXk5AgQ43N6EfOQ0kjS2hTHu Tb7nJRPTpq6Zd9WqAVIpj4Y= X-Received: by 2002:a5d:4a91:: with SMTP id o17mr6664796wrq.232.1579638848283; Tue, 21 Jan 2020 12:34:08 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id p18sm706141wmb.8.2020.01.21.12.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 12:34:06 -0800 (PST) Date: Tue, 21 Jan 2020 21:34:05 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Al Viro Cc: OGAWA Hirofumi , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Theodore Y. Ts'o" , Namjae Jeon , Gabriel Krisman Bertazi Subject: Re: vfat: Broken case-insensitive support for UTF-8 Message-ID: <20200121203405.7g7gisb3q55u2y2f@pali> References: <20200119221455.bac7dc55g56q2l4r@pali> <87sgkan57p.fsf@mail.parknet.co.jp> <20200120110438.ak7jpyy66clx5v6x@pali> <875zh6pc0f.fsf@mail.parknet.co.jp> <20200120214046.f6uq7rlih7diqahz@pali> <20200120224625.GE8904@ZenIV.linux.org.uk> <20200120235745.hzza3fkehlmw5s45@pali> <20200121000701.GG8904@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2xrwddvrjt7zdsj3" Content-Disposition: inline In-Reply-To: <20200121000701.GG8904@ZenIV.linux.org.uk> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2xrwddvrjt7zdsj3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tuesday 21 January 2020 00:07:01 Al Viro wrote: > On Tue, Jan 21, 2020 at 12:57:45AM +0100, Pali Roh=C3=A1r wrote: > > On Monday 20 January 2020 22:46:25 Al Viro wrote: > > > On Mon, Jan 20, 2020 at 10:40:46PM +0100, Pali Roh=C3=A1r wrote: > > >=20 > > > > Ok, I did some research. It took me it longer as I thought as lot of > > > > stuff is undocumented and hard to find all relevant information. > > > >=20 > > > > So... fastfat.sys is using ntos function RtlUpcaseUnicodeString() w= hich > > > > takes UTF-16 string and returns upper case UTF-16 string. There is = no > > > > mapping table in fastfat.sys driver itself. > > >=20 > > > Er... Surely it's OK to just tabulate that function on 65536 values > > > and see how could that be packed into something more compact? > >=20 > > It is OK, but too complicated. That function is in nt kernel. So you > > need to build a new kernel module and also decide where to put output of > > that function. It is a long time since I did some nt kernel hacking and > > nowadays you need to download 10GB+ of Visual Studio code, then addons > > for building kernel modules, figure out how to write and compile simple > > kernel module via Visual Studio, write ini install file, try to load it > > and then you even fail as recent Windows kernels refuse to load kernel > > modules which are not signed... >=20 > Wait a sec... From NT userland, on a mounted VFAT: > for all s in single-codepoint strings > open s for append > if failed > print s on stderr, along with error value > write s to the opened file, adding to its tail > close the file > the for each equivalence class you'll get a single file, with all > members of that class written to it. In addition you'll get the > list of prohibited codepoints. >=20 > Why bother with any kind of kernel modules? IDGI... This is a great idea to get FAT equivalence classes. Thank you! Now I quickly tried it... and it failed. FAT has restriction for number of files in a directory, so I would have to do it in more clever way, e.g prepare N directories and then try to create/open file for each single-point string in every directory until it success or fail in every one. --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --2xrwddvrjt7zdsj3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCXidgOwAKCRCL8Mk9A+RD UsYVAJ9eGXMbHPfF6iVdohbsOutnxxHVZgCgoB9GaJJVwzZ6x7iwaAG1yhXeSXk= =iaCM -----END PGP SIGNATURE----- --2xrwddvrjt7zdsj3--