211 points · by pjmlp · 2y ago · 109 comments
What I found is that the Rust HALs are incredibly thin and understandable, I was digging into MCU datasheets within a month of first using embassy (with no prior embedded experience).
I strongly encourage you to poke around in the lower levels of the IDF. It's equal parts fascinating and horrifying.
Espressif's code is... interesting, to say the least.
https://docs.embassy.dev/rp-pac/git/default/dma/struct.Chann...
Rust in Linux is about the Linux kernel having more rust code but Linux is not firmware in the traditional sense (unless you’re talking about ucLinux which no one in my experience uses) and this would have nothing to do with porting Android to another kernel which I can’t see happening considering how much custom kernel code there is (unless you are talking about fuschia but fuschia is not Android even though it implements an Android compat layer).
Very likely if Firmware is successful they would use the current positive talking points from this blog post and lessons learned and keep trying to secure Android.
My guess would be the kernel and/or JVM are on the next step list.
I wouldn't bother integrating Rust into the JVM because there's limited security value. There may be ergonomic advantages in terms of project management but my hunch is that those are limited for something mature like Dalvik. If they rewrote it to use Futamura projections like Truffle, then Rust would be much more interesting as it would reduce the possibility of JIT bugs AND basically make it impossible to do a sandbox escape (most sandbox escapes target the JIT and thus other memory safety issues are rare & unlikely). Finally Dalvik security is unlikely to matter all that much because they rely on process isolation as the security model (Chrome does too but sometimes it loads multiple V8 isolates in a single process so V8 escapes are more valuable).
> My guess would be the kernel
There's already a Rust in Linux project & if you missed the news there's a lot of political in-fighting on the LKML. It's unlikely that Google has much sway here because even though they employ maintainers like Ted Tso, I suspect their influence on this matter is limited given how staunchly opposed he is & I doubt they'd be firing engineers like Ted over this. The Android team is going to have limited additional influence beyond what's already going on, but the Linux kernel itself is under no threat of being rewritten in Rust any time soon & Android isn't migrating to another kernel any time soon.
Calling varargs functions over FFI has been possible since before Rust 1.0, here's printf, for example https://docs.rs/libc/latest/libc/fn.printf.html
(If you wrote to an array on the stack, you could turn it into a Cstr too, instead of heap allocating, but then you'd have a max string size, which may or may not be something you'd want.)
Edit: Firefox on Linux/x64.
In recent years, FAANG web teams are way more invested in automating things than engineering them to be efficient, durable, or gracefully adaptive products.
(At Google).
I tried though. My button just did a post and I handled that as opposed to using js to do it.
var match = data.match(/([\s\S]+?)<div data-is-preview.+?>([\s\S]+)<\/div>/m);And a (closed in favor of the bugzilla entry) webcompat issue: https://github.com/webcompat/web-bugs/issues/125193
That doesn't sound good...
FFS.
Personally when I bang my toes against a corner, I don't think about removing my feet just to prevent toe banging.
---------------
Reductio ad absurdum aside, if I'm experiencing an issue in a browser, my first thought is to diagnose and fix the issue or find an expectable workaround rather than change to a browser with obvious privacy issues.
https://www.mozilla.org/en-US/privacy/firefox/
Currently, you'll see words, phrases, and names like "Firefox sends", "telemetry", "Google", "Microsoft", "share this with our partners", "share that data with its partners", "sends us data", "share aggregated data", "our third-party ad platform Kevel", "AdMarketplace (a third-party referral platform)", "Cloudflare", "Comcast", "Adjust", "Google advertising ID", "our partner Fastly", and so forth.
In my opinion, I wouldn't expect to see any of those in the privacy policy of any software product that truly respects my privacy.
With a little care, you can get the same code size as you'd get in C.
I had to stick it in brave for it to work. I guess google doesn't make web pages anymore...
So, whatever shenanigans they're doing to mess with the page rendering are completely unnecessary for the reader.
A blog entry text page shouldn't be this hard.
Of course, rendering a text blog page should be trivial, but... Google. I expect little different there.
> Uncaught InternalError: too much recursion
Page works for me, but the CSS is screwed up by adblock. It is what it is.