Work in progress: 82,651 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #6417

R

repz ret

Personal blog · repzret.orgprogrammingsecurity

repz ret is a personal blog at repzret.org about programming and security. Since 2012, 12 different Hacker News readers have linked it 14 times, most often “Why do RET instructions have a REPZ prepended on x86?”. It has a working feed you can follow.

Visit the blog
14mentions?
12HN people?
2012–2026first – last linked?
Links on Hacker News per year · peak 5 in 2023

Most-linked posts?

  1. Why do RET instructions have a REPZ prepended on x86?
    5 people · 5 mentions · first linked 2013-08-26
  2. repz ret
    4 people · 4 mentions · first linked 2023-11-14
  3. The rep prefix and detecting Valgrind (2012)
    2 people · 3 mentions · first linked 2021-09-21

What Hacker News says?

  1. ...so it only took them over three decades to realise the power of REP MOVS/STOS? ;-) On x86, it's been there since the 8086, and can do cacheline-sized pieces at a time on the newer CPUs. This behaviour is detectable in certain edge-cases: https://repzret.org/p/rep-prefix-and-detecting-valgrind/

    Comment linking /p/rep-prefix-and-detecting-valgrind/

    on “Arm AArch64 Adds Memcpy() Instructions”
  2. Submitted Why do RET instructions have a REPZ prepended on x86? as a story · 174 points

    HN discussion
  3. The solution is that a string instruction can be interrupted in the middle of the instruction, unlike most instructions. This is true even for later x86 processors that move entire cachelines at a time, and also leads to one sneaky technique for detection of VMs or being debugged/emulated: https://repzret.org/p/rep-prefix-and-detecting-valgrind/ https://silviocesare.wordpress.com/2009/02/02/anti-debugging...

    Comment linking /p/rep-prefix-and-detecting-valgrind/

    on “The microcode and hardware in the 8086 processor that perform string operations”
  4. Submitted The rep prefix and detecting valgrind (2012) as a story · 16 points

    HN discussion
  5. tedunangst down in the comments linked https://repzret.org/p/repzret/ : "Looking in the old AMD optimisation guide for the then-current K8 processor microarchitecture (the first implementation of 64bit x86!), there is effectively mention of a “Two-Byte Near-Return ret Instruction”. The text goes on to explain in advice 6.2 that “A two-byte ret has a rep instruction inserted before the ret, which produces the functio…

    Comment linking /p/repzret/

    on “Reptar”
  6. Submitted Repz ret as a story · 3 points

    HN discussion
  7. Their diagnosis reminds me of what happened when qemu ran into repz ret. https://repzret.org/p/repzret/

    Comment linking /p/repzret/

    on “Reptar”
  8. Submitted repz ret as a story · 2 points

    HN discussion
  9. See http://repzret.org/p/repzret/

    Comment linking /p/repzret/

    on “Google researchers discover 'Reptar', a new CPU vulnerability”
  10. Submitted repz ret as a story · 2 points

    HN discussion
  11. Submitted repz ret (2012) as a story · 1 points

    HN discussion
  12. Submitted The rep prefix and detecting Valgrind (2012) as a story · 1 points

    HN discussion
  13. Submitted Repz ret as a story · 1 points

    HN discussion
  14. Submitted Detecting valgrind as a story · 1 points

    HN discussion

Search all of HN for repzret.org

Linked by the same people?