Page MenuHomeFreeBSD

D7824.id30303.diff
No OneTemporary

D7824.id30303.diff

Index: lib/libmd/Makefile
===================================================================
--- lib/libmd/Makefile
+++ lib/libmd/Makefile
@@ -88,6 +88,8 @@
CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2
CFLAGS+= -I${SRCTOP}/sys/crypto/skein
CFLAGS+= -DWEAK_REFS
+# unroll the 256 and 512 loops, half unroll the 1024
+CFLAGS+= -DSKEIN_LOOP=995
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2
.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
@@ -101,6 +103,8 @@
.endif
.if exists(${MACHINE_ARCH}/skein_block_asm.s)
AFLAGS += --strip-local-absolute
+# Fully unroll all loops in the assembly optimized version
+AFLAGS+= --defsym SKEIN_LOOP=0
SRCS+= skein_block_asm.s
CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
.endif
Index: sys/modules/crypto/Makefile
===================================================================
--- sys/modules/crypto/Makefile
+++ sys/modules/crypto/Makefile
@@ -19,11 +19,15 @@
SRCS += des_ecb.c des_enc.c des_setkey.c
SRCS += sha1.c sha256c.c sha512c.c
SRCS += skein.c skein_block.c
+# unroll the 256 and 512 loops, half unroll the 1024
+CFLAGS+= -DSKEIN_LOOP=995
.if exists(${MACHINE_ARCH}/skein_block_asm.s)
.PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
SRCS += skein_block_asm.s
CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
ACFLAGS += -DELF -Wa,--noexecstack
+# Fully unroll all loops in the assembly optimized version
+AFLAGS+= --defsym SKEIN_LOOP=0
.endif
SRCS += siphash.c
SRCS += gmac.c gfmult.c

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 8, 7:04 PM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38531772
Default Alt Text
D7824.id30303.diff (1 KB)

Event Timeline