Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3105922ybl; Mon, 20 Jan 2020 16:08:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzpZoaqvTd7KXsdX4x4Rqc+hIb7Ul4vJE63cs6Vr2BnDJLt5zBrMAr4lMbc8hIitRPqzGSo X-Received: by 2002:aca:b286:: with SMTP id b128mr1053719oif.147.1579565299741; Mon, 20 Jan 2020 16:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579565299; cv=none; d=google.com; s=arc-20160816; b=QUaysf1Y9Q2zuQRopqngSen6jXckMkYxSE2uGtuW0I33UpOAZ1Br4D4S+1XaOMBqKz EHiTplhYWF/rk6zbrJkYKANN8oi2xiOVaSidnWGlxkiophqpDE9Q3H4kuHr6yDkv8Qh2 UuP3SMljfPzIv6G7LI00AemwVoYQvxvb5E0gT24EA58FMy7pYkZTBQBHU/U1Q5MErBzE 7qrnDMTyLDkhh6ikaGmYHv8A3DklJeAkT/DRSFmKkHTnG+TN9uK2ntzdvG7iZhgIiYls fvxNA8FwLMWPi89jMHX02ergcUVWxI8pGmd+UBYadWbrehpjbN+LFCAcAE9OiIl6ayKF S0Qg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=poFU/sfoiAw40iDqlTYNF+DHZGsH/EaWMEzXwlfL62U=; b=lktVlb32tVP9K2D/R3OWQwWcnPWeMcTCyqdUwGG0dCj98WD/FAyI6KyMgcnvrA3oZC tScxGiXeHZ8p5UhZNACoa4uxURysPaoAE0dJXgDViORIMsBzfu1QcyPgQbX0x0V6rv1q LFIZ/s9mpiNam/HigBcTUq5vCPRpl3lqdxFLKW0q46zX/Jrw1labqxxuKwdjZaBFwFgI Y9qrtRfEA3Zvr6e5r8J/eiNqQwwgWiiXLZM7Yq93dFQ31g2wvbdV85ao228oY0o0w8SF dgVPvj3qWC9BrRJ68ZZ0fDmG+6BH+tAxFCzNdfIb2fkkIwiP65fqPcxgi/XQpvzwnoXi 3Ahw== 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 v6si9761284ote.41.2020.01.20.16.08.05; Mon, 20 Jan 2020 16:08: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; 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 S1728776AbgAUAHI (ORCPT + 99 others); Mon, 20 Jan 2020 19:07:08 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:57038 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbgAUAHI (ORCPT ); Mon, 20 Jan 2020 19:07:08 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ith4P-00CK6C-FD; Tue, 21 Jan 2020 00:07:01 +0000 Date: Tue, 21 Jan 2020 00:07:01 +0000 From: Al Viro To: Pali =?iso-8859-1?Q?Roh=E1r?= 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: <20200121000701.GG8904@ZenIV.linux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200120235745.hzza3fkehlmw5s45@pali> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 21, 2020 at 12:57:45AM +0100, Pali Roh?r wrote: > On Monday 20 January 2020 22:46:25 Al Viro wrote: > > On Mon, Jan 20, 2020 at 10:40:46PM +0100, Pali Roh?r wrote: > > > > > 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. > > > > > > So... fastfat.sys is using ntos function RtlUpcaseUnicodeString() which > > > takes UTF-16 string and returns upper case UTF-16 string. There is no > > > mapping table in fastfat.sys driver itself. > > > > Er... Surely it's OK to just tabulate that function on 65536 values > > and see how could that be packed into something more compact? > > 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... 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. Why bother with any kind of kernel modules? IDGI...