logoalt Hacker News

zie1onyyesterday at 9:18 PM4 repliesview on HN

At my uni, 15 years ago, one postdoc reverse engineered NVIDIA chip and wrote more performant compiler. He did that by connecting oscyloscops to all chip's outputs and started with applying random current on inputs. Using ML and his genius he rediscoverd all opcodes including a few hidden ones. Eventually he got hired by some company that was doing a lot of GPU on supercomputers.


Replies

Aurornisyesterday at 11:55 PM

> He did that by connecting oscyloscops to all chip's outputs and started with applying random current on inputs

This is absolutely not how reverse engineering a digital logic ASIC works.

Either the story got embellished through retellings, or this person was a fantasist.

There are people who hack on GPUs but it’s done at the software level.

I did get a kick out of imagining a scene where someone is trying to connect an oscilloscope to a circuit board to reverse engineer the CPU opcodes. That’s like the CSI: Miami version of what this would look like.

inigyouyesterday at 9:25 PM

You can't do that by applying random inputs to any single-chip GPU - it has far too much state. I can see that perhaps it worked on some of the early multi-chip cards - where one chip was a texture sampler, and so on.

You'll have more luck reverse engineering the software driver first. They're not hidden, you can just open the driver files in Ghidra, the almost-universal tool for open-sourcing proprietary code. Hidden opcodes can be discovered first by just trying all the opcodes you couldn't discover any other way. You only need to go to the physical level if they're really hidden.

show 2 replies
tverbeureyesterday at 10:18 PM

There is absolutely no way that happened. 15 years ago, we're talking Fermi class GPUs and chips with hundreds of millions of bits of on-chip state and much more if you include the DRAM.

You can't tease out the right information by applying random inputs. Which input would you even use? The PCIe interface? You'd first "randomly" need to get past its complex training sequences...

Your postdoc probably wrote micro-benchmarks of some sort. That is a common technique.

show 1 reply
pixelatedindexyesterday at 10:41 PM

“oscyloscops” is a way better spelling I gotta say.