Created attachment 357770 [details] build.log I know we have been through this before, but can someone please give me a hand fixing this? I've been all over the build system and I can't figure out what is wrong here
Created attachment 357778 [details, diff] 0001-aircrack-ptw-lib.c-get-rid-of-textrel-in-rc4test_amd.patch Fixes textrel in assembler bit. As described in https://wiki.gentoo.org/wiki/Project:Hardened/HOWTO_locate_and_fix_textrels ("How to make gcc worry about it") I hope I didn cont parameter count right and dereferenced source args proper amount of times. So, please test if it works. Thanks!
ozzie aircrack-ng # make make -C src all make[1]: Entering directory `/usr/src/aircrack-ng/src' gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=2333 -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o aircrack-ng.o aircrack-ng.c gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=2333 -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o crypto.o crypto.c gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=2333 -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o common.o common.c gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=2333 -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o uniqueiv.o uniqueiv.c gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=2333 -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o aircrack-ptw-lib.o aircrack-ptw-lib.c aircrack-ptw-lib.c: In function ‘rc4test_amd64_sse2’: aircrack-ptw-lib.c:260:8: error: memory input 9 is not directly addressable aircrack-ptw-lib.c:260:20: error: memory input 10 is not directly addressable make[1]: *** [aircrack-ptw-lib.o] Error 1 make[1]: Leaving directory `/usr/src/aircrack-ng/src' make: *** [all] Error 2 looks to me like this patch doesn't quite hit the mark.
Created attachment 359730 [details, diff] try-2.patch Added direct memory reference. objdump -S -d -r aircrack-ptw-lib.o Before the patch it was immediate encoding: 81: 66 0f 6f 04 25 00 00 movdqa 0x0,%xmm0 88: 00 00 86: R_X86_64_32S .rodata+0x10 8a: 66 0f 6f 0c 25 00 00 movdqa 0x0,%xmm1 91: 00 00 8f: R_X86_64_32S .rodata gcc inferences RIP-relative addressing both on hardened and on vanilla: f5: 66 0f 6f 05 00 00 00 movdqa 0x0(%rip),%xmm0 # fd <compare+0xfd> fc: 00 f9: R_X86_64_PC32 .rodata+0xc fd: 66 0f 6f 0d 00 00 00 movdqa 0x0(%rip),%xmm1 # 105 <compare+0x105> 104: 00 101: R_X86_64_PC32 .rodata-0x4 In theory it's even one byte shorter encoding (but a bit more complex) than before.
(In reply to Sergei Trofimovich from comment #3) > Created attachment 359730 [details, diff] [details, diff] > try-2.patch This patch seems to work, thanks slyfox, I'll float it by upstream.
https://travis-ci.org/aircrack-ng/aircrack-ng/builds/12154259 Thanks slyfox, you are the man.