Squirre17 / Autokd

automate kernel exploit environment deploy
1 stars 0 forks source link

add some kernel exploit template/snippet #6

Closed Squirre17 closed 1 year ago

Squirre17 commented 1 year ago

like something

static void save_state() {
  asm(
      "movq %%cs, %0\n"
      "movq %%ss, %1\n"
      "movq %%rsp, %2\n"
      "pushfq\n"
      "popq %3\n"
      : "=r"(user_cs), "=r"(user_ss), "=r"(user_rsp), "=r"(user_rflags)
      :
      : "memory");
}