News for hackers. Stuff that matters.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by bfrog on Tuesday October 31, 2023 @02:46PM (#38089510)
With or without binary blobs and undocumented registers/IPs?
Re:Upstream Linux support available for Qualcomm Snapdragon ... by wyldfire on Tuesday October 31, 2023 @03:29PM (#38090186)
As a practical matter, I think the article happens to describe the steps to test it out yourself. I suppose the absence of a mention of binary blobs doesn't necessarily mean that they're not being used, I think it's plausible that there aren't (m)any.

> How do I run AOSP using Mainline?

> One might think it is quite hard to run AOSP with mainline on such a new platform, but in reality, not at all! Thanks to the long term effort of Linaro and Google engineers making it possible to run AOSP with vanilla Linux releases. Thanks to Amit Pundir for providing a helping hand to get AOSP on this platform.

> To generate an AOSP image for the Snapdragon 8 Gen 3 Qualcomm Reference Device using the current set of patches available on the mailing list, use the following instructions, which are derived from here https://source.android.com/docs/setup/build/devices with some small changes.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by spookie on Tuesday October 31, 2023 @04:35PM (#38090997)
This is quite refreshing! Thanks for the details
Re:Upstream Linux support available for Qualcomm Snapdragon ... by nomel on Tuesday October 31, 2023 @03:06PM (#38089839)
Naive question. What's the practical impact for not having these? It seems that AMD and Intel are also guilty.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by lrvick on Tuesday October 31, 2023 @03:21PM (#38090075)
Those blobs, if backdoored, could have massive security implications.

Also those blobs are often targeted at specific kernel versions, so in 2 years when the upstream vendors stop releasing updated blobs, then it no longer becomes possible to upgrade the kernel, making it very very hard to keep last gen devices secure.

This exact problem is why I was forced to admit there is no secure path to use Android today, and a big reason why I gave up on smartphones entirely.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @03:28PM (#38090179)
> and a big reason why I gave up on smartphones entirely

This is not necessary: my Librem 5 doesn't rely on blobs in kernel and runs FSF-endorsed GNU/Linux, PureOS.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fifteen1506 on Tuesday October 31, 2023 @04:16PM (#38090739)
Pixels may also be an option -- though Librem 5 is, in this context, better.

Pixels Pro have now... 7 or 8 years support.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by dawidpotocki on Tuesday October 31, 2023 @06:56PM (#38092513)
Because Purism cheated and just moved the blobs into a chip that you can't update and made it go through a separate processor[1]. FSF-endorsement is meaningless. This is worse than having a loadable blob from a kernel.

[1]: https://puri.sm/posts/librem5-solving-the-first-fsf-ryf-hurd...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @06:59PM (#38092542)
I don't see how it's worse. As a consequence, it's the only phone that can run fully free OS and have lifetime updates.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by dawidpotocki on Tuesday October 31, 2023 @08:09PM (#38093048)
You can't update the firmware at all and you are still running it.

Librem 5 has very dated hardware that barely runs. It has only Cortex A53 cores @ 1.5 GHz that were released in 2012. You will see it even lag in Purism's videos.

Modern Android phones have better OS, hardware security, battery life and will be useful for longer and cheaper.

Librem 5 now costs 1000 USD, the same price that Google Pixel 8 Pro costs which also has guaranteed 7 years of OS support. Will you want to use Librem 5 in 7 years?

Also let's not forget how Purism took forever to ship the devices and was declining refunds from people that didn't even get sent the device and waited way over a year.

Oh and there are Android phones that can run on mainline kernels.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Wednesday November 01, 2023 @05:26AM (#38096156)
> Will you want to use Librem 5 in 7 years?

Yes: Librem 5 is a full desktop, with my full control, "Thinkpad T400 in mobile". It will always run latest Linux and all desktop apps. I can use it as a full desktop connected to keyboard/screen. On the other hand, Android is not a general purpose computer, which only runs what Google allows you to run.

You should try SXMo if you want to see how smoothly Librem 5 and even Pinephone can work if the software is optimized.

> You can't update the firmware at all and you are still running it.

Is there even theoretically an attack vector here?

Yes, Purism has been having problems with refunds. It doesn't affect security or freedom of they devices. Don't buy from them if you will want a refund.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by forty on Wednesday November 01, 2023 @06:25AM (#38096524)
How will you fix it in 4 years? I don't see were they sell spare parts.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Wednesday November 01, 2023 @08:51AM (#38097533)
They don't have spare parts in the online shop, but people on the forum were able to buy them or repair the devices by contacting Purism directly. AFAIK in case of a larger demand, Purism promised to provide spare parts more explicitly.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by HappyDaoDude on Tuesday October 31, 2023 @08:11PM (#38093064)
It is the closest we have to a freedom respecting device. The baseband processor is still a closed blob but it is a lot better than pretty much everything else out there. Maybe Pinephone eventually will get there as well.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by nomel on Tuesday October 31, 2023 @05:16PM (#38091489)
AMD and Intel both have their share of proprietary blobs, in their "open source" packages, including microcode. Where do you see a secure path, for any computing, especially high performance?
Re:Upstream Linux support available for Qualcomm Snapdragon ... by yjftsjthsd-h on Tuesday October 31, 2023 @05:27PM (#38091618)
> Where do you see a secure path, for any computing, especially high performance?

I believe POWER9 is the only modern option that doesn't use blobs? Of course that doesn't remove the possibility of hardware backdoors (nothing does, except maybe an electron microscope and a lot of free time), but that's a higher bar.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by lrvick on Friday November 03, 2023 @03:10AM (#38125465)
I do in fact have a Power9 workstation next to my desk, though sadly not in use as the biggest security wins for my workflow come from QubesOS which cannot run on Power9, yet.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by AnthonyMouse on Tuesday October 31, 2023 @05:28PM (#38091631)
People rightly disapprove of the AMD and Intel blobs and do what they can to disable or remove them, but at least those have stable interfaces that don't decay when there is a new kernel version. Basically every x86_64 processor ever made can run the latest version of the Linux kernel. Would that it were for Qualcomm.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by nomel on Tuesday October 31, 2023 @05:36PM (#38091722)
> do what they can to disable or remove them

Is there open source microcode, at this point? I can't find anything that suggests there is.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @05:40PM (#38091768)
The parent probably speaks of Intel ME neutralizing/disablement.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by pabs3 on Wednesday November 01, 2023 @06:11AM (#38096434)
Intel microcode is signed so you can't run open source microcode even if you were able to create it, and the microcode is encrypted so you can't reverse engineer it anyway.

On long obsolete AMD K8 CPUs, there was some work on reverse engineering the microcode back in 2017:

https://github.com/RUB-SysSec/Microcode

Re:Upstream Linux support available for Qualcomm Snapdragon ... by tremon on Wednesday November 01, 2023 @11:13AM (#38099320)
The Raptor Blackbird and Talos systems might qualify: https://www.raptorcs.com/content/base/products.html

Not sure if the Broadcom GbE NICs they use require firmware. It would seem odd to me that they'd go so far as to include an open FPGA[0] for board management and system bringup to avoid closed firmware blobs, only to then rely on a network interface with firmware requirement.

[0] https://www.crowdsupply.com/raptor-computing-systems/talos-s...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by jancsika on Tuesday October 31, 2023 @08:04PM (#38092997)
> Also those blobs are often targeted at specific kernel versions, so in 2 years when the upstream vendors stop releasing updated blobs, then it no longer becomes possible to upgrade the kernel, making it very very hard to keep last gen devices secure.

Is this true for the blobs in the Snapdragon 8 Gen 3 Mobile Platform?

Re:Upstream Linux support available for Qualcomm Snapdragon ... by surajrmal on Wednesday November 01, 2023 @01:42AM (#38094969)
Isn't it true that even if the firmware was open, as long as the hardware is closed it could still be backdoored and doing things you don't want it to? Where do you draw the line?
Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Wednesday November 01, 2023 @09:09AM (#38097702)
You don't draw the line: you support practical, existing systems that are as open as possible. Also, there is Precursor, which is open hardware.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @03:41PM (#38090355)
Re:Upstream Linux support available for Qualcomm Snapdragon ... by foobiekr on Tuesday October 31, 2023 @03:06PM (#38089843)
Someone knows Qualcomm.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by almatabata on Tuesday October 31, 2023 @04:08PM (#38090647)
At minimum i expect QSEE and all their TAs to remain binary blobs, like the keymaster for example.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by aseipp on Tuesday October 31, 2023 @04:41PM (#38091082)
The kernel will work fine, but at minimum EL2 runs the Qualcomm Hypervisor (Gunyah) which prevents native KVM virtualization from taking place. This is true of all Snapdragon platforms.

Windows supports virtualization on the 8 Gen 3 only because they use a custom setup to load a signed binary blob ("applet") into the EL2 hypervisor, whose signature it is is hardcoded to accept, and that blob/applet then can be used by Windows as a kind of shim into EL2-land to spawn VMs, etc. But Qualcomm's hypervisor is always present and enforcing its security policy.

In practice every single modern system is running tons of binary firmware blobs, it's mostly where you draw the line on functionality. Here, Qualcomm does intentionally reduce some functionality, which is pretty bad when you consider that the UEFI spec for ARM mandates EL2 handover, I think.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by asddubs on Tuesday October 31, 2023 @05:45PM (#38091845)
What's EL2 exactly?
Re:Upstream Linux support available for Qualcomm Snapdragon ... by Avery3R on Tuesday October 31, 2023 @06:03PM (#38092048)
Exception Level 2 [1] They're analogous to "protection rings" on x86. Generally, EL0 is usermode, EL1 is kernel mode, EL2 is hypervisor, and EL3 is the "secure monitor"/firmware code, closest analogy I think would be SMM on x86. On top of all of that there's also trustzone with its own EL0 and EL1.

1: https://developer.arm.com/documentation/102412/0103/Privileg...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by baby_souffle on Tuesday October 31, 2023 @05:53PM (#38091924)
> What's EL2 exactly?

Probably execution level 2.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by thomastjeffery on Tuesday October 31, 2023 @05:48PM (#38091876)
> In practice every single modern system is running tons of binary firmware blobs

This is a problem we should be loud critics of. Proprietary firmware hurts us all, and practically benefits no one.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @06:29PM (#38092275)
It's a bit better in Pinephone: https://news.ycombinator.com/item?id=36659544
Re:Upstream Linux support available for Qualcomm Snapdragon ... by matheusmoreira on Tuesday October 31, 2023 @10:25PM (#38093905)
Yeah. These days our operating systems don't actually operate the system anymore. Hardware manufacturers usurped our control of the machine. They think of Linux as the "user OS", to be virtualized and sandboxed away from the real computer.

https://youtu.be/36myc8wQhLo

Re:Upstream Linux support available for Qualcomm Snapdragon ... by gary_0 on Wednesday November 01, 2023 @12:02AM (#38094487)
Only a secret and privileged few actually get to boot and talk to a modern physical CPU. The rest of us only get to run on top of an abstraction.

Wake up, Neo. The Matrix has you...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by StillBored on Wednesday November 01, 2023 @02:11AM (#38095103)
And frankly that is as it should be. The OS has enough responsibility trying to arbitrate the collection of hardware resources while providing its own set of abstractions (filesystems, processes, etc) to the application layers.

These computers are no longer simple cores with simple devices. If you want that go buy a DOS machine from the 1980's, or a arm7TDMI.

The problem though is that companies invest in all this firmware, and become convinced that DIMM training, signal integrity/phy training, and algorithms which estimate the cooling capacity and thermal mass of the attached heatsink, or any of a hundred other things are somehow competitive advantages and deserve to be locked up behind closed doors rather than opensource. In some cases they are right, but that shouldn't keep them from publishing reference firmware sources and register documentation.

So, really people complaining about proprietary firmware are sorta missing the point. Complain about the lack of documentation to create your own firmware, not that the company thinks they have a competitive advantage in that firmware.

And also admit that what one needs is hardware/firmware abstractions that allow big kernels like linux to communicate with all the little cores in the machine working on specific tasks, be that NVMe for disks, AT command sets for modems, or ACPI for power management.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by matheusmoreira on Wednesday November 01, 2023 @02:28AM (#38095171)
What good is open source firmware when the hardware only accepts cryptographically signed proprietary blobs?
Re:Upstream Linux support available for Qualcomm Snapdragon ... by sliken on Wednesday November 01, 2023 @11:43AM (#38099821)
Assuming you can verify the signed blob identical to the one you can build yourself, you can verify there's no intentional back doors or unintentional security issues.

Not as good as being able to sign it yourself, but way better than not having the source.

It also prevents an attacker from hacking the hardware in a way that would persist after a full reinstall of the OS.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by matheusmoreira on Wednesday November 01, 2023 @05:50PM (#38105808)
Yes, I agree. Source code and reproducible builds which can be cryptographically verified to be equivalent to the signed blob would go a long way towards making them trustworthy. Still denies us the freedom to modify them but at least trust could be assured.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by 127361 on Wednesday November 01, 2023 @07:28AM (#38096913)
Not on Rockchip platforms as far as I am aware. The RK3588 is one of their highest performing SoCs, it has 4 Cortex-A76 cores running 2.4GHz thus making it somewhat close to desktop performance, without any of these blobs or locked down bootloaders. And mostly complete documentation[1] is available.

1. https://github.com/FanX-Tek/rk3588-TRM-and-Datasheet/tree/ma...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by sliken on Wednesday November 01, 2023 @11:55AM (#38100048)
I believe DDR training and USB have blobs:

https://gitlab.collabora.com/hardware-enablement/rockchip-35...

I wish the rk3588 was blobless, sadly not.

Nice little widgets, crazy faster than a pi4.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by dmitrygr on Tuesday October 31, 2023 @06:20PM (#38092209)

  > In practice every single modern system is running tons of binary firmware blobs
This one does not: https://www.amazon.com/ASUS-C100PA-DB02-10-1-inch-Chromebook...

The SoC's boot ROM is 32K, fully inspectable, does not linger once the OS is booted. Every other software component is built from source and you can replicate it

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fragmede on Tuesday October 31, 2023 @06:49PM (#38092446)
Even the broadcom-based wifi card? my read of https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 says for the 4354 in the c100, you need firmware, for brcmfmac.
Re:Upstream Linux support available for Qualcomm Snapdragon ... by dmitrygr on Tuesday October 31, 2023 @06:52PM (#38092478)
You are right.

(I use a usb-to-ethernet dongle and the wifi card is disabled, but you are right in theory)

Re:Upstream Linux support available for Qualcomm Snapdragon ... by fsflover on Tuesday October 31, 2023 @07:03PM (#38092562)
Try this one: https://www.crowdsupply.com/sutajio-kosagi/precursor

Although "modern" is debatable.

Re:Upstream Linux support available for Qualcomm Snapdragon ... by dmitrygr on Tuesday October 31, 2023 @07:04PM (#38092569)
Merely 6x the cost :)
Re:Upstream Linux support available for Qualcomm Snapdragon ... by StillBored on Wednesday November 01, 2023 @02:51AM (#38095304)
And you probably still have firmware on the main machine. Just about every modern usb controller offloads the USB packet arbitration/sequencing behind a microcontroller and a pile of fw. Ex XHCI is usually a 8051 and some firmware sitting on the other side of the XHCI register description. Its probably the same on the actual USB->ethernet device, where there is conceptually something like the cypress FX3 integrated with a ethernet mac/phy in the chip an a couple arm's running firmware to respond to the USB packets and act as a control plane for the data being DMA'ed to/from the ethernet buffers. Same with the disk, does it have NVMe, SD, emmc? Then likely there is another handful of arm device doing the load leveling and flash management on the "disk". Or for that matter the battery and charge controller might look dumb but has a little microcontroller integrating instantaneous charge/discharge information and adjusting charge current/etc.

https://blog.einval.com/2022/04/19#firmware-what-do-we-do

Re:Upstream Linux support available for Qualcomm Snapdragon ... by mips_r4300i on Wednesday November 01, 2023 @06:28AM (#38096542)
Agreed, people seem to only see blobs when they run on x86. A typical PC system probably has at least two dozen ancillary CPU cores spread out among the IO and peripherals alone.

If I had a dollar for every 8051 that turned out to be inside a chip I designed around...

Re:Upstream Linux support available for Qualcomm Snapdragon ... by kramerger on Wednesday November 01, 2023 @03:20AM (#38095450)
My experience from working a few years with qualcomm CPUs at a major home electronics brand:

1. Half of the EL3 and EL2 code is so old, it has to jump between aarch32 and aarch64 multiple times during the boot process.

2. The silicon is full of errors. There are also major security vulnerabilities due to Qualcomm doing their own slightly modified version of everything.

3. Not even their biggest customers (e.g. Samsung) is given the source code for the magical blobs used during boot.

4. Given these issues, the EL2 code is basically there to hold things together. It will never go away and they will never show you what it contains

Re:Upstream Linux support available for Qualcomm Snapdragon ... by robert_foss on Tuesday October 31, 2023 @06:06PM (#38092073)
The GPU probably runs a firmware blob. Other than that Linaro is serious about upstream support.