raphaelsc / Am-I-affected-by-Meltdown

Meltdown Exploit / Proof-of-concept / checks whether system is affected by Variant 3: rogue data cache load (CVE-2017-5754), a.k.a MELTDOWN.
https://meltdownattack.com/
BSD 2-Clause "Simplified" License
542 stars 71 forks source link

Use x86_64 instructions for targetting 64-bit CPUs #22

Open rilysh opened 1 year ago

rilysh commented 1 year ago

Hello, In xbegin and xend functions, this program uses some older i386 instructions. For a proper x64-based CPU, if there's an alternative implementation won't it be better to use them instead? For example, if we define the architecture (e.g. 64-bit) then run 64-bit instruction otherwise fallback to i386 one.

Refers

https://github.com/raphaelsc/Am-I-affected-by-Meltdown/blob/b6f80766da112e3fa09e8c4f73a82f7451f9c8f7/assembly_utils.hh#L49 https://github.com/raphaelsc/Am-I-affected-by-Meltdown/blob/b6f80766da112e3fa09e8c4f73a82f7451f9c8f7/assembly_utils.hh#L55