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... So it was easier to me to look at different sources (WRK, ReactOS, Wine, github, OSR forums, ...) and figure out what is RtlUpcaseUnicodeString() doing here. > Whatever > the license of that function might be, this should fall under > interoperability exceptions... > > Actually, I wouldn't be surprised if f(x) - x would turn out to be constant > on large enough intervals to provide sufficiently compact representation... > > What am I missing here? -- Pali Rohár pali.rohar@gmail.com