193 points · by vermaden · 5y ago · 110 comments
I, for one, learned quite a few things too out of your presentation, which is here: https://2019.eurobsdcon.org/slides/NUMA%20Optimizations%20in...
And we have John Baldwin to thank for upstreaming the Netflix kTLS.
It seems like encrypting the video stream traffic at this kind of scale requires a substantial engineering effort and special hardware.
Encryption also means that shared downstream caches at ISPs can't do anything to reduce their bandwidth consumption. The only option is to contact Netflix and physically install one of their edge caching boxes.
Content tampering protection could be obtained by simply computing content hashes offline once, which the clients could verify.
True there's no out-and-out porn, but there is content that's close to the line, and beyond that there are themes that could be indicators that a viewer is gay, or in some other demographic that he might want to keep private.
Target can tell if you're pregnant based on your shopping; certainly there's a lot that can be inferred from the movies you watch.
I am very skeptical about that story, it sounds too good/scary to be true, and there is only 1 reported incident, without proper sources. Sounds made up to me.
https://medium.com/@colin.fraser/target-didnt-figure-out-a-t...
Such as an end user device asking for 4k, but a middlebox somewhere between the customer and Netflix inspecting the http content and blocking it (or modifying the client request in flight), because "only 480p allowed here" or something like that.
But, beyond that, the battle to use http when it makes sense has been lost. Modern platforms strongly encourage https and discourage http.
I'm genuinely curious: why did you implement it in FreeBSD rather than Linux? Isn't that kind of offload something that already exists in Linux? Or does something in the way Linux is implemented/designed that makes it impractical / impossible to implement as efficiently? Or is somehow Linux not secure enough for your use case? Or not something else enough?
I'm asking because I'm always interested to know what are the practical limitations of Linux and also because, while I think it's nice that Linux had some serious competitors, I cannot help being a bit sad that contribution like this will only benefit the few people that use FreeBSD (even if to be fair, it seems that it will benefit all netflix customers at least, which is quite a few people ;) )
Same could be said the other way around, the thing is Linux can implement it and even take the code, the other way is rather difficult....so much for freedom.
And not sure what you mean with "few" people, the few Playstation 3/4/5 users? Juniper? OpnSense/Pfsense installations? Or the few Truenas/Freenas users?
>Or not something else enough?
The point of the licence is a good point. Is the kind of code drewg123 is referring to regularly copied from BSD to Linux? (i understand it should be possible in this direction?).
Thanks for the video, looks like exactly what I was looking for, I will watch it later.
Edit: It is! neat!
# uname -a
FreeBSD freebsd 13.0-BETA1 FreeBSD 13.0-BETA1 #0 releng/13.0-n244471-638e531019f: Fri Feb 5 17:12:07 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
# zfs version
zfs-2.0.0-FreeBSD_gf11b09dec
zfs-kmod-2.0.0-FreeBSD_gf11b09decEdit: Compared to the version of ZFS that was in base FreeBSD 12.x I mean
The installation was much easier compared to Arch, almost all packages that I wanted I just got with `pkg`. With using sway and wayland, the experience is really really fast and snappy even with this old laptop. At least compared to OpenBSD and xorg, the desktop experience here just flies.
It has been a good Sunday so far...
This will kinda help you:
Description from the page itself:
up.bsd.lv is a proof-of-concept of binary updates using freebsd-update(8) for FreeBSD 13.0-CURRENT and 12-STABLE to facilitate the exhaustive testing of FreeBSD and the bhyve hypervisor and OpenZFS 2.0, and to help elevate ARM64 to Tier 1 status. Updates are based on the SVN revisions of official FreeBSD Release Engineering weekly snapshots.
Features:
- Kernels are built with the GENERIC-NODEBUG configuration file
- /etc/freebsd-update.conf is modified to use up.bsd.lv
- /usr/sbin/freebsd-update is modified to "xargs" parallel phttpget (Thank you Allan Jude)
- freebsd-update(8) does not output to the $PAGER
Hope that helps.
But OPNsense is based on HBSD 11.2 ATM
>The latest release is based upon HardenedBSD 11.2
``` FreeBSD router.local 12.1-RELEASE-p12-HBSD FreeBSD 12.1-RELEASE-p12-HBSD ```
[1]: https://svnweb.freebsd.org/base?view=revision&revision=36816...
# uname -a
FreeBSD freebsd 13.0-BETA1 FreeBSD 13.0-BETA1 #0 releng/13.0-n244471-638e531019f: Fri Feb 5 17:12:07 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
# kldload if_wg
# kldstat
Id Refs Address Size Name
1 30 0xffff000000000000 11fd228 kernel
2 1 0xffff0000e1800000 24000 uhid.ko
3 1 0xffff0000e1824000 24000 usbhid.ko
4 1 0xffff0000e1848000 25000 hidbus.ko
5 1 0xffff0000e186d000 25000 wmt.ko
6 1 0xffff0000e1c00000 452000 zfs.ko
7 1 0xffff0000e2052000 52000 if_wg.koThere seemed to be some talk of Linux I noticed in past years, and I’ve been thinking about trying to out again, but I’d feel better if I knew that it was still well-used.
For info, a key thing about Tier 1 architectures is that "Binary updates and source patches for Security Advisories and Errata Notices will be provided for supported releases" (https://docs.freebsd.org/en_US.ISO8859-1/articles/committers...), which would make maintaining ARM-based SBCs much easier (no need for setting up cross-compilation toolchains or for very slow compilation on the SBCs) and could make FreeBSD an even better OS for IoT stuff.
https://lists.freebsd.org/pipermail/freebsd-arch/2019-Decemb...
I made some significant speedups a couple years ago, but I'm sure there's still room for further improvements, especially if you have hardware which I didn't test with.
(In fact systemd and launchd are so tailored to their respective operating systems that FreeBSD likely would have to do their own init replacement if they cared to.)
It was also not unique in parallelising startup tasks. Even sysvinit can be configured to do that with insserv+startpar.
Besides boot time on any init system with a fast ssd seems to be pretty damn quick. Saving 10 seconds every month will take a long time to pay off.
It's a toll that I decided to accept, but most people aren't aware of that.
Otherwise, I'm not aware of any easy wins (unless you're running 10.1 or older, in which case set hw.memtest.tests="0" to disable the boot time memory test which is very time consuming if you have a lot of ram and doesn't seem to be very useful; it was disabled in 10.2 and later).
If you can see what steps are particularly slow, some of them might be influenced to be a bit faster (eg, if it's waiting on usb scan to mount disks, you can make that time out sooner if it's not necessary on your system; you may be able to do background dhcp instead of synchronous dhcp, etc). But I think someone could spend some real time making it faster to the benefit of those who boot often.
Edit: following in the footsteps of cperciva's work; especially the profiling setup.
Native client: no. The web client is useable though, and virtualization can work: https://www.davidschlachter.com/misc/freebsd-videoconferenci...
As others have mentioned the comparatively slow boot is because (for simplicity's sake) the process isn't parallelized. You can install alternate init systems from ports if you want to speed this up.
I used Zoom on FreeBSD. By use I mean I was able to be in a meeting, see screen share, share my screen, but I had to dial in for audio and never tried webcam.