HNHacker News
TopNewBestAskShowJobs

marcan_42

11,384 karma · joined December 5, 2017

submissionscomments
marcan_42··on Librem 5: First Impressions
strcat is right here. Purism designs and markets their devices, effectively, to cater to a crowd that believes that devices with actual security are inherently evil, because they do not understand it. You can have better security with user control, but for that you need to look at the details. They don't care about the details; their story is all fluff under the guise of freedom and privacy.

Purism's marketing material is outright deceptive, e.g. they insist that in competing phones the baseband blob has access to system memory, which is a lie. The reality is that the baseband blob in the Librem 5 (which is every bit a giant blob as that in the competition) has access to the USB port of the AP and there is no filtering implemented yet, so the attack surface it is exposed to is every USB driver in the Linux kernel, which is much worse than systems with embedded basebands and proper memory firewalling where the baseband has no more inherent access, but is exposed to a smaller attack surface. That means that you are more vulnerable to giant blobs doing evil things with a Librem 5 than with, say, an Android phone running a free OS build.

Then there's the whole hilarious situation with the RAM initialization blob where Purism went and hid it behind two layers of CPUs (not execution, just handling it), because somehow doing that - which provides absolutely no benefit to the user, it's just a waste of engineering time - made it possible to certify the phone under the FSF's utterly broken and nonsensical "Respects your Freedom" program, even though precisely zero freedom was gained by doing this, since it still running the same blob on the same final CPU with the same access. All the while while reducing security, since the blob is then made no longer part of the normal OS image and is not validated with it, so it could be backdoored as part of a supply chain attack and you would be none the wiser.

The whole thing just stinks the more you look into it, and it is completely evident that the folks behind Purism are a mix of deliberately deceiving people and just clueless about security and modern embedded platforms.

marcan_42··on Mac Studio M1 Ultra Teardown [video]
It's not the secure enclave thing. These aren't SSDs. These are raw storage modules. The SSD controller is built into the M1/T2. You are upgrading the raw storage behind a single, global SSD. Of course when you change the layout of the raw storage, the data arrangement changes and you have to reformat. It'd be like swapping out chips on a regular SSD and expecting your data to still be there.
marcan_42··on George Hotz against the institutions
My name was on the Sony lawsuit next to his, for what it's worth. I don't know him personally, but I did have to ask him to give us credit for just implementing our method when he posted the PS3 metldr keys without explanation, a week after we'd given a talk on it.
marcan_42··on George Hotz against the institutions
Let's just say I've talked with people who have worked with him on comma.ai and... I heard his cars would be driving into everything if it were just his code running them without all the safety features the folks around him added.

geohot isn't dumb, but he's also extremely good at making himself look like a lone genius, all the while he heavily relies on those around him. This has been a pattern his entire career. He started out pretty clueless and relying on others; these days he's pretty good but still relies on others, and at no point did he learn to humble himself a bit and credit everyone else.

I personally experienced this when we gave a presentation on Sony's PS3 ECDSA screwup, and a week later he posted the root keys obtained using our method. I had to email him to ask him to give us credit since he literally just implemented what we described in our talk, and made no mention of it. Then Sony sued us all (my name was on the lawsuit next to his, even though I had nothing to do with his idea of posting the keys outright).

The reality is "lone geniuses" don't exist. I'm pretty good at what I do (and I also have 15-hour coding marathon live streams on YouTube, FWIW), but to accomplish something great you have to work with others, whether you give them credit or not. The major projects I've worked on aren't "my" projects (even those which I lead/led); they've all been a team effort.

marcan_42··on George Hotz against the institutions
Reminder that geohot wasn't the first person to jailbreak an iPhone; that's an oft repeated myth. He was the first person to publicly carrier unlock an iPhone, which he did using information and methods he mostly learned from others.
marcan_42··on Asahi Linux alpha release
That's implied in how page tables work. If your pages are 16K then all your page levels are going to shift up two bits compared to 4K. Again, these aren't 16K "huge pages", that'd be nice. This is changing the baseline page size.

Lots of things in the kernel count sizes in pages. If your page size can vary, suddenly a lot of kernel constants become boot-time variables. And if it can vary from process to process, suddenly lots of things are per-process. Say you run a 4K process. It wants to map some data from a file. That data is in the page cache in 16K chunks. Now you have one page cache page mapped to anywhere from 1 to 4 4K pages. How do you keep track of that? That wasn't necessary before.

What happens if a 16K process shares memory with a 4K process? If the 4K process sends the 16K process a 4K page, that page can't be mapped at all.

See how this is makes everything much more complicated?

