tags 415738 +patch
thanks
Thiemo Seufer wrote:
> The same happens on big endian mips. Running the benchmark manually (on
> a bcm1480) has a ~90% chance to succeed. Sometimes it fails due to a
> division-by-zero error in benchmark_cps, the second argument "time"
> is occasionally zero.
>
> AFAICS possible workarounds are:
> - define OS_TIMER for all linux platforms
> - make the benchmark loop run longer
I took the first approach, for mips/mipsel only. Successfully test-built
on mips/sid.
Thiemo
diff -urpN john-1.6.orig/src/Makefile john-1.6/src/Makefile
--- john-1.6.orig/src/Makefile 2000-04-01 11:21:43.000000000 +0100
+++ john-1.6/src/Makefile 2007-06-18 16:25:19.000000000 +0100
@@ -86,6 +86,8 @@ default:
@echo "linux-x86-any-a.out Linux, x86, a.out binaries"
@echo "linux-alpha Linux, Alpha"
@echo "linux-sparc Linux, SPARC"
+ @echo "linux-mips Linux, MIPS"
+ @echo "linux-mipsel Linux, MIPSel"
@echo "freebsd-x86-any-a.out FreeBSD, x86, a.out binaries"
@echo "freebsd-x86-k6-a.out FreeBSD, AMD K6, a.out binaries"
@echo "freebsd-x86-any-elf FreeBSD, x86, ELF binaries"
@@ -156,11 +158,16 @@ use-linux-sparc:
BENCH_DES_OBJS_DEPEND="$(BENCH_DES_OBJS_ORIG) sparc.o" \
JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS_ORIG) sparc.o"
+linux-mips: mips.h
+ $(LN) mips.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)"
+
+linux-mipsel: mipsel.h
+ $(LN) mipsel.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)"
+
freebsd-x86-any-a.out:
$(LN) x86-any.h arch.h
$(MAKE) $(PROJ) \
diff -urpN john-1.6.orig/src/mips.h john-1.6/src/mips.h
--- john-1.6.orig/src/mips.h 1970-01-01 01:00:00.000000000 +0100
+++ john-1.6/src/mips.h 2007-06-18 16:22:16.000000000 +0100
@@ -0,0 +1,43 @@
+/*
+ * This file is part of John the Ripper password cracker,
+ * Copyright (c) 1996-98 by Solar Designer
+ */
+
+/*
+ * Architecture specific parameters for big-endian MIPS.
+ */
+
+#ifndef _JOHN_ARCH_H
+#define _JOHN_ARCH_H
+
+#define ARCH_GENERIC 1
+#define ARCH_WORD long
+#define ARCH_SIZE 4
+#define ARCH_BITS 32
+#define ARCH_BITS_STR "32"
+#define ARCH_LITTLE_ENDIAN 0
+#define ARCH_INT_GT_32 0
+#define ARCH_ALLOWS_UNALIGNED 0
+#define ARCH_INDEX unsigned int
+
+#define OS_TIMER 1
+#define OS_FLOCK 1
+
+#define CPU_DETECT 0
+
+#define DES_ASM 0
+#define DES_128K 0
+#define DES_X2 0
+#define DES_MASK 0
+#define DES_SCALE 1
+#define DES_EXTB 0
+#define DES_COPY 1
+#define DES_BS 0
+
+#define MD5_ASM 0
+#define MD5_IMM 0
+
+#define BF_ASM 0
+#define BF_SCALE 0
+
+#endif
diff -urpN john-1.6.orig/src/mipsel.h john-1.6/src/mipsel.h
--- john-1.6.orig/src/mipsel.h 1970-01-01 01:00:00.000000000 +0100
+++ john-1.6/src/mipsel.h 2007-06-18 16:24:14.000000000 +0100
@@ -0,0 +1,43 @@
+/*
+ * This file is part of John the Ripper password cracker,
+ * Copyright (c) 1996-98 by Solar Designer
+ */
+
+/*
+ * Architecture specific parameters for little-endian MIPS.
+ */
+
+#ifndef _JOHN_ARCH_H
+#define _JOHN_ARCH_H
+
+#define ARCH_GENERIC 1
+#define ARCH_WORD long
+#define ARCH_SIZE 4
+#define ARCH_BITS 32
+#define ARCH_BITS_STR "32"
+#define ARCH_LITTLE_ENDIAN 1
+#define ARCH_INT_GT_32 0
+#define ARCH_ALLOWS_UNALIGNED 0
+#define ARCH_INDEX unsigned int
+
+#define OS_TIMER 1
+#define OS_FLOCK 1
+
+#define CPU_DETECT 0
+
+#define DES_ASM 0
+#define DES_128K 0
+#define DES_X2 0
+#define DES_MASK 0
+#define DES_SCALE 1
+#define DES_EXTB 0
+#define DES_COPY 1
+#define DES_BS 0
+
+#define MD5_ASM 0
+#define MD5_IMM 0
+
+#define BF_ASM 0
+#define BF_SCALE 0
+
+#endif
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]