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

Compile error #1

Closed technion closed 6 years ago

technion commented 6 years ago

Hi,

Thanks for this tool. Unfortunately I can't make it compile. Can you advise on below?

$ cat /etc/os-release
NAME="Arch Linux"
..

$ uname -a
Linux linodeplz 4.14.8-1-ec2 #1 SMP Wed Dec 20 23:21:01 PST 2017 x86_64 GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ...
Thread model: posix
gcc version 7.2.1 20171021 (GCC)
$ make
g++ -I. --std=c++11 -O0 --no-pie -mrtm -c -o meltdown_checker.o meltdown_checker.cc
g++ -I. --std=c++11 -O0 --no-pie -mrtm -o meltdown-checker meltdown_checker.o
/usr/bin/ld: meltdown_checker.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: meltdown-checker] Error 1
raphaelsc commented 6 years ago

@technion add -fPIC to CFLAGS in Makefile, if and only if it doesn't work, replace --no-pie by -fPIC. Please tell me if it works.

technion commented 6 years ago

Thanks, can confirm that fixes it.

raphaelsc commented 6 years ago

@technion just adding -fPIC to CFLAGS? I'll add it to for everyone, if it helps

technion commented 6 years ago

@raphaelsc Yes I just added it, and did not change or remove anything else.

raphaelsc commented 6 years ago

@technion thanks a lot. did it work to you?

technion commented 6 years ago

Actually I'm just seeing this

$ ./meltdown-checker
Your cpu doesn't support TSX (Transactional Synchronization Extensions)
Check https://software.intel.com/en-us/node/524022 for details;
Aborted (core dumped)

But I planning on determining if this is expected in a VM (AWS) before raising it.

raphaelsc commented 6 years ago

On Fri, Jan 5, 2018 at 2:10 AM, technion notifications@github.com wrote:

Actually I'm just seeing this

$ ./meltdown-checker Your cpu doesn't support TSX (Transactional Synchronization Extensions) Check https://software.intel.com/en-us/node/524022 for details; Aborted (core dumped)

But I planning on determining if this is expected in a VM (AWS) before raising it.

I'll work on a workaround for it. Right now, meltdown-checker is indeed limited to cpus that support TSX. Feel free to open an issue for it so you'll know once it's fixed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/raphaelsc/Am-I-affected-by-Meltdown/issues/1#issuecomment-355468619, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWAcye1t3HEo3kGShYSVT3T0GAZn0nRks5tHaCcgaJpZM4RT_j5 .

raphaelsc commented 6 years ago

@technion it now supports cpu that doesn't support TSX