marcan_42··on Asahi Linux alpha release
That's the issue: 16K pages never exist alongside 4K pages in the same address space half. The CPU has two mode flags, for kernel and userspace respectively. There is no way to mix modes within the same address space half. And changing the page size completely changes the page table structure and boundaries for different walk levels, the huge page size, etc.

Rosetta runs the userspace half in 4K mode, and XNU had to be reworked a lot to support this. Linux could of course be reworked to do something similar on paper, but it's a hugely intrusive change and it'd actually be easier to just make the kernel support 4K/16K pages in a single build first.

Hugepages aren't like that, they actually coexist with normal pages. In general, hugepages are just a pile of contiguous/aligned small pages that the kernel manages as a unit, and it flags them to tell the MMU "I promise these are all one big contiguous chunk so you can optimize it to one larger TLB entry". Depending on the page table structure they might be coalesced to a higher-level page table entry, skipping a page table walk level.

marcan_42··on Asahi Linux alpha release
No, you can't really save/restore the hardware context to pull this off. You'd need actual virtual devices for ~everything at some level. I won't go as far as saying it's impossible a priori, but it'd be a huge undertaking.
marcan_42··on Asahi Linux alpha release
It is completely different from hugepages. Hugepages exist alongside normal pages.
marcan_42··on Asahi Linux alpha release
Specifically, things on that list are things that work already, but are disabled or not merged into our release kernels yet because they aren't quite ready for end users.

So they "work" already, just not in the kernel packages I'm building :-)

marcan_42··on Asahi Linux alpha release
Virtualization is working on Linux, but the macOS story is not that. We run macOS inside a custom VM hypervisor I wrote, on bar metal, passing through almost all the hardware.

macOS is unlikely to run inside a VM on Linux any time soon, because the desktop environment requires a paravirtualized Metal graphics device, which means writing an entire Metal implementation for Linux. You can run the XNU kernel in text mode though, even on non-M1 systems.

marcan_42··on Apple’s Universal Control
It's probably based on AWDL, same as AirDrop. So yes, that's a proprietary peer-to-peer protocol that ignores your home network.
marcan_42··on Asahi Linux alpha release
The raw image support has nothing to do with silicon bring-up. That is an option for a userspace tool running in macOS recovery mode. At that point you're well past silicon bring-up. I don't know why people keep conflating those two things... it doesn't make any sense whatsoever. Silicon bring-up would happen via iBoot on completely unlocked chips (no secureboot fuses).

The raw image mode was added for us. Apple has absolutely zero use for such an option.

marcan_42··on Linux on an M1 Mac
You realize you're linking me my own tweet, right?

[1] isn't cutting corners, it's just not optimizing a use case that didn't matter for iOS devices, and not realizing it to fix it when bringing that controller to Macs. I'm not saying the hardware/firmware is absolutely perfect. The part of the story about macOS defaulting to unsafe flushes is a software issue, not a hardware issue.

[2] is a macOS bug that was fixed a long time ago. It has nothing to do with hardware whatsoever. In fact, write endurance on Apple SSDs is at the high end of the market. macOS was just eating through it like butter due to a bug.

marcan_42··on Asahi Linux alpha release
alx.sh serves you this script:

https://github.com/AsahiLinux/asahi-installer/blob/main/scri...

It's proxied to avoid requiring users to use curl -L, otherwise I'd just have made it redirect.

marcan_42··on Asahi Linux alpha release
That's not the same thing. Huge pages are in addition to standard pages. Being in 16K mode means no 4K pages. It's a global switch. Linux can't handle that, the baseline page size is set at compile time and affects a ton of macros and constants used throughout the kernel.

Userspace breaks on 16K pages when it tries to do things like call mmap() with virtual addresses that aren't aligned to 16K. Usually it's allocators doing this when they think the entire world is 4K.

marcan_42··on Asahi Linux alpha release
Most of that is leaving enough space for macOS updates not to break. The minimal image requires 8GB of actual space by default, 3GB for boot stuff related to macOS and a default minimum 5GB root partition. I can actually go lower there, but I don't think most people would want to have a Linux system smaller than that. You'd quickly run out of space as you start installing stuff.
marcan_42··on Linux on an M1 Mac
> It completely rules out any hardware-accelerated applications, which is a lot of desktop use cases

What does that even mean? We have a full composited desktop with shadows and transparency and everything. Software rendering doesn't mean no OpenGL. It's just software OpenGL.

marcan_42··on Linux on an M1 Mac
I would expect the people already daily-driving ARM Linux laptops with GPUs that run slower than software rendering on M1s to be perfectly happy with the current state of affairs.

This is not to say GPU support is a long way away; it isn't.

