Closed Bug 1478032 Opened 6 years ago Closed 5 years ago

Investigate the use of WOW64_64 when querying for maintenance service install

Categories

(Firefox :: Installer, enhancement, P1)

All
Windows
enhancement

Tracking

()

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: jimm, Assigned: robert.strong.bugs)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

See the Microsoft list for full context.

--

Probably it’s below code which queries whether the maintenance service is installed, but it passes WOW64_64 flag which goes to native arm64 registry hive. The expecting key is actually written to WOW node by the installer. This also looks a problem for x86 on x64, but it doesn’t show up because x64 always prefer installing x64 Firefox instead of x86.

If so, I am wondering whether wrk.WOW64_64 is necessary here? Or we’ll need shim it for arm64.

https://github.com/mozilla/gecko-dev/blob/d0c49b92d2215448cd8e715bc1144fb2e8016350/browser/components/preferences/in-content/main.js#L524
Rob, would you mind poking through this to see what we can do here? Apparently we're having some trouble getting non-UAC updates working on the new ARM Win10 builds. There's a full discussion in the Microsoft list.
Flags: needinfo?(robert.strong.bugs)
Attaching further detail to the bug:

It seems Firefox installer (like maintenanceservice_installer.exe) is written by some  macro language (see below snippet) which calls IsWow64Process and only passes KEY_WOW64_64KEY if IsWow64Process returns true. Which kind of make sense because KEY_WOW64_64KEY should only be used when running under WOW64. But we shim IsWow64Process and return false for x86 on arm64, so installer would write register data to WOW node. The problem is update.exe passes in KEY_WOW64_64KEY blindly as below code shows, which is expected to fail because registry data is installed to WOW node.  Probably update.exe should also check IsWow64Process because passing the flag, then it will be consistent with installer? 

https://github.com/mozilla/gecko-dev/blob/55f2b0d77abe8a4812849d924c75687a849fbf19/browser/installer/windows/nsis/stub.nsi#L349

  ${AndIf} ${RunningX64}

    SetRegView 64

    ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9

  ${EndIf}
Looking
Assignee: nobody → robert.strong.bugs
Flags: needinfo?(robert.strong.bugs)
Priority: -- → P3
Priority: P3 → P1
Attached patch patch rev1 (obsolete) — Splinter Review
I've manually verified this sets the registry values in the correct location
Depends on: 1514568
The nightly build I am using was extracted from a mar file and the files in it are signed with the Mozilla fake certificate which prevents me from testing completely but I should be able to verify that the maintenance service is checking the correct keys, etc.

I filed bug 1514568 to get the files signed correctly.
I've also been able to update using the maintenance service with the binary certificate checks disabled so the certificate checks should be all that is left to verify works correctly.
Attached patch patch rev1Splinter Review
I verified that the registry keys are checked by the maintenance service.

Clients won't be able to use the maintenance service to update until bug 1514568 is fixed.
Attachment #9031734 - Attachment is obsolete: true
Attachment #9031772 - Flags: review?(mhowell)
Depends on: 1514124
Per bug 1514568 comment #3

Once Bug 1514124 lands, and builds are being done on mozilla-central, the builds will be signed with the nightly cert.
Asa, just an fyi since I know you've been trying out the builds.
Flags: needinfo?(asa)
Attachment #9031772 - Flags: review?(mhowell) → review+
Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d68a1c8025fb
Add aarch64 detection and set the correct registry views in the installer. r=mhowell
https://hg.mozilla.org/mozilla-central/rev/d68a1c8025fb
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Depends on: 1515075
Flags: needinfo?(asa)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: