#
#asahi-gpu · 2021-05-11 06:10
marcanreally the important thing is not to copy any code; that's a lot easier to prove if you're not looking at the code to begin with (other than incidental "it crashed and I got some context around the instruction pointer" stuff)
#asahi-gpu · 2021-05-11 06:08
marcan(but it's already inside panic() at that point)
#asahi-gpu · 2021-05-11 06:08
marcan(though right now I'm reading those messages off of RAM on debugger break... because it dies before serial is initialized :p)
#asahi-gpu · 2021-05-11 06:08
monochromamarcan: nice
#asahi-gpu · 2021-05-11 06:07
marcanbut I figure anything the kernel *tells* me as part of a debug message that actually gets executed and fires is fair game
#asahi-gpu · 2021-05-11 06:07
marcan(like register names)
#asahi-gpu · 2021-05-11 06:07
marcanI'm pushing things a bit more in the kernel side than bloom is in userspace, because as of a few days ago I'm using a dev kernel build (which are available to anyone with an apple account, no need to pay anything or sign any NDAs) and I noticed it's rather eager to say interesting things in debug assertions
#asahi-gpu · 2021-05-11 06:05
marcansame thing here
#asahi-gpu · 2021-05-11 06:05
marcanAIUI some FPGAs were done this way; feed the xilinx tools different constrained designs and diff bitstreams
#asahi-gpu · 2021-05-11 06:05
marcanas in black-box
#asahi-gpu · 2021-05-11 06:05
marcandynamic analysis is fair game
#asahi-gpu · 2021-05-11 06:04
marcanI mean I figured out the memory compress/decompress instructions and others just by guessing
#asahi-gpu · 2021-05-11 06:04
marcanthat, plus just random guesswork
#asahi-gpu · 2021-05-11 06:04
marcanand I'm writing a hypervisor so I can trace register accesses and blackbox the kernelspace driver right now
#asahi-gpu · 2021-05-11 06:04
marcanazonenberg: bloom is doing the userspace side by blackboxing the userspace driver
#asahi-gpu · 2021-05-11 00:09
opticronheh
#asahi-gpu · 2021-05-11 00:05
segheropticron: "was", before it all burned to a crisp? :-)
#asahi-gpu · 2021-05-10 20:53
jixlikely to exist)
#asahi-gpu · 2021-05-10 20:53
jixyeah, that rr, some speculation that amd does affects performance counters in a way that breaks rr... so you need to turn that off https://hackmd.io/sH315lO2RuicY-SEt7ynGA?view has a write up of all that (I didn't do much apart from making educated guesses where to find the bit and trying those on my HW, others already figured out what the issue is and that some chicken bit to disable it is
#asahi-gpu · 2021-05-10 20:40
dottedmagmonochroma: https://rr-project.org prolly
#asahi-gpu · 2021-05-10 20:23
monochromajix: rr?
#asahi-gpu · 2021-05-10 20:07
opticronprobably not across either of them, just next to the LED
#asahi-gpu · 2021-05-10 20:06
opticronI think there *was* a resistor there, but it just wasn't across both of the two possible power-to-ground paths
#asahi-gpu · 2021-05-10 20:03
segherbut you should have anything to limit current on otherwise possibly wide-open paths
#asahi-gpu · 2021-05-10 20:03
segherwell sure, heh
#asahi-gpu · 2021-05-10 20:02
opticronif it was in the right place, yes
#asahi-gpu · 2021-05-10 20:02
segherdumb
#asahi-gpu · 2021-05-10 20:02
seghereven just adding a dum resistor would help, heh
#asahi-gpu · 2021-05-10 20:01
opticronit was
#asahi-gpu · 2021-05-10 20:01
opticronyes
#asahi-gpu · 2021-05-10 20:01
segheropticron: that is badly designed hardware of course, but :-)
#asahi-gpu · 2021-05-10 20:01
segheryes, anything external hardware (external to the chip) can do very bad things
#asahi-gpu · 2021-05-10 19:59
Yuzuthat's a significant failure mode
#asahi-gpu · 2021-05-10 19:58
opticronheh...reminds me of a PCI card produced at a company I worked for a long time ago. there was a two-color LED on the back panel, the hardware was missing an interlock, and the driver had a bug that allowed the wrong transistors to be turned on at the same time during a race condition which blew out the LED trace and could cause a fire
#asahi-gpu · 2021-05-10 19:58
jixi did poke random MSRs on my ryzen to find the chicken bit to make rr work and I didn't even manage to crash my machine doing that... was much less exciting than I thought it would be ;)
#asahi-gpu · 2021-05-10 19:53
segherbut yes you never know. take a risk :-)
#asahi-gpu · 2021-05-10 19:51
segheranything that can destroy hardware needs some specific sequence these days (since the 90's or so), not just one poke
#asahi-gpu · 2021-05-10 19:49
segheryou can map out where there is mmio, what blocks are aliased, etc.
#asahi-gpu · 2021-05-10 19:49
segherno, from unlimited mode
#asahi-gpu · 2021-05-10 19:04
bloomAnd if something goes horribly wrong I can file a CVE, win-win ;-p
#asahi-gpu · 2021-05-10 19:04
bloomsegher: I figure poking randomly from unprivileged userspace in a machine with SIP/etc in tact is fair game
#asahi-gpu · 2021-05-10 18:38
segheri have done it many times before. yes i know it can be disaster in teory, heh
#asahi-gpu · 2021-05-10 18:38
segherazonenberg: poking randomly is perfectly safe
#asahi-gpu · 2021-05-10 18:35
azonenbergYou're even explicitly allowed to use your findings to inform the design of a new chip as long as you aren't making a verbatim copy of the mask layout, or infringing on patents
#asahi-gpu · 2021-05-10 18:35
azonenbergso it's less gray than anything software related
#asahi-gpu · 2021-05-10 18:34
azonenberginterestingly enough, under US law semiconductor RE is explicitly protected and legal
#asahi-gpu · 2021-05-10 18:34
azonenbergand my solution was to decap the chip and trace out the circuits :p
#asahi-gpu · 2021-05-10 18:34
azonenbergthe last time i was faced with such a problem it was a xilinx fpga bitstream
#asahi-gpu · 2021-05-10 18:34
jn__watching library calls by apple's equivalent of LD_PRELOAD
#asahi-gpu · 2021-05-10 18:33
jn__blackbox dynamic RE is the way, AFAIUI

plus ›