News for hackers. Stuff that matters.
Re:About the ZipCPU by crazygringo on Thursday October 04, 2018 @09:33AM (#18139706)
I'm curious, is there any commercial application for running Linux on a CPU implemented in FPGA, as opposed to any (presumably cheaper and faster) normal CPU? Some kind of custom modification this would allow you to make?

I've always thought of FPGA's as being for custom parallel computationally intensive tasks that run side-by-side with a normal CPU. So just curious if ZipCPU is just for fun, or something more?

(Or is there even something security-related about being able to verify not just the code, but the CPU it runs on, in this case?)

Re:About the ZipCPU by monocasa on Thursday October 04, 2018 @10:49AM (#18140388)
Sure, it happens all the time if you want a full os on a core that's tightly integrated with some custom hardware, but you don't want an ASIC (for reconfigurability, or just low volumes).
Re:About the ZipCPU by skybrian on Thursday October 04, 2018 @12:08PM (#18141151)
I'm not a hardware engineer, but my understanding is that some FPGAs include an entire cpu core as part of the chip? This seems much more efficient than designing your own.
Re:About the ZipCPU by TomVDB on Thursday October 04, 2018 @12:27PM (#18141340)
I wrote this in a different discussion yesterday:

https://news.ycombinator.com/item?id=18124411

Super small CPU cores are fantastic for complex FSM replacement, especially on an FPGA which has unused block RAMs (so using them is essentially free.) I’ve seen cases with relatively complex pure HW FSM being replace by a small CPU and 1KB of RAM where the logic used by the CPU ends up smaller than the FSM.

But now the CPU is programmable, so you can iterate much quicker in case of bugs, without the need to reaunthesize.

A good example are SDRAM controllers: almost all of them have a small CPU inside the controller that is used for calibration training.

Re:About the ZipCPU by jtregunna on Thursday October 04, 2018 @12:26PM (#18141333)
It's almost always more efficient to use an existing CPU if it fits your use case than to design your own. Even if it doesn't, it is often more efficient (time wise) to adapt your use case to the hardware you have available, or write software to resolve the feature you want in hardware but don't have. Only the especially nutty build their own CPUs (I'm especially nutty too)
Re:About the ZipCPU by monocasa on Thursday October 04, 2018 @12:37PM (#18141436)
Even if you're not designing your own, dropping a little Microblaze or NIOS down can simplify your design considerably.
Re:About the ZipCPU by jtregunna on Thursday October 04, 2018 @12:45PM (#18141497)
Oh I know it can, my comment was more tongue in cheek not dismissive :)
Re:About the ZipCPU by akiselev on Thursday October 04, 2018 @12:26PM (#18141329)
The cheapest FPGAs are under $10 and many can fit a small softcore - usually not a full pipelined, cached + MMU RISCV core at 100+ mhz but enough to drastically simplify high level logic in FPGA projects. The Zynq series with onboard CPUs start at $40-50 in low volumes and have 1-4 cores at 600 mhz which is complete overkill for many FPGA projects.
Re:About the ZipCPU by kevin_thibedeau on Thursday October 04, 2018 @12:24PM (#18141313)
If all you need is a lightweight microcontroller in a low end FPGA it will be usually be more cost effective to use a soft core.
Re:About the ZipCPU by cushychicken on Thursday October 04, 2018 @04:33PM (#18143405)
Yep - that's what the Xilinx Zynq series of chips is. An ARM Cortex A9 core (or two!) and a big chunk of FPGA logic, tied together by AXI bus fabric.
Re:About the ZipCPU by zipcpu on Thursday October 04, 2018 @12:22PM (#18141294)
You could even do it if you wanted an ASIC. FPGA's are commonly used for verifying the logic that will eventually get placed into an ASIC.
Re:About the ZipCPU by nickpsecurity on Thursday October 04, 2018 @05:31PM (#18143852)
I considered doing it just to run security-critical apps on CPU's like CHERI that I couldn't get in ASIC form:

https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/

Slow, $2000-a-unit hardware might be worth it if it makes your OS close to unhackable. I'd just have to make sure apps are lean and efficient. I already favor those, though. :)

Also, there's been work in "instruction set randomization" that obfuscates the CPU itself to reduce odds malware will work. Mostly widely-deployed, non-custom attacks but might stop some custom attackers, too.

https://www.ics.forth.gr/_publications/papadog-asist-ccs.pdf

Older work was useful for making RAM and other things either untrusted or less trusted with crypto setups. Joshua Edmison did one of those with a nice survey of others:

https://vtechworks.lib.vt.edu/bitstream/handle/10919/29244/e...

Finally, Meltdown/Spectre created lots of designs recently to plug timing channels. Too many to even track. Here's the first one I found from my submissions:

https://arxiv.org/pdf/1703.07706.pdf

Re:About the ZipCPU by petra on Thursday October 04, 2018 @05:47PM (#18143950)
Considering the implications of a widely available unhackable computer on real security, crime and politics, and that many powerful people/organizations are working to prevent distribution of this technology, do you really think it would become available ? how ?
Re:About the ZipCPU by nickpsecurity on Thursday October 04, 2018 @06:05PM (#18144087)
Computers that are ridiculously hard to hack and methods for building them have been available for some time. NSA used to evaluate them for years on end trying to hack them. If they passed the test, the got the TCSEC A1-class label for verified[-as-possible] security. SCOMP/STOP, GEMSOS, Boeing SNS Server, LOCK, and KeyKOS w/ KeySAFE are examples of systems designed with such techniques or certified. I think STOP-based XTS-400 and Boeing SNS Servers have been in deployment for decades now without any reported hacks. They were on the munitions list for export restriction (idk if enforced), some companies sell high-security to defense only, and they all cost a ton of money if proprietary.

Under newer standards and techniques, examples include INTEGRITY-178B, Perseus Security Framework (eg Turaya Desktop), seL4, Muen hypervisor, and ProvenCore. Two of those are open source with one having pieces that were released. On hardware side, the groups developing it often openly describe the stuff where anyone with money can implement it. Some openly release it like CHERI CPU w/ FreeBSD. Some commercial products making every instruction safe like CoreGuard.

So, it's not a question of whether people will develop and sell this stuff. They've been developing this stuff since computer security was invented back in the 1970's. It was sometimes the inventors of INFOSEC developing and evangelizing it. Businesses didn't buy the stuff for a variety of reasons that had nothing to do with its security. Sometimes, esp with companies like Apple or Google, they could clearly afford the hardware or software, it was usable for some to all of their use case, and they just didn't build or buy it for arbitrary reasons of management. Most stuff they do in-house is worse than published, non-patented designs which is just more ridiculous.

DARPA, NSF, and other US government agencies continue to fund the majority of high-security/reliability tech that gets produced commercially and/or for FOSS. These are different groups than the SIGINT people (i.e. BULLRUN) that want to hack everything. Also, they might be putting one backdoor in the closed ones for themselves while otherwise leaving it ultra-secure against everyone else. That's what I've always figured. Lots of it is OSS/FOSS, though, so that's easier to look at.

Re:About the ZipCPU by stonogo on Thursday October 04, 2018 @06:29PM (#18144259)
Infrant used to sell a NAS product that ran Linux on a Sparc implemented in FPGA. No idea why, but it was a commercial success. They moved to ARM or x86 around the time Netgear acquired the company.
Re:About the ZipCPU by jeanmichelx on Thursday October 04, 2018 @10:50AM (#18140392)
Easy to add custom hardware to accelerate the things you care about.