Live data from Hacker News

Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

bugzilla.mozilla.org

341–350 of 443 posts

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#341

Earlier quoted context omitted.

I'm not sure how you can possibly qualify VirtualProtect as "an expensive platform feature". Looking at the operation that VirtualProtect actually has to perform, from first principals, it should be one of the cheapest syscalls in the entire kernel. The bug was that ETW (in the antivirus process) was doing something braindead; zeroing a megabyte of memory unnecessarily every time someone called it just to get the siz…

> it should be one of the cheapest syscalls in the entire kernel. That's an educated guess... that is unfortunately very easy to disprove :(

I'd love if you'd elaborate on this. I know very little about what VirtualProtect actually does under the hood but, in theory, it should just have to flip a couple bits in the address space mapping which says what the protection level is.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#342

Earlier quoted context omitted.

I'm not sure how you can possibly qualify VirtualProtect as "an expensive platform feature". Looking at the operation that VirtualProtect actually has to perform, from first principals, it should be one of the cheapest syscalls in the entire kernel. The bug was that ETW (in the antivirus process) was doing something braindead; zeroing a megabyte of memory unnecessarily every time someone called it just to get the siz…

Branch prediction should be a super-dumb algorithm, but then Spectre comes along and, oh dear. Malware protection algorithms make fools of us all.

I would not consider a fast AND accurate branch predictor a trivial matter at all

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#343
post #264

It's so frustrating this discussion took five years . I'd be grateful for an overview of the bug. I don't think I've seen it on my two systems but I can't be confident.

Windows Update and Windows Defender are notorious piles of shit that eat up huge amounts of CPU for seemingly no reason. The problem is that there is zero incentive to get them right. Nobody is going to get promoted because they use 10% less CPU. Nobody is losing their bonus because 10% of all computers melt down. etc.

This bug would suggest that ETW is actually the giant pile of shit.

Which, in my experience, isn't far from the truth.

Other people think so too: https://caseymuratori.com/blog_0025

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#344

Earlier quoted context omitted.

Wow, that's fascinating. It really speaks to the utter dominance of Windows over Linux more than anything else. Like even among Firefox users, as of last year , there were an order-of-magnitude more Windows 7 and 8 users than Linux 5.x users.

Similar numbers can be seen with Steam demographics: Linux is nothing compared to Windows 7, to this day.

Windows 7 - 1.6%

Other - 4.09%

https://www.statista.com/statistics/265033/proportion-of-ope...

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#345

Earlier quoted context omitted.

An analogy can only get you so far, but in this case the bug is caused by Microsoft Defender, yet Firefox, the car manufacturer, is a different entity. So I wouldn't call it a recall.

A bunch of cars across many manufacturers were recalled in the 2010's due to a defect in the airbags made by the same manufacturer. One could also argue that the OS is the car, the browser is the chauffeur, and the user is the passenger.

With regard to browsers, I think we need more manufacturers, not just the GM (Google/Chrome) of browsers. I want Ford in there as well. (Sticking with US automotive companies).

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#346

Earlier quoted context omitted.

> Are you sure you want to invoke this logic? Because following it through imagine the energy savings if Firefox users switched to Chrome. Ironically, Mac users routinely complain about how power-hungry Chrome is on the Mac. Safari is significantly more efficient.

Is that because of the quality of Chrome or because Safari is a "blessed" application and probably gets to do things other applications do not? Entirely serious question. Apple is known to severely privilege their own applications over competitors.

I would be at least slightly surprised if Apple would deliberately hold back power-saving techniques from third party developers. It’s not like this is something that makes Safari much more appealing to users. Most users wouldn’t even notice that their choice to use Safari is responsible for their great battery life.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#347

Quick napkin math of the wasted power : Firefox has ~300e6 users, let's assume the bug wasted 5 extra watts 4 hours a day. That's 250 megawatts saved, the equivalent of an average coal power plant. Because some Microsoft engineer missed a bug.

It's 5.5 MW.

That's not how power or energy works.

5 [W*hr/day] (Kept in energy units per interval rather than average power).

200e6 users/day who surf for maybe 4 hours/day

5 * 200e6 * 4 / 24 = 133 [MW*hr/day] (133/24 = 5.5 MW)

A typical US home uses 11 [MW*hr/y] or 0.36 [MW*hr/day].

(Convert to power draw, that's 0.015 MW.)

mean consumption of roughly 400 US homes (133 / 0.36).

The smallest US grid-tied operational nuclear power plant produces 600 MW. 133 MW very small coal power plant would 400 MW.

https://data.firefox.com/dashboard/user-activity

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#348

It's so frustrating this discussion took five years . I'd be grateful for an overview of the bug. I don't think I've seen it on my two systems but I can't be confident.

Five years is nothing for MS. You should see how long the bug in File Explorer has been there, where after navigating to a folder and pressing the down arrow, the second item is selected instead of the first. And it's one of those things that, even though I'm aware of it, it still always catches me causing extra keystrokes. It's like they're trying to force me to use the mouse for some reason.

That doesn't particularly sound like a bug. There may be varying opinions about whether it's good or not, but it kind of almost makes sense to me.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#349
post #187

Conspiracy theory — could this have been done on purpose for browser share dominance purposes?

Nope. MDE is shitty. It pushes updates to millions/billions of machines without sufficient testing and monitoring.

There was a MDE bug that caused Chrome to crash whenever dragging tabs.

Another time, MDE also appeared to "remove" all of some users apps when it deleted shortcuts.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#350

Earlier quoted context omitted.

> Are you sure you want to invoke this logic? Because following it through imagine the energy savings if Firefox users switched to Chrome. Ironically, Mac users routinely complain about how power-hungry Chrome is on the Mac. Safari is significantly more efficient.

Is that because of the quality of Chrome or because Safari is a "blessed" application and probably gets to do things other applications do not? Entirely serious question. Apple is known to severely privilege their own applications over competitors.

If only the underlying engine were open source so people could see what “secret APIs” (sic) it was using…
Post reply on HN