Firefox vs. rthreads
tedunangst.com
tedunangst.com
https://www.mozilla.org/en-US/firefox/46.0beta/releasenotes/
http://jandemooij.nl/blog/2015/12/29/wx-jit-code-enabled-in-...
> What this means is that each page holding JIT code is either executable or writable, never both at the same time.
For anybody, like me, who didn't already know :)
It's a solid security enhancement.
See also, Theo de Raadt's recent comment on why OSes can't enforce W^X on userland (yet): https://marc.info/?l=openbsd-misc&m=145943630726937&w=2
Each layer of protection fends off another class of attackers.
An attacker with infinite determination, money, or time will always push past your defenses.
That's nice and all, but if the people behind firefox keep on taking away the features that convince people to use it (Panorama, for starters) then these little accomplishments don't accomplish much.
Edit: The page that made the above recommendation https://support.mozilla.org/en-US/kb/tab-groups-removal
I also know Chrome also makes a million calls to gettimeofday so it is effectively relying on the Linux vdso performance.
When you are running the same software on multiple OSes side by side (like Chrome on Windows followed immediately on Linux) it sets your expectation for what is acceptable performance. (It's probably worth mentioning here that Firefox on Linux today is much better than used to be.) I appreciate that OpenBSD has a different culture and goals but I feel sorry for them that they don't get a good browser because of it.
> As you’ll recall from page two of your Building a Multithreaded Kernel textbook, when a high priority thread waits on a lock, it’s supposed to gift its priority to the lock holder to ensure progress is made. We (I) never quite got around to implementing that, and for several years it seemed we just might get away with it. The history of rthreads is pretty much maybe tomorrow, maybe not.
It sounds like OpenBSD has gotten away without having priority inheritance for most (all?) of it's history.
[0] http://man.openbsd.org/OpenBSD-current/man5/malloc.conf.5
I thought so too but then when I looked for such changes, I couldn't find any.
cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports/www/mozilla-firefox
cd ports/www/mozilla-firefox
grep -Ri malloc .
All that was found was a few irrelevant things which matched because "malloc" was in the name of the referenced files: ./patches/CVS/Entries:/patch-js_src_ctypes_libffi_src_dlmalloc_c/1.4/Tue Sep 2 16:43:04 2014//
./patches/patch-js_src_ctypes_libffi_src_dlmalloc_c:$OpenBSD: patch-js_src_ctypes_libffi_src_dlmalloc_c,v 1.4 2014/09/02 16:43:04 landry Exp $
./patches/patch-js_src_ctypes_libffi_src_dlmalloc_c:--- js/src/ctypes/libffi/src/dlmalloc.c.orig Wed Jul 23 05:13:14 2014
./patches/patch-js_src_ctypes_libffi_src_dlmalloc_c:+++ js/src/ctypes/libffi/src/dlmalloc.c Thu Jul 24 20:47:22 2014The idea is just having a special page that is mapped as read-only in userspace and kernel writable. If it's correctly implemented, it should be safe.
* The vDSO is mapped at a fixed address in every process, making return-to-libc-style attacks easy. This doesn't seem to be necessary, though, since it's a virtual dynamic shared object, and you can ASLR it just like you can ASLR any other dynamic library. Just tell the program where you put it.
* The vDSO (or at least the vsyscall page, not sure if this is still true) includes a syscall instruction, making it a juicy target for return-to-libc-style attacks. But for gettimeofday() you don't need that. Just include the instruction to read some dedicated read-only page from memory-mapped timer hardware, or run RDTSC, or whatever, and make your ABI such that it permits the vDSO call to fail and regular libc code might have to make a real syscall if it does. Or that the vDSO isn't guaranteed to be present, and is missing if hardware support is missing.
Any further information here?
about:config → layers.acceleration.force-enabled = true, layers.offmainthreadcomposition.testing.enabled = true, gfx.xrender.enabled = false.
Also, some "beta quality" features: browser.tabs.remote.autostart = true (e10s multiprocess) + layers.async-pan-zoom.enabled = true (exactly what it says, async scrolling like in Chromium, IIRC it requires e10s).
With all these enabled in stable Firefox on FreeBSD, the experience is excellent.