summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--build.vars2
-rw-r--r--john-1.8.0.local.patch160
2 files changed, 81 insertions, 81 deletions
diff --git a/build.vars b/build.vars
index 4e06abf7..85209943 100644
--- a/build.vars
+++ b/build.vars
@@ -435,7 +435,7 @@ PKG_LVL3_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}";
: ${PKG_JOHN_URL:=http://www.openwall.com/john/j/john-${PKG_JOHN_VERSION}.tar.xz};
: ${PKG_JOHN_BUILD_DIR:=john-${PKG_JOHN_VERSION}};
: ${PKG_JOHN_INSTALL_FILES:="run/john=bin/ run/mailer=bin/ run/makechr=bin/ run/relbench=bin/ run/unafs=bin/ run/unique=bin/ run/unshadow=bin/ /=share/john run/ascii.chr=share/john/ run/digits.chr=share/john/ run/john.conf=share/john/ run/lm_ascii.chr=share/john/ run/password.lst=share/john/"};
-: ${PKG_JOHN_MAKEFLAGS_BUILD_EXTRA:="-C src midipix-x86_64"};
+: ${PKG_JOHN_MAKEFLAGS_BUILD_EXTRA:="-C src midipix-x86-64"};
: ${PKG_JOHN_MAKEFLAGS_INSTALL_EXTRA:="-C src"};
: ${PKG_JOHN_NO_MAKE_INSTALL:=1};
: ${PKG_JOHN_SUBDIR:=john-${PKG_JOHN_VERSION}};
diff --git a/john-1.8.0.local.patch b/john-1.8.0.local.patch
index 9ac6faa9..8ffcc91c 100644
--- a/john-1.8.0.local.patch
+++ b/john-1.8.0.local.patch
@@ -1,101 +1,101 @@
---- john-1.8.0/src/Makefile.orig 2013-05-29 23:21:25.000000000 +0000
-+++ john-1.8.0/src/Makefile 2016-07-21 16:18:58.367574437 +0000
+diff -ru a/src/DES_bs.c b/src/DES_bs.c
+--- a/src/DES_bs.c 2012-07-14 09:36:44.000000000 -0400
++++ b/src/DES_bs.c 2016-08-07 15:08:48.011369100 -0400
+@@ -52,7 +52,7 @@
+ };
+
+ #if DES_BS_ASM
+-extern void DES_bs_init_asm(void);
++extern void DES_INTERNAL_CALL DES_bs_init_asm(void);
+ #endif
+
+ void DES_bs_init(int LM, int cpt)
+diff -ru a/src/DES_bs.h b/src/DES_bs.h
+--- a/src/DES_bs.h 2013-05-06 02:19:49.000000000 -0400
++++ b/src/DES_bs.h 2016-08-07 15:09:17.512056400 -0400
+@@ -35,6 +35,16 @@
+ #define DES_bs_vector ARCH_WORD
+ #endif
+
++#ifndef HAVE_INTERNAL_ATTR
++#define HAVE_INTERNAL_ATTR 0
++#endif
++
++#if HAVE_INTERNAL_ATTR
++#define DES_INTERNAL_CALL __attribute__((visibility("internal")))
++#else
++#define DES_INTERNAL_CALL
++#endif
++
+ /*
+ * All bitslice DES parameters combined into one struct for more efficient
+ * cache usage. Don't re-order unless you know what you're doing, as there
+@@ -112,7 +122,7 @@
+ #else
+ #define DES_bs_mt 0
+ #define DES_bs_cpt 1
+-extern DES_bs_combined DES_bs_all;
++extern DES_INTERNAL_CALL DES_bs_combined DES_bs_all;
+ #define for_each_t(n)
+ #define init_t()
+ #endif
+@@ -120,7 +130,7 @@
+ /*
+ * Initializes the internal structures.
+ */
+-extern void DES_bs_init(int LM, int cpt);
++extern void DES_INTERNAL_CALL DES_bs_init(int LM, int cpt);
+
+ /*
+ * Sets a salt for DES_bs_crypt().
+@@ -139,12 +149,12 @@
+ /*
+ * Almost generic implementation: 24-bit salts, variable iteration count.
+ */
+-extern void DES_bs_crypt(int count, int keys_count);
++extern void DES_INTERNAL_CALL DES_bs_crypt(int count, int keys_count);
+
+ /*
+ * A simplified special-case implementation: 12-bit salts, 25 iterations.
+ */
+-extern void DES_bs_crypt_25(int keys_count);
++extern void DES_INTERNAL_CALL DES_bs_crypt_25(int keys_count);
+
+ /*
+ * Another special-case version: a non-zero IV, no salts, no iterations.
+diff -ru a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2013-05-29 19:21:25.000000000 -0400
++++ b/src/Makefile 2016-08-07 16:23:07.246422700 -0400
@@ -104,6 +104,8 @@
# @echo "linux-ppc64-altivec Linux, PowerPC 64-bit w/AltiVec"
@echo "linux-ppc64 Linux, PowerPC 64-bit"
@echo "linux-ia64 Linux, IA-64"
-+ @echo "midipix-x86_64 Midipix, x86-64 with SSE2 (most common)"
-+ @echo "midipix-x86-sse2 Linux, x86 32-bit with SSE2 (most common, if 32-bit)"
++ @echo "midipix-x86-64-avx Midipix, x86-64 with AVX (2011+ Intel CPUs)"
++ @echo "midipix-x86-64 Midipix, x86-64 with SSE2 (most common)"
@echo "freebsd-x86-64 FreeBSD, x86-64 with SSE2 (best)"
@echo "freebsd-x86-sse2 FreeBSD, x86 with SSE2 (best if 32-bit)"
@echo "freebsd-x86-mmx FreeBSD, x86 with MMX"
-@@ -306,6 +308,20 @@
+@@ -306,6 +308,22 @@
CFLAGS="$(CFLAGS) -DHAVE_CRYPT" \
LDFLAGS="$(LDFLAGS) -lcrypt"
-+midipix-x86_64:
++midipix-x86-64-avx:
+ $(LN) x86-64.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT" \
++ CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT" \
++ CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -DHAVE_INTERNAL_ATTR" \
++ ASFLAGS="$(ASFLAGS) -mavx" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
-+midipix-x86-sse2:
-+ $(LN) x86-sse.h arch.h
++midipix-x86-64:
++ $(LN) x86-64.h arch.h
+ $(MAKE) $(PROJ) \
-+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT" \
++ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
++ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -DHAVE_INTERNAL_ATTR" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
freebsd-x86-64:
$(LN) x86-64.h arch.h
$(MAKE) $(PROJ) \
---- john-1.8.0/src/x86-64.S.orig 2012-07-21 13:08:57.000000000 +0000
-+++ john-1.8.0/src/x86-64.S 2016-07-21 16:21:38.808119794 +0000
-@@ -59,9 +59,9 @@
- .bss
- #endif
-
--.globl DES_bs_all
-+.globl __imp_DES_bs_all
- DO_ALIGN(6)
--DES_bs_all:
-+__imp_DES_bs_all:
- DES_bs_all_KSp:
- DO_SPACE(nptr(0x300))
- DES_bs_all_KS_p:
-@@ -964,8 +964,8 @@
- .text
-
- DO_ALIGN(6)
--.globl DES_bs_init_asm
--DES_bs_init_asm:
-+.globl __imp_DES_bs_init_asm
-+__imp_DES_bs_init_asm:
- pcmpeqd %xmm0,%xmm0
- movdqa %xmm0,pnot
- paddb %xmm0,%xmm0
-@@ -991,8 +991,8 @@
- #define rounds_and_swapped %eax
-
- DO_ALIGN(6)
--.globl DES_bs_crypt
--DES_bs_crypt:
-+.globl __imp_DES_bs_crypt
-+__imp_DES_bs_crypt:
- cmpl $0,DES_bs_all_keys_changed(%rip)
- jz DES_bs_crypt_body
- pushq %rdi
-@@ -1055,8 +1055,8 @@
- ret
-
- DO_ALIGN(6)
--.globl DES_bs_crypt_25
--DES_bs_crypt_25:
-+.globl __imp_DES_bs_crypt_25
-+__imp_DES_bs_crypt_25:
- cmpl $0,DES_bs_all_keys_changed(%rip)
- jnz DES_bs_finalize_keys_25
- DES_bs_crypt_25_body:
-@@ -1175,8 +1175,8 @@
- #define rounds %eax
-
- DO_ALIGN(6)
--.globl DES_bs_crypt_LM
--DES_bs_crypt_LM:
-+.globl __imp_DES_bs_crypt_LM
-+__imp_DES_bs_crypt_LM:
- movl (%rdi),%r8d
- movdqa mask01,%xmm7
- movdqa mask02,%xmm8
-@@ -1350,8 +1350,8 @@
- #ifdef UNDERSCORES
- #define CPU_detect _CPU_detect
- #endif
--.globl CPU_detect
--CPU_detect:
-+.globl __imp_CPU_detect
-+__imp_CPU_detect:
- pushq %rbx
- movl $1,%eax
- cpuid
+