> and that we may well have an M2 on store shelves before you've even got M1 support to a usable point.

You're assuming M2 will take another year. M1 Pro and Max took a week or so to bring to near feature parity, and M1 Ultra will probably take ~1 day. We aren't starting from scratch for every new chip.

I'm not saying everyone will be happy daily driving a laptop with no GPU (I wouldn't, not as my main machine). I'm saying some people will be (I would, as a carry around laptop for browsing and SSH).

marcan_42··on Linux on an M1 Mac
It's not only the "console effect" for the OS though. It's the vertical integration of the hardware to begin with. It's just better than x86 platforms because Apple control everything and can make sure it works together well. It's been very apparent as we work on the platform just how well everything ties together internally.

On x86 you have the CPU vendor, the chipset vendor, the hardware OEM, the storage vendor, the GPU vendor, etc. all fighting each other and it shows. No one company ends up having the motivation and control to make things tie well together.

Granted, for little things like "Asahi Linux is probably the only third party distro on the planet to autodetect your laptop's keyboard layout on first boot", yeah, it helps that we're targeting a very specific platform (and the vendor cares about these thing and left the facilities in place for us to do that). But for stuff like good battery life and power management, you just can't achieve that if the hardware isn't well integrated to begin with, and we're already getting impressive battery life numbers with minimal OS support.

marcan_42··on Linux on an M1 Mac
Mac Studio isn't supported yet, but I expect bring-up to take a day or two once mine arrives!

Some upstream kernel folks are already using Apple Silicon machines for development (to compile x86 kernels even) because they're faster than their x86 boxes, by a good margin :-). My M1 Pro laptop is about as fast at doing kernel builds as my 16-core Threadripper.

marcan_42··on Linux on an M1 Mac
Linux is the world's most popular OS running on mobile devices with small batteries.

I'd say x86 platforms have not always been the best at that :-)

marcan_42··on Linux on an M1 Mac
Chadmed is working on the processing, and he already thinks he can get better results than macOS. The other day he measured the response with a calibration mic so we can compute good correction coefficients.
marcan_42··on Linux on an M1 Mac
Even without GPU, we're getting better battery life than many x86 laptops already.
marcan_42··on Linux on an M1 Mac
Speakers work in our kernel tree, we're just not shipping it yet because there's infrastructure work to be done because Linux as a whole has no subsystem for enforcing speaker volume safety limits, nor does it have any subsystem for speaker DSP/EQ. Both of those are critical for modern platforms to be safe and sound good. I do not consider not having that up to standard, so I won't enable speakers for end users until we have an answer. It's coming, it's just we have to be the first to develop all this infra because it's 2022 and Linux audio still sucks ;)

USB3 and Thunderbolt are being worked on as we speak, and USB3 already works in Sven's kernel branch.

The backlight works with the DCP display driver, which is already working but just needs to be productionized so we can ship it in our main kernel branch. Soon.

And the GPU userspace work is at 90+% GLES2 spec compliance, and the hardware interface reverse engineering to write a kernel driver (which is the simpler part) has already started.

Things are moving quickly.

marcan_42··on Linux on an M1 Mac
And yet we're getting ~8h of battery life on these machines with software rendering.

Did I mention the hardware is just that good? :-)

marcan_42··on Linux on an M1 Mac
Headphone jack works on M1 models (though I discovered today it's a bit flaky on boot).

The speakers technically work on all the laptops, but we need to implement safeties to make sure you don't accidentally blow your speakers, and also add DSP so they sound good. Fir now, we keep the speakers disabled.

BT will take longer though, it's not a huge priority for me so it's behind things like the GPU on the list (unless someone volunteers, of course.

marcan_42··on Linux on an M1 Mac
The installer is done, you just curl|sh from macOS and follow the prompts :-)
marcan_42··on Apple M1 Ultra Meanings and Consequences
> quad-die Mac Pros

I said quad-Jade Mac anythings aren't coming because that die is only designed to go in pairs (that's the M1 Max die). Everyone keeps rambling on about that idea because that Bloomberg reporter said it was coming and got it wrong. It won't happen.

Apple certainly can and probably will do quad dies at some point, it'll just be with a new die. The IRQ controller in Jade is only synthesized for two dies, but the architecture scales up to 8 with existing drivers (in our Linux driver too). I fully expect them to be planning a crazier design to use for Mac Pros.

marcan_42··on Storing UTC is not a silver bullet (2019)
Recurring meetings cannot be expressed as timestamps (unless you want all the humans to hate you). The recurrence has to be expressed in terms of local time (and date/day of week) in some (ideally per-event) timezone.
← PreviousPage 2 of 34Next →