This version of the blocklist should be functionally comparable to the mozglue
based blocklist, except:
* We hook NtMapViewOfSection instead of LdrLoadDll: The former allows us to
easily obtain the module file name being used for the load. The latter
requires us to essentially emulate the loader's path searching, which is
a perf hit, potentially a correctness issue, and more work to do given the
limited native NT API set.
* Since the paths in native NT land are all unicode, and since this code is
critical to startup performance, this version of the blocklist uses unicode
strings instead of ASCII strings. My thoughts here are that we don't want to
be wasting time on every DLL load doing ASCII-to-unicode conversion every
time we want to do a blocklist string comparison.
* I am completely aware that this leaves us in a bizarre situation where we have
two copies of the blocklist in our binaries: one unicode version in firefox.exe,
and one ASCII version in mozglue.dll. Once we (hopefully) move to using the
launcher process by default, the ASCII copy can go away. In the meantime, we
need to be able to use either one depending on how Firefox was started. I am
happy to make the Native NT blocklist Nightly-only to assuage these concerns.
This version of the blocklist should be functionally comparable to the mozglue
based blocklist, except:
* We hook NtMapViewOfSection instead of LdrLoadDll: The former allows us to
easily obtain the module file name being used for the load. The latter
requires us to essentially emulate the loader's path searching, which is
a perf hit, potentially a correctness issue, and more work to do given the
limited native NT API set.
* Since the paths in native NT land are all unicode, and since this code is
critical to startup performance, this version of the blocklist uses unicode
strings instead of ASCII strings. My thoughts here are that we don't want to
be wasting time on every DLL load doing ASCII-to-unicode conversion every
time we want to do a blocklist string comparison.
* I am completely aware that this leaves us in a bizarre situation where we have
two copies of the blocklist in our binaries: one unicode version in firefox.exe,
and one ASCII version in mozglue.dll. Once we (hopefully) move to using the
launcher process by default, the ASCII copy can go away. In the meantime, we
need to be able to use either one depending on how Firefox was started. I am
happy to make the Native NT blocklist Nightly-only to assuage these concerns.