Earlier quoted context omitted.
I'm curious how much excess energy has been consumed, and won't be consumed any longer, as a result of this improvement - even just limited to reduced CPU usage on Windows machines using Firefox to watch Youtube. I love thinking about the impacts of tiny improvements at scale like this, might do some napkin math on it later and see if I can come up with something in the right order of magnitude.
Next: Canadian cars and their daytime running lights.
Firefox engineers discover a Windows Defender bug that causes high CPU usage
141–150 of 223 posts
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#142Windows Defender is a long standing bug in the Windows operating system. ;) My impression is that its invention was for the sole purpose of eradicating the idea that Windows is insecure and prone to viruses, which explains why it can be overzealous and CPU hungry. I would only enable it for family members who don't know what they are doing. For some reason, I haven't needed any form of active virus scanning in someth…
Well, during Windows XP days if you connect to a LAN with compromised devices (in some countries it was popular to just hook up the entire neighborhood to a series of switches or poorly managed office network) before you install every single update possible - too late, your machine is part of the botnet.
Also, some environments require antivirus running for certification even if the machine in question is a linux server with read-only volumes.
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#143Earlier quoted context omitted.
There's a misconception that you need to do something "stupid" to get a virus which is simply not the case. 0 days exist, and worms are still a thing (looking at you samba). A great example is Pytorch just recently had a supply chain attack, and installing the nightly version between December 25th and December 30th, 2022 - would result in your home directory getting uploaded including ssh keys. Chrome also just had a…
windows users will also happily "run as administrator", while a lot of linux users know not to do that in my experience
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#144Earlier quoted context omitted.
Well, also Firefox is making an excessive number of calls to that slow system call compared to other browsers (Chrome, Edge).
Well, it was fast system call until MS added AV hook to it.
Now that you raised it however, even if the system call used to be fast, Firefox is making an extremely high number of calls to that sytem call, and there's always going to be some overhead to that. There are almost certainly ways that Firefox could reduce the number of calls it needs to make.
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#145Earlier quoted context omitted.
In my experience (as a former Firefox dev), antivirus / antimalware software are really poorly behaved. They tend to: - require admin rights (which means that if they have vulnerabilities, it can take control of the entire machine, even if Firefox itself is sanboxed); - monkey-patch the Firefox executable in memory, which works (when it does) as long as the version of the software tracks closely the version of Firefo…
I had always assumed that one application could not touch the memory of another application. Does running as Admin allow breaking this boundary?
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#146Earlier quoted context omitted.
In my experience (as a former Firefox dev), antivirus / antimalware software are really poorly behaved. They tend to: - require admin rights (which means that if they have vulnerabilities, it can take control of the entire machine, even if Firefox itself is sanboxed); - monkey-patch the Firefox executable in memory, which works (when it does) as long as the version of the software tracks closely the version of Firefo…
I had always assumed that one application could not touch the memory of another application. Does running as Admin allow breaking this boundary?
https://learn.microsoft.com/en-us/windows/win32/procthread/p...
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#147Earlier quoted context omitted.
In my experience (as a former Firefox dev), antivirus / antimalware software are really poorly behaved. They tend to: - require admin rights (which means that if they have vulnerabilities, it can take control of the entire machine, even if Firefox itself is sanboxed); - monkey-patch the Firefox executable in memory, which works (when it does) as long as the version of the software tracks closely the version of Firefo…
I had always assumed that one application could not touch the memory of another application. Does running as Admin allow breaking this boundary?
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#148Windows Defender is a long standing bug in the Windows operating system. ;) My impression is that its invention was for the sole purpose of eradicating the idea that Windows is insecure and prone to viruses, which explains why it can be overzealous and CPU hungry. I would only enable it for family members who don't know what they are doing. For some reason, I haven't needed any form of active virus scanning in someth…
There's a misconception that you need to do something "stupid" to get a virus which is simply not the case. 0 days exist, and worms are still a thing (looking at you samba). A great example is Pytorch just recently had a supply chain attack, and installing the nightly version between December 25th and December 30th, 2022 - would result in your home directory getting uploaded including ssh keys. Chrome also just had a…
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#149Earlier quoted context omitted.
windows users will also happily "run as administrator", while a lot of linux users know not to do that in my experience
Yes, I have an absolutely pristine record and I have never, ever copy-pasted a script from the internet with sudo, or piped curl into bash because I'm lazy and I trust most github READMEs. Never.
Installing software to the system should be handled by a package manager, but if you must install something like this, just throw it in a tmpfile and inspect the script before running it.
I know the response to this will be "but the things the script downloads and installs could be malicious", and while this is true, so long as the sources in the install script are fine, I consider this to be a separate issue (but still a big issue).
The issue of trusting source code or binaries is a thing but it doesn't justify copy pasta'ing random scripts in the shell.
Another thing to take note of, there in the past have been bugs in terminal emulators that allowed pasting certain characters that made the text look completely different than what it actually was, so pasting "ls $HOME" could have actually been "rm -rf ~/" for example.
Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage
#150Earlier quoted context omitted.
Yes but people have this nostalgic rose tinted glasses of software from that era - it was hot garbage that crashed all the time because they had so many constraints. Yeah GC introduces a bunch of overhead - but it also means you don't get segmentation faults, memory corruption, etc. Modern software is much more reliable than the software from that era, people nowadays complain when a button isn't working - back then…
> it was hot garbage that crashed all the time because they had so many constraints Correlation != causation. I started using PCs heavily in the mid 90s, and yes "Illegal Operations" were abound. However, the SDLC has also come a long way with testing, automated QA, etc. Back then there was a lot more "wild west" going on for both hardware and software. Generally, practices are much more mature by default nowadays.
I remember people debating using global variables back then - I haven't seen a team not using unit testing in years. Scaling code up to multiple contributors, standardizing abstractions, building for automated testing, etc. We've taken many tradeoffs in the direction of development scalability and stability/correctness at the expense of performance and simplicity.
I still see people praising visual basic form builder - I think those were the kids that started doing dev with that and we're impressed they can put dialogs on a screen. I think it would be extremely hart to find someone who maintained a nontrivial app with that code behind shit and thought it was a good idea.