< Return to Video

Console Hacking 2016 (33c3)

  • 0:00 - 0:13
    33C3 preroll music
  • 0:13 - 0:17
    Herald: You have been
    here on stage before.
  • 0:17 - 0:20
    You successfully tampered with the Wii,
  • 0:20 - 0:23
    You successfully tampered
    with the PS3 and got
  • 0:23 - 0:27
    some legal challenges over there?
  • 0:27 - 0:29
    marcan: Some unfounded
    legal challenges, yes.
  • 0:29 - 0:32
    Herald: And then you fucked,
    and excuse my French over here
  • 0:32 - 0:35
    – by the way, that is number 8021 to get
  • 0:35 - 0:40
    the translation on your DECT phone.
  • 0:40 - 0:45
    So you fucked with the Wii U as well.
  • 0:45 - 0:48
    “Console Hacking 2016”,
    here we go!
  • 0:48 - 0:52
    marcan: I’m a lazy guy, so I haven’t
    turned on my computer yet for the slides.
  • 0:52 - 0:57
    So let me do that,
    hopefully this will work.
  • 0:57 - 1:01
    My computer is a little bit special.
    It runs a lot of Open Source software.
  • 1:01 - 1:06
    It runs FreeBSD.
  • 1:06 - 1:10
    applause
  • 1:10 - 1:14
    It even has things like OpenSSL
    in there, and nginx.
  • 1:14 - 1:21
    And Cairo I think, and WebKit. It runs a
    lot of interesting Open Source software.
  • 1:21 - 1:25
    But we all know that BSD is dying, so
    we can make it run something a little bit
  • 1:25 - 1:30
    more interesting. And hopefully
    give a presentation about it.
  • 1:30 - 1:33
    Let’s see if this works.
  • 1:36 - 1:38
    It’s a good start, black screen, you know.
  • 1:38 - 1:43
    It’s syncing to disk
    and file system shutting down.
  • 1:43 - 1:49
    There we go!
    applause
  • 1:49 - 1:55
    continued applause
  • 1:55 - 1:59
    And yes, I run Gentoo Linux.
  • 1:59 - 2:01
    applause
  • 2:01 - 2:05
    This is the “Does Wi-Fi work?” moment.
    Hopefully.
  • 2:07 - 2:13
    NTP, yeah, no… “NTP failed”. Well,
    that’s a bit annoying, but it still works.
  • 2:16 - 2:21
    Hello? Yeah, it takes a bit to boot.
    It doesn’t run systemd, you know.
  • 2:21 - 2:25
    It’s sane, it’s a tiny bit slower,
    but it’s sane.
  • 2:25 - 2:30
    There we go.
    applause
  • 2:30 - 2:35
    This is the “Does my controller
    work?” moment.
  • 2:35 - 2:40
    Bluetooth in Saal 1.
    Okay, it does.
  • 2:40 - 2:42
    Alright, so let’s get started.
  • 2:50 - 2:54
    So this is “Console Hacking 2016 –
    PS4: PC Master Race”.
  • 2:54 - 2:58
    I apologize for the horrible Nazi joke in
    the subtitle, but it’s a Reddit thing.
  • 2:58 - 3:03
    “PC Master Race”, why? Well.
    PS4, is it a PC? Is it not a PC?
  • 3:03 - 3:06
    But before we get started,
    I would like to dedicate this talk
  • 3:06 - 3:09
    to my good friend Ben Byer
    who we all know as “bushing”.
  • 3:09 - 3:12
    Unfortunately, he passed away
    in February of this year and he was
  • 3:12 - 3:15
    a great hacker, he came to multiple
    congresses, one of the nicest people
  • 3:15 - 3:19
    I’ve ever met. I’m sure that some of you
    who have met him would agree with that.
  • 3:19 - 3:24
    If it weren’t for him, I wouldn’t be here.
    So, thank you.
  • 3:24 - 3:30
    applause
  • 3:30 - 3:35
    Alright. So, the PS4.
    Is it a PC? Is it not a PC?
  • 3:35 - 3:37
    Well, it’s a little bit different
    from previous consoles.
  • 3:37 - 3:42
    It has x86, it’s an x86 CPU.
    It runs FreeBSD, it runs WebKit.
  • 3:42 - 3:45
    It doesn’t have a hypervisor,
    unfortunately.
  • 3:45 - 3:50
    Then again, the PS3 had a hypervisor
    and it was useless, so there you go.
  • 3:50 - 3:52
    So this is different from the PS3,
    but it’s not completely different.
  • 3:52 - 3:55
    It does have a security processor
    that you can just ignore because
  • 3:55 - 4:00
    it doesn’t secure anything.
    So that’s good.
  • 4:00 - 4:03
    So how to own a PS4? Well, you write
    a WebKit exploit and you write
  • 4:03 - 4:08
    a FreeBSD exploit, duh. Right?
    Everything runs WebKit,
  • 4:08 - 4:11
    and FreeBSD is not exactly the
    most secure OS in the world,
  • 4:11 - 4:15
    especially not with Sony customizations.
    So this is completely boring stuff.
  • 4:15 - 4:19
    Like, what’s the point of talking about
    WebKit and FreeBSD exploits?
  • 4:19 - 4:22
    Instead, this talk is going to be about
    something a little bit different.
  • 4:22 - 4:26
    First of all, after you run an exploit,
    well, you know, step 3 “something”,
  • 4:26 - 4:30
    step 4 “PROFIT”. What is this about?
    And not only that, though.
  • 4:30 - 4:33
    Before you write an exploit, you usually
    want to have the code you’re trying
  • 4:33 - 4:38
    to exploit. And with WebKit and FreeBSD
    you kinda do, but not the build they use,
  • 4:38 - 4:41
    and it’s customized. And it’s annoying to
    write an exploit if you don’t have access
  • 4:41 - 4:44
    to the binary. So how do you get
    the binary in the first place?
  • 4:44 - 4:48
    Well, you dump the code,
    that’s an interesting step.
  • 4:48 - 4:52
    So let’s get started with step zero:
    black-box code extraction, the fun way.
  • 4:52 - 4:54
    A long time ago
    in a hackerspace far, far away
  • 4:54 - 4:59
    fail0verflow got together
    after 31c3.
  • 4:59 - 5:03
    And we looked at the PS4 motherboard
    and this is what we saw. So there’s
  • 5:03 - 5:06
    an Aeolia southbridge, that’s a codename,
    by the way. Then there’s the Liverpool APU
  • 5:06 - 5:10
    which is the main processor.
    It’s a GPU and a CPU
  • 5:10 - 5:14
    which is done by AMD, and
    it has some RAM. And then
  • 5:14 - 5:16
    the southbridge connects to a bunch
    of random crap like the USB ports,
  • 5:16 - 5:19
    a hard disk, which is USB. For some
    inexplicable reason the internal disk
  • 5:19 - 5:25
    on the PS4 is USB. Like it’s SATA to USB,
    and then to USB on the southbridge.
  • 5:25 - 5:28
    Even though it has SATA,
    like, what? laughs
  • 5:28 - 5:32
    The Blu-ray drive is SATA. The Wi-Fi,
    Bluetooth, SDIO and Ethernet is GMII.
  • 5:32 - 5:34
    Okay, how do we attack this?
    Well, GDDR5…
  • 5:34 - 5:39
    What just…?
    Oh. I have a screensaver, apparently!
  • 5:39 - 5:41
    That’s great.
    laughter
  • 5:41 - 5:44
    I thought I killed that,
    let me kill that screensaver real quick.
  • 5:44 - 5:51
    applause
    Something had to fail, it always does.
  • 5:52 - 5:55
    I mean, of course I can
    SSH into my PS4, right?
  • 5:55 - 6:00
    So there we go, okay.
    Could have sworn I’d fix that. Anyway…
  • 6:00 - 6:03
    Which one of these interfaces
    do you attack? Well, you know,
  • 6:03 - 6:07
    USB, SATA, SDIO, GMII – that’s
    the raw ethernet interface, by the way –
  • 6:07 - 6:12
    all these are CPU-controlled. The CPU
    issues commands and the devices reply.
  • 6:12 - 6:16
    The devices can’t really do anything. They
    can’t write to memory or anything like that.
  • 6:16 - 6:19
    You can exploit USB if you
    hide a bug in the USB driver,
  • 6:19 - 6:21
    but we’re back to the no-code issue.
  • 6:21 - 6:25
    DDR5, that would be great,
    we could just write to our memory
  • 6:25 - 6:28
    and basically own the entire thing.
    But it’s a very high-speed bus.
  • 6:28 - 6:30
    It’s definitely exploitable.
    If you were making a secure system
  • 6:30 - 6:34
    don’t assume we can’t own DDR5,
    because we will.
  • 6:34 - 6:37
    But it’s not the path of least resistance,
    so we’re not gonna do that.
  • 6:37 - 6:40
    However, there’s a thing called
    PCI Express in the middle there.
  • 6:40 - 6:42
    Hmm, that’s interesting!
  • 6:42 - 6:45
    PCIe is very fun for hacking –
    even though it might seem intimidating –
  • 6:45 - 6:49
    because it’s bus mastering,
    that means you can DMA to memory.
  • 6:49 - 6:53
    It’s complicated, and complicated things
    are hard to implement properly.
  • 6:53 - 6:58
    It’s robust. People think that PCIe is this
    voodoo-highspeed… No it’s not!
  • 6:58 - 7:01
    It’s high-speed, but you don’t need
    matched traces to make it work.
  • 7:01 - 7:05
    It will run over wet string. You can hotwire
    PCIe with pieces of wire and it will work.
  • 7:05 - 7:09
    At least at short distances anyway.
    Believe me, it’s not as bad as you think.
  • 7:09 - 7:13
    It’s delay-tolerant, so you
    can take your time to reply.
  • 7:13 - 7:17
    And the drivers are full of fail because
    nobody writes a PCIe driver assuming
  • 7:17 - 7:20
    the device is evil even though of course
    everybody should because devices can
  • 7:20 - 7:23
    and will be evil.
    But nobody does that.
  • 7:23 - 7:26
    So, what can we do?
    Well, we have a PCIe link,
  • 7:26 - 7:31
    let’s cut the lines and plug in the
    southbridge to a PC motherboard
  • 7:31 - 7:34
    that we stick on the side. Now
    the southbridge is a PCIe card for us.
  • 7:34 - 7:38
    And we connect the APU to an FPGA
    board which then can pretend to be
  • 7:38 - 7:43
    a PCIe device. So we can man-in-the-middle
    this PCIe bus and it’s now x1 width
  • 7:43 - 7:47
    instead of x4 because it’s easier that
    way, but it will negotiate, that’s fine.
  • 7:47 - 7:51
    So how do we connect that
    motherboard and the FPGA?
  • 7:51 - 7:54
    There’s of course many ways of doing this.
    How many of you have done
  • 7:54 - 7:58
    any hardware hacking, even Arduino or
    anything like that? Raise your hand!
  • 7:58 - 8:02
    I think that’s about a third to a half
    or something like that, at least.
  • 8:02 - 8:05
    When you hack some hardware,
    you meld some hardware,
  • 8:05 - 8:10
    after you blink an LED, what is the first
    interface you use to talk to your hardware?
  • 8:10 - 8:15
    Serial port! So we run
    PCIe over RS232 at 115 kBaud
  • 8:15 - 8:16
    which makes this PCIe…
    laughter and applause
  • 8:22 - 8:28
    I said it was delay-tolerant!
    So it makes this PCIe 0.00002x.
  • 8:28 - 8:30
    And eventually there was a
    Gigabit ethernet port on the FPGA
  • 8:30 - 8:35
    so I upgraded to that, but I only got
    around to doing it in one direction.
  • 8:35 - 8:39
    So now it’s PCIe 0.0002x in one direction
    and 0.5x in the other direction
  • 8:39 - 8:42
    which has to make this one of the most
    asymmetric buses in the world.
  • 8:43 - 8:46
    But it works, believe me.
    This his hilarious.
  • 8:46 - 8:51
    We can run PCIe over serial out. Also, we
    were ASCII encoding, so half the bandwidth.
  • 8:51 - 8:53
    It works fine. It’s fine.
  • 8:53 - 8:57
    So, PCIe 101.
    It’s a reliable packet-switched network.
  • 8:57 - 8:59
    It uses a thing called
    “Transaction Layer Packets”
  • 8:59 - 9:03
    which are basically just packets you send.
    It can be… Memory Read, Memory Write,
  • 9:03 - 9:06
    IO Read, IO Write,
    Configuration Read, Configuration Write.
  • 9:06 - 9:10
    There can be a message-signaled interrupt
    which is a way of saying: “Hey,
  • 9:10 - 9:13
    listen to me!” by writing
    to an address in memory.
  • 9:13 - 9:16
    Because we can write the thing,
    so why not write for interrupts?
  • 9:16 - 9:20
    It has legacy interrupts
    which are basically emulating the old
  • 9:20 - 9:24
    wire-low-for-interrupt-and-
    high-for-no-interrupt thing,
  • 9:24 - 9:26
    you can tunnel that over PCIe.
  • 9:26 - 9:29
    And it has completions, which are
    basically the replies. So if you read
  • 9:29 - 9:32
    a value from memory the completion
    is what you get back with the value
  • 9:32 - 9:36
    you tried to read. So that’s PCIe,
    we can just go wild with DMA.
  • 9:36 - 9:39
    We can just read all memory, dump
    the kernel. Hey, it’s awesome, right?
  • 9:39 - 9:41
    Except there’s an IOMMU in the APU.
  • 9:41 - 9:46
    But... first, the IOMMU will protect
    the devices. It will only let you access
  • 9:46 - 9:50
    what memory is mapped to your device.
    So the host has to allow you
  • 9:50 - 9:53
    to read and write to memory.
    But just because there’s an IOMMU
  • 9:53 - 9:58
    doesn’t mean that Sony uses it properly.
    Here’s some pseudo-code,
  • 9:58 - 10:01
    it has a buffer on the stack, it says:
    “please read from flash to this buffer”
  • 10:01 - 10:05
    with the correct length. Can anyone
    see the problem with this code?
  • 10:05 - 10:09
    Well, it maps the buffer and it
    reads and it unmaps the buffer.
  • 10:09 - 10:13
    But IOMMUs don’t just map
    byte “foo” to byte “bar”,
  • 10:13 - 10:17
    they map pages, and
    pages are 64k on the PS4.
  • 10:17 - 10:20
    So Sony has just mapped 64k
    of its stack to the device so
  • 10:20 - 10:26
    it can just DMA straight into the stack,
    basically the whole stack, and take over.
  • 10:26 - 10:30
    Now we got code execution, FreeBSD
    kernel dump, and WebKit and OS libs dump,
  • 10:30 - 10:32
    just from mapping the flash.
  • 10:32 - 10:36
    Okay, that’s step zero.
    We have the code.
  • 10:36 - 10:40
    But that’s not the PS4 that we did this
    on, it was a giant mess of wires.
  • 10:40 - 10:43
    Someone here knows about that,
    you know, flying over on Facebook.
  • 10:43 - 10:46
    We don’t make a ‘nice’ exploit.
    We’ve done that because, as I said,
  • 10:46 - 10:50
    WebKit, FreeBSD, whatever.
    What comes after that?
  • 10:50 - 10:55
    We want to do something.
    Of course we want to run Linux, duh!
  • 10:55 - 10:59
    How do you go from FreeBSD to Linux?
    It’s not a trivial process.
  • 10:59 - 11:03
    But you use something
    that we call “ps4-kexec”.
  • 11:03 - 11:07
    So how does this work? It’s simple,
    right? You just want to run Linux?
  • 11:07 - 11:10
    Just ‘jmp’ to Linux, right?
    Well… kind of.
  • 11:10 - 11:13
    You need to load Linux into contiguous
    physical RAM, set up boot parameters,
  • 11:13 - 11:17
    shut down FreeBSD cleanly, halt secondary
    CPUs, make new pagetables etc.
  • 11:17 - 11:20
    A lot of random things. I’m not going to
    bore you with this crap because you
  • 11:20 - 11:23
    can read the code. But there’s a lot
    of iteration in getting this to work.
  • 11:23 - 11:27
    Let’s assume that you do all this magical
    cleanup and you get Linux into
  • 11:27 - 11:33
    a nice state and you can ‘jmp’ Linux.
    Now we jmp Linux, right? It’s cool.
  • 11:33 - 11:35
    Yeah, you can technically jmp to Linux,
    and it will technically run
  • 11:35 - 11:41
    …for a little bit. And it will stop.
  • 11:41 - 11:45
    And you will not get any serial or any
    video or anything. What’s going on here?
  • 11:45 - 11:49
    Let’s talk about hardware.
    What is x86?
  • 11:49 - 11:53
    x86 is a mediocre instruction set
    architecture by Intel.
  • 11:53 - 11:56
    It’s okay, I guess.
    It’s not great.
  • 11:56 - 12:00
    PS4 is definitely x86, it’s x86-64.
  • 12:00 - 12:04
    What is a PC? Aah!
    PC is a horrible, horrible thing
  • 12:04 - 12:07
    built upon piles and piles of legacy crap
    dating back to 1981.
  • 12:07 - 12:10
    The PS4 is definitely -not- a PC.
  • 12:10 - 12:15
    That’s practically Sony-level hardware fail,
    so it could be, but it’s not.
  • 12:15 - 12:19
    So what’s going on? A legacy PC
  • 12:19 - 12:23
    basically has an 8259 Programmable
    Interrupt Controller,
  • 12:23 - 12:27
    a 8253 Programmable Interval Timer,
    a UART at I/O 3f8h,
  • 12:27 - 12:29
    which is the standard address
    for a serial port.
  • 12:29 - 12:34
    It has a PS/2 keyboard controller, 8042.
    It has an RTC, a real-time clock
  • 12:34 - 12:36
    with a CMOS, and everyone
    knows the CMOS, right?
  • 12:36 - 12:40
    MC146818 is the chip number for that. An
    ISA bus – even if you think you don’t have
  • 12:40 - 12:43
    an ISA bus your computer has an ISA bus
    inside the southbridge somewhere.
  • 12:43 - 12:48
    And it has VGA.
    The PS4 doesn’t have -any- of these things.
  • 12:48 - 12:52
    So what do we do?
    Let’s look a little bit how a PC works
  • 12:52 - 12:56
    and how a PS4 works. This is a general
    simple PC system. There’s an APU
  • 12:56 - 13:00
    or an Intel Core CPU with a southbridge,
    Intel calls it PCH, AMD FCH.
  • 13:00 - 13:04
    There’s an interface that is basically
    PCIe although Intel calls it DMI and AMD
  • 13:04 - 13:08
    calls it UMI. DDR3 RAM and a bunch
    of peripherals and SATA, whatever.
  • 13:08 - 13:12
    The PS4 kind of looks like that, right?
    So you think this can’t be that dif…
  • 13:12 - 13:16
    What’s so hard about this?
    Because all the crap I mentioned earlier
  • 13:16 - 13:20
    is in the southbridge on a PC, right?
    The PS4 has a southbridge, right?
  • 13:20 - 13:24
    Right? Right? Umm… so
    the southbridge, the AMD standard FCH
  • 13:24 - 13:28
    implements Intel legacy from 1981.
    The Marvell Aeolia
  • 13:28 - 13:31
    – Marvell is the maker of the PS4
    southbridge – implements Intel legacy
  • 13:31 - 13:36
    from 2002. What does that mean?
    Ah! That’s no southbridge,
  • 13:36 - 13:40
    that’s a Marvell Armada SoC!
    So it’s not actually a southbridge,
  • 13:40 - 13:44
    it was never a southbridge.
    It’s an ARM system-on-a-chip CPU
  • 13:44 - 13:47
    with everything. It’s a descendant
    from Intel StrongARM or XScale.
  • 13:47 - 13:49
    It has a bunch of peripherals.
    And what they did is, they stuck
  • 13:49 - 13:53
    a PCIe bridge on the side and said: “Hey
    x86, you can now use all my ARM shit.”
  • 13:53 - 13:56
    So it exposes all of its ARM peripherals
    to the x86. They added some stuff
  • 13:56 - 13:59
    they really needed for PCs
    and it has its own RAM.
  • 13:59 - 14:04
    Why do they do this? Well, it also runs
    FreeBSD on the ARM in standby mode.
  • 14:04 - 14:06
    And that’s how they do the whole
    “download updates in the background,
  • 14:06 - 14:09
    get content, update, whatever”.
    All that crap is because they have
  • 14:09 - 14:13
    a separate OS on a separate chip running
    in standby mode. Okay, that’s great, but
  • 14:13 - 14:18
    it’s also batshit insane.
    laughter
  • 14:18 - 14:22
    Quick recap: This is what a
    PCIe bus number looks like,
  • 14:22 - 14:24
    sorry, a device number.
    It has a bus number, which is 8 bits,
  • 14:24 - 14:28
    a device number, which is 5 bits,
    and a function number, which is 3 bits.
  • 14:28 - 14:31
    You’ve probably seen this in lspci
    if you ever done that.
  • 14:31 - 14:34
    This is what a regular southbridge
    looks like. It has a USB controller,
  • 14:34 - 14:38
    a PCI, ISA bridge, SATA, whatever.
    And it has a bunch of devices.
  • 14:38 - 14:41
    So one southbridge pretends
    to be multiple devices.
  • 14:41 - 14:44
    Because you only have three bits
    for a function number so you can only have
  • 14:44 - 14:47
    up to eight functions in one device.
  • 14:47 - 14:49
    Intel southbridge just says:
    “I’m device 14, 16, 1a, 1…,
  • 14:49 - 14:52
    I’m just a bunch of devices,
    and you can talk to all of them.”
  • 14:52 - 14:58
    If you lspci on a roughly unpatched
    Linux kernel on the PS4
  • 14:58 - 15:01
    you get something like this.
    So the Aeolia first of all
  • 15:01 - 15:04
    clones itself into every PCIe device
    because they were too lazy to do
  • 15:04 - 15:08
    “if device equals my number then
    reply, otherwise don’t reply”. No,
  • 15:08 - 15:11
    they just said: “Oh, just reply to every
    single PCIe device that might query”.
  • 15:11 - 15:17
    Linux sees the southbridge 31 different
    times, which is kind of annoying
  • 15:17 - 15:20
    because it gets really confused when it
    sees 31 clones of the same southbridge.
  • 15:20 - 15:25
    And then it has eight functions:
    ACPI, ethernet, SATA, SDMC, PCIe,…
  • 15:25 - 15:28
    Eight functions, so all three bits.
  • 15:28 - 15:30
    Turns out, eight functions
    are not enough for everybody.
  • 15:30 - 15:34
    Function no. 4, “PCI Express Glue”, has a
    bridge config, MSI interrupt controller,
  • 15:34 - 15:37
    ICC – we’ll talk about that later –,
    HPET timers, Flash controller,
  • 15:37 - 15:45
    RTC, timers, 2 serial ports, I2C… All
    this smashed into one single PCIe device.
  • 15:45 - 15:49
    Linux has a minimum system requirement
    to run on anything.
  • 15:49 - 15:54
    You need a timer, you need interrupts,
    and you need some kind of console.
  • 15:54 - 15:57
    The PS4 has no PIT, no PIC and no standard
    serial so none of the standard PC stuff
  • 15:57 - 16:02
    is going to work here. The board has
    test points for an 8250 standard serial
  • 16:02 - 16:06
    in a different place. So we run
    DMESG over that, okay, fine.
  • 16:06 - 16:08
    Linux has earlycon which we can
    point to a serial port and say:
  • 16:08 - 16:11
    “Please send all your DMESG here
    very early because I really want to see
  • 16:11 - 16:16
    what’s going on”. Doesn’t need IRQs,
    you set console=uart8250,
  • 16:16 - 16:20
    the type, the address, the speed.
    And you’ll see it says 3200 instead of
  • 16:20 - 16:23
    115 kBaud. That’s because their clock
    is different. So you set 3200 but
  • 16:23 - 16:28
    it really means 115k.
    And that gets you DMESG.
  • 16:28 - 16:30
    That actually gets you “Linux booting,
    uncompressing”, whatever.
  • 16:30 - 16:32
    That’s pretty good.
  • 16:32 - 16:37
    Okay, we need a timer.
    Because otherwise everything explodes.
  • 16:37 - 16:40
    Linux supports the TSC, a built-in CPU
    timer which is super nice and super fun.
  • 16:40 - 16:44
    And PS4 has that. But Linux tries to
    calibrate it against the legacy timer
  • 16:44 - 16:47
    which on the PS4 doesn’t exist
    so that’s fail.
  • 16:47 - 16:52
    So again, the PS4 -really- is not a PC.
  • 16:52 - 16:54
    What we need to do here is
    defining a new subarchitecture
  • 16:54 - 16:59
    because Linux supports this concept.
    Says: “this is not a PC, this is a PS4”.
  • 16:59 - 17:01
    The bootloader tells Linux:
    “Hey! This is a PS4!”
  • 17:01 - 17:04
    And then Linux says: “Okay, I’m not gonna
    do the old timestamp calibration,
  • 17:04 - 17:08
    I’m gonna do it for the PS4” which has
    a special code that we wrote
  • 17:08 - 17:11
    that calibrates against the PS4 timer.
    And it disables the legacy crap.
  • 17:11 - 17:14
    So now this is officially
    not a PC anymore.
  • 17:14 - 17:19
    Now we can talk about ACPI.
  • 17:19 - 17:21
    You might know ACPI for all its
    horribleness and all its evilness
  • 17:21 - 17:25
    and all its Microsoft-y-ness.
    ACPI - most people associate it with
  • 17:25 - 17:28
    “Suspend” and “Suspend to Hibernate”.
    It’s not just power,
  • 17:28 - 17:32
    it does other stuff, too.
    So we need ACPI for PCI config,
  • 17:32 - 17:34
    for the IOMMU, for the CPU frequency.
  • 17:34 - 17:38
    The PS4 of course has broken ACPI tables
    because, of course it would be.
  • 17:38 - 17:42
    So we fixed them in ps4-kexec.
  • 17:42 - 17:45
    Now interrupts. We have timers,
    we have serial, we fixed some stuff.
  • 17:45 - 17:49
    The PS4 does message-signaled interrupts
    which is, what I said, the non-legacy,
  • 17:49 - 17:51
    the nice new thing where you just write
    a value, and what you do is you tell
  • 17:51 - 17:55
    the device when you want to interrupt
    “please write this value to this address”.
  • 17:55 - 17:58
    The device does that, and the CPU
    interrupt controller sees that write
  • 17:58 - 18:01
    and says: “Oh, this is an interrupt”
    and then just fires off that interrupt
  • 18:01 - 18:06
    into the CPU. That’s great.
    It’s super fast and very efficient.
  • 18:06 - 18:09
    And the value directly tells the CPU:
    “That’s the interrupt vector you have
  • 18:09 - 18:14
    to go to”. Okay, that’s the standard MSI
    way there. Your computer does MSI that way.
  • 18:14 - 18:20
    This is how the PS4 does MSI: The Aeolia
    ignores the MSI config registers
  • 18:20 - 18:24
    in the standard location. Instead of
    has its own MSI controller,
  • 18:24 - 18:28
    all stuff that’s in Function 4,
    which is that “glue” device.
  • 18:28 - 18:32
    Each function gets a shared address in
    memory to write to and the top 27 bits
  • 18:32 - 18:36
    of data. And every sub function, because
    you can’t do a lot of things into one place,
  • 18:36 - 18:40
    only gets the different 5 bits.
    And all MSIs originate from Function 4,
  • 18:40 - 18:43
    so this device has to fire an interrupt,
    then it goes to here, and then
  • 18:43 - 18:49
    that device fires an interrupt. Like… what…
    this is all… what the hell is going on?
  • 18:49 - 18:54
    Seriously, this is really fucked up. And
    – the i’s are missing in the front there.
  • 18:54 - 18:59
    But yeah. So, driver hell. Now the devices
    are interdependent. Then the IRQ vector
  • 18:59 - 19:03
    location is not sequential, so that’s not
    gonna work. And you need to modify
  • 19:03 - 19:08
    all the drivers. This is really painful to
    develop for. So what we ended up doing
  • 19:08 - 19:12
    is there is a core driver that implements
    an interrupt controller for this thing.
  • 19:12 - 19:16
    And then we have to make sure that loads
    first, before the device driver. So Linux
  • 19:16 - 19:19
    has a mechanism for that. And we had to
    patch the drivers. Some drivers we patched,
  • 19:19 - 19:23
    so to use these interrupts. And others
    we wrapped around to use these interrupts.
  • 19:23 - 19:26
    Unfortunately, because of the top bit
    thing, everything has to share one interrupt
  • 19:26 - 19:31
    within a function. Thankfully, we can fix
    that with a IOMMU because it can read
  • 19:31 - 19:34
    direct interrupt. So we can say:
    “Oh, interrupt no. 0 goes to here,
  • 19:34 - 19:39
    1 goes to here, 2 goes to here…”.
    That’s great 'cause it's consecutive, right?
  • 19:39 - 19:45
    0 1 2 3 4 5… it’s obviously gonna have
    the same top bits. But we have to fix
  • 19:45 - 19:49
    the ACPI table for that because it’s
    broken. But this does work. So this
  • 19:49 - 19:54
    gets us interrupts that function and
    they’re individual. So let’s look at
  • 19:54 - 19:58
    the check list: we have interrupts, timers,
    early serial, late serial with interrupts.
  • 19:58 - 20:03
    We can get some user space, we can stash
    some user space and binaries into the kernel.
  • 20:03 - 20:06
    And it will boot and you can get a console,
    but you get a console and you try
  • 20:06 - 20:13
    writing commands and sometimes it hangs.
    Okay. What’s going on there?
  • 20:13 - 20:17
    So it turns out that FreeBSD masks
    interrupts with an AMD proprietary
  • 20:17 - 20:21
    register set. We had to clean that up,
    too. And that fixes serial,
  • 20:21 - 20:25
    and all the other interrupts.
    This took ages to find. It’s like: “why…
  • 20:25 - 20:27
    interrupts on CPU serial
    sometimes don’t…, yeah”.
  • 20:27 - 20:34
    I ended up dumping register sets,
    and I saw this #FFFFF here, not #FFFFF,
  • 20:34 - 20:39
    what’s that? But tracking through this
    stack to find this was really annoying.
  • 20:39 - 20:46
    Alright. So we have the basics. We have
    like a core platform we can run Linux on,
  • 20:46 - 20:50
    even though it won’t do anything
    interesting. Add drivers!
  • 20:50 - 20:54
    So we have USB xHCI which has three
    controllers in one device. Again, because
  • 20:54 - 21:00
    “Let’s make it insane!”. We have SDHCI,
    that’s SDIO for the Wi-Fi and the Bluetooth.
  • 21:00 - 21:04
    Needs a non-standard config, it needs
    quirks. Ethernet needs more hacks.
  • 21:04 - 21:07
    It’s still partially broken, it only runs at
    Gigabit speed. If you plug in a 100Mbit/s
  • 21:07 - 21:10
    switch it just doesn’t send any data.
    Not sure why.
  • 21:10 - 21:14
    And then all of this worked fine in
    Linux 4.4, and then just three days ago
  • 21:14 - 21:18
    I think I tried to rebase on 4.9, and so
    we have the latest and the greatest.
  • 21:18 - 21:21
    And everything failed. And DMA didn’t
    work. And all the drivers were just
  • 21:21 - 21:24
    throwing their hands up in the air,
    “what’s going on here?”.
  • 21:24 - 21:27
    exhales
    Aeolia strikes back. So.
  • 21:27 - 21:33
    That’s what… the Aeolia looks like,
    normally. So you have… again,
  • 21:33 - 21:37
    it’s an ARM SoC, it’s really not a device.
    It’s like its own little system. But
  • 21:37 - 21:41
    it maps, it’s low 2 GB of the address base
    to memory on the PC. And then the PC
  • 21:41 - 21:45
    has a window into its registers that it
    can use to control those devices.
  • 21:45 - 21:48
    So the PC can kind of play with the
    devices, and the DMA is to the same address
  • 21:48 - 21:53
    and that works great. Because it’s mapped
    in the same place. And then has its own RAM,
  • 21:53 - 21:59
    in its own address space. This works fine.
    But now we had an IOMMU. Because
  • 21:59 - 22:02
    we needed it for the interrupts. And the
    IOMMU inserts its own address space
  • 22:02 - 22:05
    in between and says: “Okay, you can map
    anything to anything you want, that’s great.“
  • 22:05 - 22:08
    It’s a page table, you can say “this
    address goes to that address.”
  • 22:08 - 22:13
    Linux 4.4 did this: it would find some
    addresses at the bottom of the IOMMU
  • 22:13 - 22:18
    address space, say: “page 1 goes to this,
    page 2 goes to that, page 3 goes to that”.
  • 22:18 - 22:23
    And say: “device, you can now write to these
    pages”. And they go to this place in the x86.
  • 22:23 - 22:28
    That worked fine. It turns out Linux 4.9,
    or somewhere between 4.4 and 4.9
  • 22:28 - 22:33
    it started doing this: it would map pages
    from the top of the IOMMU address space
  • 22:33 - 22:37
    and that’s fine for the IOMMU but it’s
    not in the window in the Aeolia, so
  • 22:37 - 22:42
    you say “ethernet DMA to address
    FExxx”, and instead of DMA-ing
  • 22:42 - 22:50
    to the RAM on the PC it DMA-s to the RAM
    on the Aeolia which is not gonna work.
  • 22:50 - 22:54
    Effectively the Aeolia implements 31 bit
    DMA, not 32 bit DMA because only
  • 22:54 - 23:00
    the bottom half is usable. It’s like why…
    this is all really fucked up, guys!
  • 23:00 - 23:04
    Seriously. And this is littered all over
    the code in Linux, so they seeded
  • 23:04 - 23:07
    more patches, and it works, but, yeah.
  • 23:07 - 23:11
    Painful. Okay. Devices, laying out (?)
    devices’ work.
  • 23:11 - 23:16
    Now for something completely different.
    Who can tell me who this character is?
  • 23:16 - 23:21
    That’s Starsha from Space Battleship Yamato.
    And apparently that’s the code name
  • 23:21 - 23:25
    for the PS4 graphics chip. Or at least that’s
    one of the code names. Because
  • 23:25 - 23:28
    they don’t seem to be able to agree
    on like what the code names are.
  • 23:28 - 23:32
    It’s got “Liverpool” in some places, and
    “Starsha” in other places. Then “ThebeJ”
  • 23:32 - 23:36
    in other places. And we think Sony calls
    it “Starsha” and AMD calls it “Liverpool”
  • 23:36 - 23:40
    but we’re not sure. We are calling it
    “Liverpool” everywhere just to avoid
  • 23:40 - 23:44
    confusion. Okay.
    What’s this GPU about?
  • 23:44 - 23:47
    Well, it’s an AMD Sea
    Islands generation GPU,
  • 23:47 - 23:53
    which is spelled CI instead of SI because
    “S” was taken. It’s similar to other chips
  • 23:53 - 23:58
    in the generation. So at least that’s
    not a bat shit crazy new thing.
  • 23:58 - 24:01
    But it does have quirks and customizations
    and oddities and things that don’t work.
  • 24:01 - 24:04
    What we did is we took Bonaire which is
    another GPU that is already supported
  • 24:04 - 24:07
    by Linux in that generation, and just kind
    of added a new chip and said, okay,
  • 24:07 - 24:13
    do all the Bonaire stuff, and then change
    things. And hopefully adapt it to the PS4.
  • 24:13 - 24:16
    So hacking AMD drivers, okay, well,
    they’re open-source but AMD does not
  • 24:16 - 24:20
    publish register docs. They publish 3D
    shader and command queue documentations,
  • 24:20 - 24:24
    so we get all the user space 3D rendering
    commands, that’s documented. But they
  • 24:24 - 24:28
    don’t publish all the kernel hardware
    register documentation. That’s what
  • 24:28 - 24:31
    we really want for hacking on drivers. So
    that’s annoying. And you’re thinking
  • 24:31 - 24:34
    “the code is the documentation”,
    right? “Just read the Linux drivers”.
  • 24:34 - 24:39
    That’s great. Yeah, but they’re incomplete,
    then they have magic numbers, and
  • 24:39 - 24:43
    it’s, you know, you don’t know if you need
    to write a new register that’s not there,
  • 24:43 - 24:47
    and it really sucks to try to write a GPU
    driver by reading other GPU drivers
  • 24:47 - 24:51
    with no docs. So what do we do? We’re
    hackers, right? We google. Everytime
  • 24:51 - 24:54
    we need information, hopefully Google will
    find it because Google knows everything.
  • 24:54 - 24:59
    And any tip that you could find in any
    forum or code dumped somewhere is
  • 24:59 - 25:06
    great. One of the things we found is we
    googled this little string, “R8XXGPU”.
  • 25:06 - 25:11
    And we get nine results. And the second
    result is this place, it’s “Siliconkit”,
  • 25:11 - 25:16
    token, was that okay? It’s an XML file.
    And if we look at that it looks like
  • 25:16 - 25:21
    it’s an XML file that contains a dump of
    the Bonaire GPU register documentation.
  • 25:21 - 25:26
    But it’s like broken XML, and it’s
    incomplete, it stops at one point.
  • 25:26 - 25:31
    But like: “what’s this doing here?”
    And where did this come from, right?
  • 25:31 - 25:36
    So let’s dig a little deeper. Okay Google,
    what do you know about this website?
  • 25:36 - 25:40
    Well, there’s some random things like
    whatthehellno.txt and whatthehellyes.txt
  • 25:40 - 25:46
    and some Excel files. Those are
    really Excel like XML cell sheets.
  • 25:46 - 25:51
    And then there’s a thing in the (?) there
    called RAI.GRAMMAR.4.TXT.
  • 25:51 - 25:57
    I wonder what that is. And it looks like
    it’s a grammar, being a notation description
  • 25:57 - 26:03
    for a syntax, of some kind of register
    documentation file. This looks like
  • 26:03 - 26:11
    an AMD internal format but it’s on this
    website. Okay. So we have these two URLs,
  • 26:11 - 26:15
    /pragmatic/bonaire.xml
    and /RAI/rai.grammar4.txt.
  • 26:15 - 26:22
    Let’s try something. How about maybe
    /pragmatic/bonaire.rai – nah, it’s a 404.
  • 26:22 - 26:27
    Okay, /pragmatic/RAI/bonaire.rai – aah!
    Bingo!
  • 26:27 - 26:35
    laughter and applause
  • 26:35 - 26:39
    So this is a full – almost full Bonaire
    register documentation with like
  • 26:39 - 26:44
    full register field descriptions, breakdowns,
    all the addresses. It’s not 100% but
  • 26:44 - 26:49
    like of the vast majority. This seems to
    be AMD-internal stuff. And I looked
  • 26:49 - 26:53
    this guy up, and apparently he worked
    at AMD at some point. So…
  • 26:53 - 26:57
    But yeah… This is really, really helpful
    because now you know what everything
  • 26:57 - 27:03
    means, and debug registers, and… yeah.
    So I wrote a working parser for this format.
  • 27:03 - 27:07
    This was effectively writing an XML parser,
    something like convert this thing to XML
  • 27:07 - 27:11
    but it was all broken. Oh – he was writing
    it in PHP, by the way, so there you go …
  • 27:11 - 27:15
    So I wrote a working one in Python and
    you can dump it and then you can see
  • 27:15 - 27:18
    what each register means, and it’ll tell
    you all the options. You can take
  • 27:18 - 27:23
    a register dump and map it to the (?)(?)
    documented. You can diff dumps,
  • 27:23 - 27:27
    you can generic defines, it’s very useful
    for AMD GPUs. And this, grossly speaking
  • 27:27 - 27:31
    applies to a lot of AMD GPUs, like they
    share a lot of registers. So this is useful
  • 27:31 - 27:36
    for anyone hacking on AMD GPU stuff. Over
    4.000 registers are documented in the …
  • 27:36 - 27:42
    just in the main GPU address space alone.
    That’s great. Okay. So we have some docs.
  • 27:42 - 27:50
    How do we get to a frame buffer? So if you…
    Israel (?) is HDMI it’s easy, right? The GPU
  • 27:50 - 27:52
    has HDMI, and if you query the GPU
    information you actually get that it has
  • 27:52 - 27:58
    an HDMI port and a DisplayPort port. Okay,
    maybe it’s unconnected, that’s fine, right?
  • 27:58 - 28:04
    But if you actually ask the GPU it tells
    you: “HDMI is not connected, DP is connected”.
  • 28:04 - 28:10
    Okay. Yeah, they have an external HDMI
    encoder from DisplayPort to HDMI because
  • 28:10 - 28:13
    just putting a wire from A to B is too
    difficult, because this is Sony, so:
  • 28:13 - 28:20
    “let’s put a chip that converts some
    protocol A to protocol B…” sighs
  • 28:20 - 28:26
    Yeah, yeah.
    applause
  • 28:26 - 28:34
    It’s a Panasonic DisplayPort to HDMI
    bridge, not documented by the way.
  • 28:34 - 28:37
    We parsed config to work, that’s why it
    doesn’t just work. Even though some bridges do.
  • 28:37 - 28:41
    And you’d think, okay, it’s hooked up to the
    GPU I2C bus, because GPUs have in the past
  • 28:41 - 28:45
    used these bridges, and, not this one
    particularly but other AMD cards have had
  • 28:45 - 28:49
    various chips that they stuck in front. And
    the code has support for talking to them
  • 28:49 - 28:54
    through the GPU I2C interface, right?
    That’s easy. Yay, you wish – it’s a Sony.
  • 28:54 - 28:58
    sighs
    Enter ICC! So, remember the ICC thing
  • 28:58 - 29:02
    in the Aeolia – it’s an RPC protocol you
    use to send commands to an MCU that is
  • 29:02 - 29:06
    somewhere else on the motherboard. It’s
    a message box system, so you write some
  • 29:06 - 29:10
    message to a memory place, and then you
    tell: “Hey, read this message!” and then
  • 29:10 - 29:12
    it writes some message back, and it tells
    you “Hey, it’s the reply!”.
  • 29:12 - 29:15
    The Aeolia – not the otherGPU – uses it for things like
  • 29:15 - 29:21
    Power Button, the LEDs, turning the power
    on and off, and also the HDMI encoder I2C.
  • 29:21 - 29:25
    So now we have the dependency from the
    GPU driver to the Aeolia driver, two different
  • 29:25 - 29:30
    PCI devices and two different… sighs
    Yeah. And okay, again, ICC, but it’s I2C,
  • 29:30 - 29:34
    you know, I2C is a simple protocol.
    You read a register, you write a register,
  • 29:34 - 29:39
    that’s all you need. It super simple.
    Right? Now let’s make a byte code
  • 29:39 - 29:41
    fucking scripting engine to which you I2C
    commands and delays and bit masking
  • 29:41 - 29:47
    and everything. And why, Sony, why, like
    why would you do this? Well, because
  • 29:47 - 29:51
    ICC is so slow? That if you actually tried
    to do one read and one write at a time
  • 29:51 - 29:56
    it takes 2 seconds to bring up HDMI.
    exhales
  • 29:56 - 29:57
    Yeah…
  • 29:57 - 30:02
    I don’t even know at this point…
    applause
  • 30:02 - 30:04
    I have no idea.
    continued applause
  • 30:04 - 30:10
    And by the way this thing has commands
    where you can send scripts in a script
  • 30:10 - 30:14
    to be run when certain events happen. So
    “Yo dawg, I heard you like scripts, I put
  • 30:14 - 30:17
    scripts in your scripts so you can I2C
    while you I2C”. Like: “let’s just go
  • 30:17 - 30:24
    even deeper at this point”, right? Yeah.
    exhales
  • 30:24 - 30:29
    Okay. We wrote some code for this,
    you need more hacks, it needs all
  • 30:29 - 30:34
    DisplayPort lanes up, Linux tries to downscale,
    doesn’t work. Memory bandwidth calculation
  • 30:34 - 30:37
    is broken. Mouse cursor size is from the
    previous GPU generation for some reason,
  • 30:37 - 30:42
    I guess they forgot to update that. So
    wait! All this crap – we get a frame buffer.
  • 30:42 - 30:47
    But X won’t start. Ah. Well, it turns out
    that PS4 uses a unified memory architecture
  • 30:47 - 30:53
    so it has a single memory pool that is
    shared between the x86 and the GPU.
  • 30:53 - 30:56
    And games just put a texture in memory
    and say: “Hey, GPU, render this!” and
  • 30:56 - 31:01
    that works great. And this makes a lot of
    sense, and their driver uses this to the
  • 31:01 - 31:06
    fullest extents. So there’s a VRAM,
    you know, the legacy… GPUs had
  • 31:06 - 31:10
    a separate VRAM and all these integrated
    chip sets can emulate VRAM using a chunk
  • 31:10 - 31:14
    of the system memory. And you can usually
    configure that in the BIOS if you have
  • 31:14 - 31:19
    a PC that does this. And PS4 sets it to
    16 MB which is actually the lowest possible
  • 31:19 - 31:25
    setting. And 16 Megs is not enough to have
    more than one Full HD frame buffer. So,
  • 31:25 - 31:29
    obviously, that’s going to explode in
    Linux pretty badly. So what we do is
  • 31:29 - 31:32
    we actually reconfigure the memory
    controller in the system to give 1 GB
  • 31:32 - 31:37
    of RAM to the VRAM, and we did it on the
    psd-kexec. So it’s basically doing like
  • 31:37 - 31:42
    BIOSy things. We were reconfiguring the
    Northbridge at this point to make this work.
  • 31:42 - 31:46
    But it works. And with this we can get X
    to start because it can allocate its frame buffer.
  • 31:46 - 31:54
    But okay, it’s 3D time, right? – Neeaah,
    GPU acceleration doesn’t quite work yet.
  • 31:54 - 31:59
    So we got at least, you know, X but let’s
    talk a bit about the Radeon GPU
  • 31:59 - 32:03
    for a second. So when you want to draw
    something on the GPU you send it a command
  • 32:03 - 32:06
    and you do this by putting it into ‘ring’
    which is really just a structure in memory,
  • 32:06 - 32:11
    that’s a (?)(?)(?)(?). And it wraps around.
    So that way you can queue things to be done
  • 32:11 - 32:16
    in the GPU, and then it does it on its own
    and you can go and do other things.
  • 32:16 - 32:20
    There’s a Graphics Ring for drawing,
    a Compute Ring for GPGPU, and a DMA Ring
  • 32:20 - 32:25
    for copying things around. The commands
    are processed by the GPU Command Processor
  • 32:25 - 32:32
    which is really a bunch of different CPUs
    inside the GPU. They are called F32.
  • 32:32 - 32:37
    And they run a proprietary AMD microcode.
    So this is a custom architecture.
  • 32:37 - 32:40
    Also the rings can call out to IBs which
    are indirect buffers. So you can say
  • 32:40 - 32:45
    basically “Call this piece of memory, do
    this stuff there, return back to the ring”.
  • 32:45 - 32:49
    And that’s actually how the user space
    thing does things. So this says:
  • 32:49 - 32:52
    “Draw this stuff” and it tells the kernel:
    “Hey, draw this stuff”. And the kernel
  • 32:52 - 32:57
    tells the GPU: “Jump to that stuff,
    read it come back, keep doing stuff”.
  • 32:57 - 33:02
    This is basically how most GPUs work but
    Radeon specifically works like, you know…
  • 33:02 - 33:07
    with this F32 stuff. Okay. The driver
    complains: “Ring 0 test failed”.
  • 33:07 - 33:11
    Technically (?), you test them, so at least
    you know it has nice diagnostic,
  • 33:11 - 33:14
    and how does the test work? It’s really
    easy. It writes a register with a value,
  • 33:14 - 33:17
    and then it tells the GPU with a command
    “Please write this other value
  • 33:17 - 33:21
    to the register”, runs it and the checks
    to see if the register was actually written
  • 33:21 - 33:29
    with the new value. So the write doesn’t
    happen. Thankfully, thanks to that RAI file
  • 33:29 - 33:32
    earlier we found some debug registers that
    tell you exactly what’s going on inside
  • 33:32 - 33:37
    the GPU. And it shows the Command
    Processor is stuck, waiting for data
  • 33:37 - 33:42
    in the ring, so it needs more data.
    After a NOP command?! Yeah…
  • 33:42 - 33:47
    NOP is hard, let’s go stalling. So packet
    headers in this GPU thing have a size
  • 33:47 - 33:52
    that is SIZE-2. Whoever thought that was
    a good idea. So a 2 word packet
  • 33:52 - 33:59
    has a size of zero. Then AMD implemented
    a 1 word packet with a size of -1.
  • 33:59 - 34:03
    And old firmware doesn’t support that and
    thinks: “Oh it’s 3FFF so I’m just gonna wait
  • 34:03 - 34:09
    for a shitload of code in the buffer”,
    right? It turns out that Hawaii,
  • 34:09 - 34:12
    which is another GPU in the same gen
    has the same problem with old firmware.
  • 34:12 - 34:15
    So they use a different NOP packet, so
    there was an exception in the driver
  • 34:15 - 34:19
    for this. And we had to add ours to that.
    But again – getting to this point, many,
  • 34:19 - 34:23
    many, many hours of headbanging.
  • 34:23 - 34:28
    Okay. We fixed that. Now it says:
    “Ring 3 test failed”.
  • 34:28 - 34:31
    That’s the SDMA ring. That’s for copying
    things in memory and it works
  • 34:31 - 34:35
    in the same way. It puts a value in RAM.
    It tells the SDMA engine: “hey, write
  • 34:35 - 34:40
    a different value”. And checks. This time
    we see the write happens but it writes “0”
  • 34:40 - 34:45
    instead if the 0xDEADBEEF or whatever.
    Okay. So I tried this.
  • 34:45 - 34:48
    I put two Write commands in the ring
    saying: “Write to one place, write to
  • 34:48 - 34:53
    a different place”. And this time,
    if I saw, what it did is it wrote “1”
  • 34:53 - 34:57
    to the first destination and “0” to the
    second destination. I’m thinking:
  • 34:57 - 35:00
    “Okay, it’s supposed to write 0xDEADBEEF…”
    which is what you see there, it’s…
  • 35:00 - 35:04
    0xDEADBEEF is that word
    with the value. It writes “1”.
  • 35:04 - 35:09
    Well, there’s a “1” there that
    wasn’t there before, it was a “0”,
  • 35:09 - 35:14
    because of this padding, right? So it
    turns out they have it off by four,
  • 35:14 - 35:18
    in the SDMA command parser
    and it reads from four words later
  • 35:18 - 35:22
    than it should.
    exhales
  • 35:22 - 35:27
    Again, this took many hours of
    headbanging. It was like:
  • 35:27 - 35:32
    “Randomly try two commands, oh, one, one?”
    – “One”.
  • 35:32 - 35:38
    So it reads four words too late but only
    in ring buffers. Indirect buffers work fine.
  • 35:38 - 35:41
    That’s good because those come from user
    space. So we don’t have to mock with those.
  • 35:41 - 35:43
    We can work around this, because it’s
    only used in two places in the kernel,
  • 35:43 - 35:48
    by using a Fill command instead of a Write
    command. That works fine. Again,…
  • 35:48 - 35:52
    how do they even make these mistakes?!
    Okay. But still the GPU doesn’t work.
  • 35:52 - 35:56
    The ring tests pass but if you tried
    to draw you get a bunch of page faults.
  • 35:56 - 35:59
    And it turns out that what happens is that
    on the PS4 you can’t write the page table
  • 35:59 - 36:06
    registers from actual commands in the GPU
    itself. You can write to them from the CPU
  • 36:06 - 36:09
    directly. You can say just: “Write memory
    – memory register write”, and then
  • 36:09 - 36:15
    I’ll write. But you can’t tell the GPU:
    “Please write to the page table register this”.
  • 36:15 - 36:19
    So the page tables don’t work, the GPU
    can’t see any memory, so everything is broken.
  • 36:19 - 36:23
    Linux uses this, FreeBSD doesn’t. It uses
    direct writes. And we think this is maybe
  • 36:23 - 36:27
    a Firewall somewhere in the Liverpool,
    some kind of security thing they added.
  • 36:27 - 36:31
    We can directly write from the CPU.
    But it like breaks the regular…
  • 36:31 - 36:35
    like it’s not asynchronous anymore. So
    this could break things. And it’s a really
  • 36:35 - 36:39
    hacky solution. I would really like to fix
    this. And I’m thinking: “Maybe the firewall
  • 36:39 - 36:43
    is in the firmware, right?”. But it’s
    proprietary and undocumented firmware.
  • 36:43 - 36:48
    So let’s look at that firmware. It’s
    a thing, it needs microcode, a CP thing.
  • 36:48 - 36:51
    It’s undocumented. But we take the blobs
    out of FreeBSD. And that’s great because
  • 36:51 - 36:57
    we have don’t have to ship them. Let’s
    dig deeper into those blobs. So how do you
  • 36:57 - 37:01
    reverse-engineer an unknown CPU
    architecture? That’s really easy,
  • 37:01 - 37:05
    run an instruction and see what it did.
    And then just keep doing that. Thankfully,
  • 37:05 - 37:08
    we upload custom firmwares, so it’s
    actually really easy to just have like
  • 37:08 - 37:10
    a two-instruction firmware that does
    something, and then writes a register
  • 37:10 - 37:14
    to a memory location. And that’s actually
    really easy to find. If you first like
  • 37:14 - 37:17
    write the memory instruction, it’s really
    easy to find in the binary because you see
  • 37:17 - 37:24
    like GPU register offsets that stand out
    a bit in one column. So long story short,
  • 37:24 - 37:28
    we wrote F32DIS which is a disassembler
    for the proprietary AMD F32 microcode.
  • 37:28 - 37:32
    I shamelessly stole the instruction
    syntax from ARM. So you may recognize
  • 37:32 - 37:35
    that if you’ve ever seen an ARM disassembly.
    And this is not complete but it can
  • 37:35 - 37:39
    disassemble every single instruction
    in all the firmware in Liverpool for PFP,
  • 37:39 - 37:43
    ME, CE, MEC and RLC which are five
    different blocks in the GPU. As far
  • 37:43 - 37:46
    as I notice that’s never been done before,
    all the firmware was like in a voodoo
  • 37:46 - 37:50
    black magic thing that’s been shipped.
    Not even the non-AMD kernel developers
  • 37:50 - 37:55
    know anything about this. So…
    applause
  • 37:55 - 37:57
    ongoing applause
  • 37:57 - 38:02
    And you can disassemble the desktop
    GPU stuff, too. So this could be good for
  • 38:02 - 38:06
    debugging strange GPU shenanigans
    in non-PS4 stuff.
  • 38:06 - 38:11
    Alright. Alas, it’s not in the firmware.
    It seems to be blocked in hardware.
  • 38:11 - 38:15
    I found a debug register that actually
    says: “there was an access violation
  • 38:15 - 38:17
    in the bus when you try to write this
    thing”. And I tried a bunch of workarounds
  • 38:17 - 38:23
    and I even bought an AMD APU system,
    desktop. Dumped all the registers,
  • 38:23 - 38:27
    diff’ed them against the one I had on Linux
    and tried setting every single value
  • 38:27 - 38:31
    from the other GPU and hoping I find some
    magic bits somewhere, but… no.
  • 38:31 - 38:35
    They probably have a setting for this,
    somewhere, but it’s a sea of ones and zeros,
  • 38:35 - 38:40
    good luck finding it. It does work with
    a CPU Write, workaround, though.
  • 38:40 - 38:44
    So, hey, at least we get 3D! And it’s
    actually pretty stable, so if there’s
  • 38:44 - 38:49
    a race condition I’m not really seeing it.
    So – checklist! What works,
  • 38:49 - 38:53
    what doesn’t work. We have interrupts,
    and timers – the core thing you need
  • 38:53 - 38:56
    to run any OS – we have a serial port,
    we can shutdown the system and reboot,
  • 38:56 - 39:00
    and you’ll think that’s funny but actually
    that goes through ICC, so again,
  • 39:00 - 39:02
    at least some interesting code there.
    I actually just implemented that about
  • 39:02 - 39:09
    four hours ago. Because pulling the plug
    was getting old. The Power button works.
  • 39:09 - 39:13
    USB works. There’s a funny story with USB
    as it used not to work. And we said:
  • 39:13 - 39:17
    “Fix it later, there seems to be special
    code missing.” And then someone
  • 39:17 - 39:20
    pulled a repo from the USB-not-working
    branch, and tested it, and said:
  • 39:20 - 39:25
    “It’s working!” It seems we fixed it by
    accident, by changing something else.
  • 39:25 - 39:29
    The hard disk works which is via the USB.
    Blu-ray works, I wrote a driver for that,
  • 39:29 - 39:32
    also four hours ago. – Three hours ago
    now? Yeah, something like that.
  • 39:32 - 39:35
    And I spent 20 minutes looking for someone
    in the Hackcenter that had a DVD I could
  • 39:35 - 39:40
    stick in to try. Apparently I’m from
    he past if I ask for DVDs.
  • 39:40 - 39:45
    But it does work. So that’s good. Wi-Fi
    and Bluetooth works.
  • 39:45 - 39:49
    Ethernet works, except only at GBit speeds.
    Frame buffer works. HDMI works.
  • 39:49 - 39:55
    It’s currently hard-coded to 1080p so…
    It does work. We can fix that
  • 39:55 - 40:01
    by improving the encoder implementation.
    3D works with the ugly register write hack.
  • 40:01 - 40:07
    And SPDIF audio works. So that’s good.
    HDMI audio doesn’t work. Mostly because
  • 40:07 - 40:10
    I only got audio grossly working, in
    general, recently, and I haven’t had
  • 40:10 - 40:15
    a chance to program the encoder to support
    the audio stuff yet. Because, again,
  • 40:15 - 40:19
    new more annoying hacks there. And the
    real-time clock doesn’t work and everything.
  • 40:19 - 40:23
    That’s simple, the clock, that device is
    simple. But ever since the PS2 the way
  • 40:23 - 40:27
    Sony has implemented real-time clocks
    is that instead of reading and writing
  • 40:27 - 40:30
    the time on the clock, which is what you
    would think is the normal thing to do,
  • 40:30 - 40:33
    they never write the time on the clock.
    Instead, they store an offset from the clock
  • 40:33 - 40:40
    to the real time, in some kind of storage
    location. And there’s a giant mess of…
  • 40:40 - 40:44
    …registry it’s called, in the PS4, and
    I don’t even know where it’s stored.
  • 40:44 - 40:47
    It might be on the hard drive, it might be
    encrypted. So basically, getting
  • 40:47 - 40:50
    the real-time clock to actually show the
    right time involves a pile of nonsense
  • 40:50 - 40:54
    that I haven’t had the chance to look at
    yet. But… we have NTP, right?
  • 40:54 - 40:59
    So it’s good enough. – Oh, and we have
    Blinkenlights! Important! The Power LED
  • 40:59 - 41:04
    does some interesting things, if you’re
    on Linux. So that’s good.
  • 41:04 - 41:11
    So – the code: you can get the ps4-kexec
    code on our Github page. That has
  • 41:11 - 41:15
    the kexec and the hardware configuration,
    and the bootloader Linux stuff.
  • 41:15 - 41:19
    You can get the ps4 Linux branch which is
    the… our fork of the kernel,
  • 41:19 - 41:23
    rebased on 4.9 which is the latest (?)
    version, I think.
  • 41:23 - 41:26
    You can get our Radeon patches which are
    three, I think, really tiny patches for
  • 41:26 - 41:30
    user space libraries just to support this
    new chip. Really simple stuff, the NOP
  • 41:30 - 41:35
    thing, and a couple of commands. And the
    RAI and F32DIS thing I mentioned.
  • 41:35 - 41:41
    You can get Radeon tools at that Github
    repo. Just push that right before the stock.
  • 41:41 - 41:44
    So if you’re interested – there you go.
    And if you going at the RAI file, well,
  • 41:44 - 41:48
    we wanna put you on a run before the guys
    at that website realize they really should
  • 41:48 - 41:53
    take that down! But I’m sure the internet
    wayback machine has it somewhere.
  • 41:53 - 42:00
    Okay! That’s everything for the story of
    how we got Linux running on the PS4.
  • 42:00 - 42:09
    And you can reach us at that website
    or fail0verflow on Twitter.
  • 42:09 - 42:14
    applause
    Thank you!
  • 42:14 - 42:18
    ongoing applause
  • 42:18 - 42:24
    I hope that wasn’t too fast, sorry, I had
    to rush through my 89 slides a little bit
  • 42:24 - 42:29
    because I really wanted to do a demo.
    I think this kind of is the demo, right.
  • 42:29 - 42:33
    But we can try something else.
    So maybe I can shut this –
  • 42:33 - 42:40
    so I can aim with my controller.
  • 42:40 - 42:44
    This is really not meant as a mouse!
    That’s not Right Button.
  • 42:44 - 42:47
    Come on! Yeah, I think it is…
  • 42:47 - 42:49
    Close? Close! Maybe…
  • 42:49 - 42:51
    So we have this little icon here.
    I wonder what happens if it works.
  • 42:51 - 42:56
    Do we have internet access? Hopefully
    Wi-Fi works, let’s then just check real quick.
  • 42:56 - 42:58
    keyboard typing sounds
  • 42:58 - 43:00
    This could bork really badly if we don’t.
  • 43:00 - 43:02
    keyboard typing sounds
  • 43:02 - 43:04
    mumbles ping 8.8.8.8
  • 43:04 - 43:06
    Yeah, we have internet access.
    So, Wi-Fi works!
  • 43:06 - 43:09
    Okay. I wonder what happens
    if we click that!
  • 43:09 - 43:15
    It takes a while to load.
    This is not optimized for…
  • 43:15 - 43:24
    laughter and applause
    marcan laughs
  • 43:24 - 43:28
    So the CPUs on this thing are
    a little bit slow. But…
  • 43:28 - 43:32
    sounds of the machine
    Hey, it works!
  • 43:32 - 43:36
    And now it’s a real game console!
  • 43:36 - 43:42
    laughter and applause
  • 43:42 - 43:49
    And this is… there we go, okay.
  • 43:49 - 43:54
    So I think we can probably take some Q&A
    because this is a little bit slow to load.
  • 43:54 - 43:57
    But we can try a game, maybe.
  • 43:57 - 44:03
    Herald: If you are for Q&A I think
    there will be some questions.
  • 44:03 - 44:07
    So shall we start with one
    from the internet.
  • 44:07 - 44:16
    Signal Angel: Hey! The internet wants to
    know if most of your research will be
  • 44:16 - 44:18
    published, or if stuff’s
    going to stay private.
  • 44:18 - 44:22
    marcan: All of this… the publishing is
    basically the code which… and you know
  • 44:22 - 44:27
    the explanation I just gave… I said that
    everything’s on Github. So all the drivers
  • 44:27 - 44:31
    we wrote, all the… I mean… and in this
    case also the spec is the code.
  • 44:31 - 44:34
    If you really want to I could write some
    Wiki pages on this. But roughly speaking,
  • 44:34 - 44:38
    what’s in the drivers is what we found
    out. The really interesting bit,
  • 44:38 - 44:44
    I think, is that F32 stuff from the AMD
    GPU stuff. And that we have a repo for.
  • 44:44 - 44:48
    But if you have any general questions, or
    name a particular device, or any details,
  • 44:48 - 44:54
    feel free to ask. I don’t know… again, it
    would be nice if we wrote a bunch
  • 44:54 - 44:57
    of docs and everything. But it’s not really
    a matter of not wanting to write them,
  • 44:57 - 45:01
    it’s lazy engineers not wanting to write
    documentation. But the code is at least…
  • 45:01 - 45:05
    the things we have on Github are fairly
    clean. So.
  • 45:05 - 45:09
    Herald: Okay, so, someone is piling up
    on 4. Guys, if you have questions
  • 45:09 - 45:12
    you see the microphones over here.
    Just pile up over there
  • 45:12 - 45:15
    and I’m gonna point… 4 please!
  • 45:15 - 45:19
    Question: Just a small question.
    How likely is it that you upstream
  • 45:19 - 45:23
    some of that stuff. Because… I mean…
  • 45:23 - 45:27
    marcan: So there’s two sides to that.
    One side is that we need to actually
  • 45:27 - 45:31
    get together and upstream it. The code…
    some of it has horrible hacks, some of it
  • 45:31 - 45:37
    isn’t too bad. So we want to upstream it.
  • 45:37 - 45:42
    We have to sit down and actually do it.
    I think most of the custom x86 based
  • 45:42 - 45:45
    machine stuff and the kernel is doable.
    The drivers are probably doable.
  • 45:45 - 45:50
    Some people might scream at the interrupt
    hacks. But it’s probably not terrible.
  • 45:50 - 45:54
    And if they have a better way of doing it
    I’m all ears, there are other kernel devs.
  • 45:54 - 46:00
    The Radeon stuff is quite fishy because of
    the encoder thing that is like (?) non-standard.
  • 46:00 - 46:04
    And also understandably
    AMD GPU driver developers
  • 46:04 - 46:07
    that work for AMD may want to have nothing
    to do with this. And in fact I know
  • 46:07 - 46:12
    for a fact that at least
    one of them doesn’t. But
  • 46:12 - 46:17
    they can’t really stop us from upstreaming
    things into the Linux kernel, right?
  • 46:17 - 46:20
    So I think as long as we get to come
    to a state where it’s doable it’s fine.
  • 46:20 - 46:23
    But most likely I think…
    laughter
  • 46:23 - 46:28
    …I think most likely the non-GPU stuff
    will go in first if we have a chance
  • 46:28 - 46:31
    to do that. And of course, if you wanna
    try upstreaming it go ahead!
  • 46:31 - 46:33
    It’s open source, right? So.
  • 46:33 - 46:35
    Herald: Over to microphone 1, please.
  • 46:35 - 46:42
    Question: Hi. First I think I should
    employ you to try and find trouble Hudson. (?)
  • 46:42 - 46:48
    And control him into using your FreeBSD
    kexec implementation in heads.
  • 46:48 - 46:55
    Instead of having to run all of Linux in it,
    as a joke. But my real question is:
  • 46:55 - 46:59
    if the reason you used Gentoo was
    because systemd was yet another hurdle
  • 46:59 - 47:01
    in getting this to run?
  • 47:01 - 47:03
    laughter
    marcan laughs
  • 47:03 - 47:06
    marcan: I run Gentoo on my main machine,
    I run Gentoo on most of the machines
  • 47:06 - 47:11
    I care about. I do run Arch on a few of
    the others and then I’d live with systemd.
  • 47:11 - 47:16
    But the reason why I run Gentoo is, first
    it’s what I like and use. And second it’s
  • 47:16 - 47:19
    super easy to use patches on Gentoo.
    You get those things we put onto Github,
  • 47:19 - 47:22
    which are just patch files, it’s not really
    a repo. Because they’re so easy
  • 47:22 - 47:25
    it’s not worth cloning everything. Just
    get those patch files, stick them on
  • 47:25 - 47:28
    /etc/portage/patches/, have a little hook to patch,
    and that’s all you need. So it’s really
  • 47:28 - 47:33
    easy to patch packages in Gentoo,
    that’s one of the main reasons.
  • 47:33 - 47:38
    laughs about something in audience
  • 47:38 - 47:40
    Herald: No. 3 please!
  • 47:40 - 47:44
    Question: Will there be new exploits,
    new way to boot Linux
  • 47:44 - 47:48
    on PS3 with modern firmwares
    because finding one
  • 47:48 - 47:51
    with firmware 1.76 is really rare.
  • 47:51 - 47:52
    marcan: That was 4.05!
  • 47:52 - 47:58
    Question: Ah, okay.
    marcan: But again, our goal is to focus
  • 47:58 - 48:01
    on… I just told you the story of the
    pre-exploit thing because I think
  • 48:01 - 48:05
    that’s good like a hacker story, a good
    knowledge suite trying new platforms.
  • 48:05 - 48:08
    And the Linux thing we’re working on.
    The reason why we don’t want to publish
  • 48:08 - 48:12
    the exploit or really get involved in the
    whole exploit scene is that there is
  • 48:12 - 48:17
    a lot of drama, it’s not rocket science
    in that it’s like super custom code,
  • 48:17 - 48:21
    this is WebKit and FreeBSD. It’s actually not
    that hard. And we know for a fact
  • 48:21 - 48:26
    that several people have reproduced this
    on various firmwares. So there’s no need
  • 48:26 - 48:30
    for us to be the exploit provider. And
    we don’t want to get into that because
  • 48:30 - 48:37
    it’s a giant drama fest as we all know,
    anyway. Please DIY it this time!
  • 48:37 - 48:39
    Question: Okay. Thanks.
  • 48:39 - 48:41
    Herald: And what is the internet saying?
  • 48:41 - 48:46
    Signal Angel: The internet wants to know
    if you ever had fun with the BSD
  • 48:46 - 48:48
    on the second processor.
  • 48:48 - 48:52
    marcan: Oh, that’s a very good question.
    I myself haven’t. I don’t know if anyone
  • 48:52 - 48:56
    else has looked at it briefly. One of the
    commands for rebooting will boot
  • 48:56 - 49:01
    that CPU into FreeBSD. And there’s
    probably fun to be had there.
  • 49:01 - 49:04
    But we haven’t really looked into it.
  • 49:04 - 49:07
    Herald: And over to 5, please.
  • 49:07 - 49:13
    Question: I was wondering if any of that
    stuff was applicable to the PS4 VR edition
  • 49:13 - 49:19
    or whatever it’s called, the new one?
    Did you ever test it?
  • 49:19 - 49:20
    marcan: Sorry, say it again!
  • 49:20 - 49:22
    Question: Sony brought up a new PS4
    I thought.
  • 49:22 - 49:24
    marcan: Oh, the Pro you mean,
    the PS4 Pro?
  • 49:24 - 49:27
    Question: Yes.
    marcan: So Linux boots on the Pro,
  • 49:27 - 49:30
    we got that far. GPU is broken. So we
    would like to get this ported to the Pro
  • 49:30 - 49:34
    and also working. It’s basically an
    incremental update, so it’s not that hard,
  • 49:34 - 49:37
    but the GPU needs a new definition,
    new jBullet(?) stuff.
  • 49:37 - 49:41
    Yeah, you get a lot of C frames
    down-burned (?), yeah…
  • 49:41 - 49:45
    So, as you can see, 3D works,
    and, there you go!
  • 49:45 - 49:52
    synth speech from game
    applause
  • 49:52 - 49:56
    I only have to look up and down in this game!
  • 49:56 - 49:58
    continued synth speech from game
  • 49:58 - 50:01
    Herald: Well, then number 3, please.
  • 50:01 - 50:08
    Question: I want to ask you if you want to
    port these Radeon patches to the new
  • 50:08 - 50:16
    amdgpu driver because AMD now supports
    the Southern Island GPUs?
  • 50:16 - 50:19
    marcan: Yes, that’s a very good question.
    Actually, the first attempt we made
  • 50:19 - 50:23
    at writing this driver was with amdgpu.
    And at the time it wasn’t working at all.
  • 50:23 - 50:27
    And there was a big concern about its
    freshness at the time and it was
  • 50:27 - 50:31
    experimentally supporting this GPU
    generation. I’m told it should work.
  • 50:31 - 50:36
    So I would like to port this… move to
    amdgpu and we have a working
  • 50:36 - 50:39
    implementation, and we got to clean up
    code much better, we know where all
  • 50:39 - 50:42
    the nits are, I want to try again with
    amdgpu and see if that works.
  • 50:42 - 50:47
    That’s a very good question because the
    newer gen might require the driver maybe, so …
  • 50:47 - 50:49
    Question: Thank you.
    Herald: Well then I’m gonna guess we ask
  • 50:49 - 50:50
    the internet again.
  • 50:50 - 50:56
    Signal Angel: Okay, the internet states
    that about a year ago you argued
  • 50:56 - 51:02
    with someone on twitter that the PS4 wasn’t
    a PC and now you’re saying that kind of
  • 51:02 - 51:05
    is something. And what’s about that?
  • 51:05 - 51:11
    marcan: So again, the reason of saying
    it’s not a PC is that it’s not an IBM
  • 51:11 - 51:17
    Personal Computer compatible device.
    It’s an x86 device that happens to
  • 51:17 - 51:20
    be structured roughly like a current PC
    but if you look at the details
  • 51:20 - 51:24
    so many things are completely different.
    It really isn’t a PC. Like on Linux I had
  • 51:24 - 51:30
    to define “sub arch PS4”. It’s an x86
    but it’s not a PC. And that’s actually
  • 51:30 - 51:33
    a very important distinction because
    there’s a lot of things you have
  • 51:33 - 51:36
    never heard of that are x86 but not PC.
    It’s like e.g. there’s a high chance
  • 51:36 - 51:40
    your monitor at home has
    an 8186 CPU in it. So, yeah.
  • 51:40 - 51:45
    Herald: So nobody’s piling at the
    microphones any more.
  • 51:45 - 51:47
    Is there one last question
    from the internet?
  • 51:47 - 51:51
    Signal Angel: Yes, there is.
  • 51:51 - 51:54
    The question is…
  • 51:54 - 52:00
    …if there was any
    decryption needed.
  • 52:00 - 52:06
    marcan: No. So this is purely… you
    exploit WebKit, you get user mode,
  • 52:06 - 52:09
    you exploit the kernel, you got kernel
    mode. You jump Linux…
  • 52:09 - 52:12
    there’s no security like… there’s nothing
    like stopping you from doing
  • 52:12 - 52:15
    all that stuff. There’s a sand box in
    FreeBSD but obviously you exploit
  • 52:15 - 52:21
    around the sand box. There’s nothing…
    there’s no hypervisor, there’s no monitoring,
  • 52:21 - 52:25
    there’s nothing like saying: “Oh this code
    should not be running.” There’s no
  • 52:25 - 52:29
    like integrity checking. They have a security
    architecture but as it’s tradition for Sony
  • 52:29 - 52:35
    you can just walk around it.
    laughter
  • 52:35 - 52:38
    applause
  • 52:38 - 52:43
    The PS3 was notable for the fact that
    the PS Jailbreak which is a USB…
  • 52:43 - 52:47
    it’s effectively a piracy device
    that was released by someone
  • 52:47 - 52:52
    that basically used a USB exploit
    in the kernel and only a USB exploit
  • 52:52 - 52:55
    in the kernel to effectively enable piracy.
    So when you have like a stack of security
  • 52:55 - 52:58
    and you break one thing and you get
    piracy that’s a fail! This is basically
  • 52:58 - 53:02
    the same idea. Except I have no idea what
    you do to do piracy and I don’t care.
  • 53:02 - 53:10
    But Sony doesn’t really know how to
    architecture secure systems.
  • 53:10 - 53:12
    That’s it.
  • 53:12 - 53:15
    Herald: That’s it, here we go,
    that’s your applause!
  • 53:15 - 53:20
    applause
  • 53:20 - 53:22
    postroll music
  • 53:22 - 53:32
    subtitles created by c3subtitles.de
    in the year 2017. Join, and help us!
Title:
Console Hacking 2016 (33c3)
Description:

more » « less
Video Language:
English
Duration:
53:43

English subtitles

Revisions