• Jane@lemmy.world
    link
    fedilink
    English
    arrow-up
    29
    ·
    1 year ago

    How come branch prediction seems so vulnerable to exploits? Both spectre and meltdown were also caused by branch prediction not working quite right.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 year ago

      The more steps in the instruction pipeline the more ways there are for there to be an error where some result doesn’t get erased when undoing stuff from the wrong branch. It’s basically like telling someone to move into a new house and get settled then stopping them six hours in and trying to make sure you get all their stuff out.