[Pkg-loop-aes-commits] r1396 - in /upstream/loop-aes/current: ChangeLog Makefile README build-initrd.sh dkms.conf gnupg-1.4.6.diff gnupg-1.4.7.diff kernel-2.6.20.diff kernel-2.6.21.diff loop.c-2.6.patched loop_blowfish.c loop_serpent.c loop_twofish.c
xam at users.alioth.debian.org
xam at users.alioth.debian.org
Thu May 17 13:32:14 UTC 2007
Author: xam
Date: Thu May 17 13:32:14 2007
New Revision: 1396
URL: http://svn.debian.org/wsvn/pkg-loop-aes/?sc=1&rev=1396
Log:
Import loop-AES v3.2a
Added:
upstream/loop-aes/current/gnupg-1.4.7.diff
- copied, changed from r1373, upstream/loop-aes/current/gnupg-1.4.6.diff
upstream/loop-aes/current/kernel-2.6.21.diff
- copied, changed from r1373, upstream/loop-aes/current/kernel-2.6.20.diff
upstream/loop-aes/current/loop_blowfish.c
- copied unchanged from r1280, upstream/ciphers/current/loop_blowfish.c
upstream/loop-aes/current/loop_serpent.c
- copied unchanged from r1280, upstream/ciphers/current/loop_serpent.c
upstream/loop-aes/current/loop_twofish.c
- copied unchanged from r1280, upstream/ciphers/current/loop_twofish.c
Removed:
upstream/loop-aes/current/gnupg-1.4.6.diff
upstream/loop-aes/current/kernel-2.6.20.diff
Modified:
upstream/loop-aes/current/ChangeLog
upstream/loop-aes/current/Makefile
upstream/loop-aes/current/README
upstream/loop-aes/current/build-initrd.sh
upstream/loop-aes/current/dkms.conf
upstream/loop-aes/current/loop.c-2.6.patched
Modified: upstream/loop-aes/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/ChangeLog?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/ChangeLog (original)
+++ upstream/loop-aes/current/ChangeLog Thu May 17 13:32:14 2007
@@ -499,3 +499,10 @@
- Added "cleartextkey=file" mount option to mount, and "-P file" command
line option to losetup. These options help automounters.
- Added loop-aes-keygen script from Max Vozeler.
+
+loop-AES-v3.2a May 15 2007
+ - loop_twofish.c loop_serpent.c loop_blowfish.c modules included. They
+ are not built by default. Add EXTRA_CIPHERS=y make parameter to build
+ them.
+ - Makefile rewritten to always use kbuild method on 2.6 kernels.
+ - Work around invalidate_bdev() changes on recent 2.6 kernels.
Modified: upstream/loop-aes/current/Makefile
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/Makefile?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/Makefile (original)
+++ upstream/loop-aes/current/Makefile Thu May 17 13:32:14 2007
@@ -1,9 +1,9 @@
#
# Makefile
#
-# Written by Jari Ruusu, December 14 2006
-#
-# Copyright 2001-2006 by Jari Ruusu.
+# Written by Jari Ruusu, May 14 2007
+#
+# Copyright 2001-2007 by Jari Ruusu.
# Redistribution of this file is permitted under the GNU Public License.
#
# To compile and install, use commands: make clean; make
@@ -43,15 +43,15 @@
endif
TD:=$(shell /bin/pwd)
-USE_KBUILD:=n
MODINST:=y
KEYSCRUB:=n
PADLOCK:=n
-
-ifeq ($(USE_KBUILD),y)
- VERSION=$(shell grep '^VERSION' $(LS)/Makefile | head -n 1 | tr -d -c '0-9')
- PATCHLEVEL=$(shell grep '^PATCHLEVEL' $(LS)/Makefile | head -n 1 | tr -d -c '0-9')
-endif
+BUILD_LOOP:=y
+EXTRA_CIPHERS:=n
+
+VERSION:=$(shell if test -r $(LS)/Makefile; then grep '^VERSION' $(LS)/Makefile | head -n 1 | sed -e 's/[^0-9]//g'; fi)
+PATCHLEVEL:=$(shell if test -r $(LS)/Makefile; then grep '^PATCHLEVEL' $(LS)/Makefile | head -n 1 | sed -e 's/[^0-9]//g'; fi)
+SUBLEVEL:=$(shell if test -r $(LS)/Makefile; then grep '^SUBLEVEL' $(LS)/Makefile | head -n 1 | sed -e 's/[^0-9]//g'; fi)
PATCHNAME:=loop.c-$(VERSION).$(PATCHLEVEL).diff
ORIGNAME:=loop.c-$(VERSION).$(PATCHLEVEL).original
@@ -59,13 +59,10 @@
EF:=
LF:=-r
-CP1:=
-PP1:=
-VM1:=
-SR1:=n
ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -lt 260 ]; then echo y; fi),y)
OD1:=$(LS)
endif
+
ifeq ($(VERSION).$(PATCHLEVEL),2.0)
# Use optimized assembler implementation if target is x86 processor
X86_ASM:=$(shell if grep -q -s "define CONFIG_M[3456]86" $(LS)/include/linux/autoconf.h; then echo y; fi)
@@ -94,18 +91,6 @@
EF += $(shell if ! grep -q -s "spinlock_t sigmask_lock" $(LS)/include/linux/sched.h; then if grep -q -s 'struct sighand_struct \*sighand;' $(LS)/include/linux/sched.h; then echo '-DNO_TASK_STRUCT_SIGMASK_LOCK=1'; else echo '-DNO_TASK_STRUCT_SIGMASK_LOCK=2'; fi; fi)
endif
ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 260 ]; then echo y; fi),y)
-ifneq ($(USE_KBUILD),y)
-ifeq ($(shell if ! echo " $(CFLAGS) " | grep -q -s "D__KERNEL__"; then echo y; fi),y)
- CFLAGS := $(CPPFLAGS) $(CFLAGS)
-endif
- CFLAGS := $(NOSTDINC_FLAGS) $(CFLAGS) $(CFLAGS_MODULE)
- LF:=$(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_MODULE)
- CP1:=cd $(OD1) &&
- PP1:=$(TD)/
- MP1:=$(shell if test -e $(OD1)/scripts/mod/modpost; then echo "./scripts/mod/modpost"; else echo "./scripts/modpost"; fi)
- MP1 += $(shell if grep -q -s "define CONFIG_MODVERSIONS 1" $(OD1)/include/linux/autoconf.h; then if grep -q -s "if .*CONFIG_MODVERSIONS.*-m" $(LS)/scripts/Makefile.modpost; then echo " -m"; fi; fi)
- VM1:=k
-endif
# Use optimized assembler implementation if target is x86 processor
X86_ASM:=$(shell if grep -q -s "define CONFIG_X86 1" $(OD1)/include/linux/autoconf.h; then if ! grep -q -s "define CONFIG_X86_64" $(OD1)/include/linux/autoconf.h; then echo y; fi; fi)
# Use optimized assembler implementation if target is AMD64 or compatible processor
@@ -114,18 +99,10 @@
EF += $(shell if test -r $(LS)/drivers/block/genhd.c; then if ! grep -q -s "request_module.*block-major-.*MAJOR.*MINOR" $(LS)/drivers/block/genhd.c; then echo "-DOLD_REQUEST_MODULE_INTERFACE"; fi; fi)
# some older 2.6 kernels have per thread resource limits
EF += $(shell if test -r $(LS)/include/linux/sched.h; then if sed -e '1,/^struct task_struct {$$/ d' $(LS)/include/linux/sched.h | sed -e '/^};$$/,$$ d' | grep -q -s 'struct rlimit rlim.RLIM_NLIMITS.;'; then echo "-DOLD_PER_THREAD_RLIMITS"; fi; fi)
- # some 2.6 kernels need # character in KBUILD_BASENAME and KBUILD_MODNAME
- SR1:=$(shell if grep -q -s "^basename_flags.*KBUILD_BASENAME.*KBUILD_STR" $(LS)/scripts/Makefile.lib; then echo y; fi)
# some 2.6 kernels may have void* timer callback parameter
EF += $(shell if test -r $(LS)/include/linux/timer.h; then if ! sed -e '1,/^struct timer_list {$$/ d' $(LS)/include/linux/timer.h | sed -e '/^};$$/,$$ d' | grep -q -s 'unsigned long data;'; then echo "-DNEW_TIMER_VOID_PTR_PARAM"; fi; fi)
-endif
-
-ifneq ($(USE_KBUILD),y)
-ifeq ($(SR1),y)
- EF += -D"KBUILD_STR(s)=\#s"
-else
- EF += -D"KBUILD_STR(s)=s"
-endif
+ # some older 2.6 kernels may have two invalidate_bdev() parameters
+ EF += $(shell if test -r $(LS)/include/linux/buffer_head.h; then if grep -q -s '^void invalidate_bdev.*struct block_device.*int' $(LS)/include/linux/buffer_head.h; then echo "-DOLD_INVALIDATE_BDEV_INTERFACE"; fi; fi)
endif
ifeq ($(KEYSCRUB),y)
@@ -192,58 +169,85 @@
@echo "directory like this: make LINUX_SOURCE=/usr/src/linux-2.2.20aa1"
@exit 1
endif
-ifeq ($(USE_KBUILD),y)
- rm -r -f tmp-d-kbuild
+ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 260 ]; then echo y; fi),y)
+ rm -r -f *.ko tmp-d-kbuild
mkdir tmp-d-kbuild
- cd tmp-d-kbuild && ln -s ../loop.c-$(VERSION).$(PATCHLEVEL).patched patched-loop.c && ln -s ../glue.c glue.c && ln -s ../aes.h aes.h && ln -s ../md5.h md5.h
+ echo 'obj-m:=' >>tmp-d-kbuild/Makefile
+ifeq ($(BUILD_LOOP),y)
+ cd tmp-d-kbuild && ln -s ../loop.c-$(VERSION).$(PATCHLEVEL).patched patched-loop.c && ln -s ../glue.c ../aes.h ../md5.h .
+ echo 'obj-m += loop.o' >>tmp-d-kbuild/Makefile
ifeq ($(X86_ASM),y)
- cd tmp-d-kbuild && ln -s ../aes-x86.S aes-x86.S && ln -s ../md5-x86.S md5-x86.S
+ cd tmp-d-kbuild && ln -s ../aes-x86.S ../md5-x86.S .
echo 'loop-y:=patched-loop.o glue.o aes-x86.o md5-x86.o' >>tmp-d-kbuild/Makefile
else
ifeq ($(AMD64_ASM),y)
- cd tmp-d-kbuild && ln -s ../aes-amd64.S aes-amd64.S && ln -s ../md5-amd64.S md5-amd64.S
+ cd tmp-d-kbuild && ln -s ../aes-amd64.S ../md5-amd64.S .
echo 'loop-y:=patched-loop.o glue.o aes-amd64.o md5-amd64.o' >>tmp-d-kbuild/Makefile
else
- cd tmp-d-kbuild && ln -s ../aes.c aes.c && ln -s ../md5.c md5.c
+ cd tmp-d-kbuild && ln -s ../aes.c ../md5.c .
echo 'loop-y:=patched-loop.o glue.o aes.o md5.o' >>tmp-d-kbuild/Makefile
echo 'CFLAGS_aes.o := -DDATA_ALWAYS_ALIGNED=1' >>tmp-d-kbuild/Makefile
endif
endif
+endif
+ifeq ($(EXTRA_CIPHERS),y)
+ cd tmp-d-kbuild && ln -s ../loop_twofish.c ../loop_serpent.c ../loop_blowfish.c .
+ echo 'obj-m += loop_twofish.o loop_serpent.o loop_blowfish.o' >>tmp-d-kbuild/Makefile
+endif
echo 'EXTRA_CFLAGS:= $(EF)' >>tmp-d-kbuild/Makefile
- echo 'obj-m:=loop.o' >>tmp-d-kbuild/Makefile
- cd $(LS) && make M=$(TD)/tmp-d-kbuild modules $(OD2)
+ cd $(LS) && make SUBDIRS=$(TD)/tmp-d-kbuild modules $(OD2)
ifeq ($(MODINST),y)
- cd $(LS) && make M=$(TD)/tmp-d-kbuild modules_install $(OD2)
-endif
-else
- cd $(LS) && make SUBDIRS=$(TD) modules Q='@cd $(TD) && if [ "$$@" = "modules" ]; then make modules; fi; exit; # ' $(OD2)
-endif
-
-modules: clean loop.$(VM1)o
-ifeq ($(MODINST),y)
- mkdir -p $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/block
- cp -p loop.$(VM1)o $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/block
-ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 240 ]; then echo y; fi),y)
- rm -f $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/kernel/drivers/block/loop.{,k}o
-endif
-endif
+ cd $(LS) && make SUBDIRS=$(TD)/tmp-d-kbuild modules_install $(OD2)
+ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -eq 260 -a "$(SUBLEVEL)0" -lt 170 ]; then echo y; fi),y)
+ cd $(LS) && make SUBDIRS=$(TD) modules Q='@cd $(TD) && if [ "$$@" = "modules" ]; then make old-k26-depmod; fi; exit; # ' $(OD2)
+endif
+endif
+ifeq ($(BUILD_LOOP),y)
+ ln -s tmp-d-kbuild/loop.ko .
+endif
+ifeq ($(EXTRA_CIPHERS),y)
+ ln -s tmp-d-kbuild/loop_twofish.ko tmp-d-kbuild/loop_serpent.ko tmp-d-kbuild/loop_blowfish.ko .
+endif
+ sync
+else
+ cd $(LS) && make SUBDIRS=$(TD) modules
+ sync
+endif
+
+# 2.6 kernels older than 2.6.17 do not run depmod in "modules_install" stage,
+# but above "make modules Q=..." hack calls this target so we can run depmod here.
+old-k26-depmod:
ifeq ($(RUNDM),y)
$(DEPMOD) -a $(DMOPTS)
endif
- sync
- @echo "Currently running kernel is" $(KR)
- @echo "Module was built for kernel" $(KERNELRELEASE_clean)
-ifneq ($(KERNELRELEASE_clean),$(KR))
- @echo "WARNING - THIS MODULE WILL NOT WORK WITH CURRENTLY RUNNING KERNEL"
-endif
-loop.$(VM1)o: patched-loop.o glue.o $(AES_OBJ_CODE) $(MD5_OBJ_CODE)
+
+# build stuff after this line is for 2.4 and older kernels only
+MLIST:=
+ifeq ($(BUILD_LOOP),y)
+ MLIST += loop.o
+endif
+ifeq ($(EXTRA_CIPHERS),y)
+ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 220 ]; then echo y; fi),y)
+ MLIST += loop_twofish.o loop_serpent.o loop_blowfish.o
+endif
+endif
+
+modules: clean $(MLIST)
+ifeq ($(MODINST),y)
+ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 240 ]; then echo y; fi),y)
+ rm -f $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/kernel/drivers/block/loop.o
+endif
+ mkdir -p $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/block
+ifneq "$(strip $(MLIST))" ""
+ cp -p $(MLIST) $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE_clean)/block
+endif
+ifeq ($(RUNDM),y)
+ $(DEPMOD) -a $(DMOPTS)
+endif
+endif
+
+loop.o: patched-loop.o glue.o $(AES_OBJ_CODE) $(MD5_OBJ_CODE)
$(LD) $(LF) patched-loop.o glue.o $(AES_OBJ_CODE) $(MD5_OBJ_CODE) -o loop.o
-ifneq "$(VM1)" ""
- $(CP1) $(MP1) vmlinux $(PP1)loop.o >/dev/null 2>&1
- $(CP1) $(CC) $(CFLAGS) $(EF) -D"KBUILD_BASENAME=KBUILD_STR(loop_mod)" -D"KBUILD_MODNAME=KBUILD_STR(loop)" -c $(PP1)loop.mod.c -o $(PP1)loop.mod.o
- $(LD) $(LF) loop.o loop.mod.o -o loop.$(VM1)o
- rm -f loop.o loop.mod.[co]
-endif
patched-loop.o:
rm -f patched-loop.[ch]
ifeq ($(shell if [ "$(VERSION)$(PATCHLEVEL)0" -ge 240 ]; then echo y; fi),y)
@@ -255,74 +259,131 @@
@echo "*** END OF SECTION TO IGNORE PATCH ERRORS ***"
patch -p0 -l -f < $(PATCHNAME)
endif
- $(CP1) $(CC) $(CFLAGS) $(EF) -D"KBUILD_BASENAME=KBUILD_STR(patched_loop)" -D"KBUILD_MODNAME=KBUILD_STR(loop)" -DEXPORT_SYMTAB -c $(PP1)patched-loop.c -o $(PP1)patched-loop.o
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=patched_loop -DEXPORT_SYMTAB -c patched-loop.c -o patched-loop.o
glue.o: glue.c aes.h md5.h
- $(CP1) $(CC) $(CFLAGS) $(EF) -D"KBUILD_BASENAME=KBUILD_STR(glue)" -D"KBUILD_MODNAME=KBUILD_STR(loop)" -c $(PP1)glue.c -o $(PP1)glue.o
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=glue -c glue.c -o glue.o
aes.o: aes.c aes.h
- $(CP1) $(CC) $(CFLAGS) $(EF) -D"KBUILD_BASENAME=KBUILD_STR(aes)" -D"KBUILD_MODNAME=KBUILD_STR(loop)" -DDATA_ALWAYS_ALIGNED=1 -c $(PP1)aes.c -o $(PP1)aes.o
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=aes -DDATA_ALWAYS_ALIGNED=1 -c aes.c -o aes.o
aes-x86.o: aes-x86.S
- $(CP1) $(CC) $(AFLAGS) -c $(PP1)aes-x86.S -o $(PP1)aes-x86.o
+ $(CC) $(AFLAGS) -c aes-x86.S -o aes-x86.o
aes-amd64.o: aes-amd64.S
- $(CP1) $(CC) $(AFLAGS) -c $(PP1)aes-amd64.S -o $(PP1)aes-amd64.o
+ $(CC) $(AFLAGS) -c aes-amd64.S -o aes-amd64.o
md5.o: md5.c md5.h
- $(CP1) $(CC) $(CFLAGS) $(EF) -D"KBUILD_BASENAME=KBUILD_STR(md5)" -D"KBUILD_MODNAME=KBUILD_STR(loop)" -c $(PP1)md5.c -o $(PP1)md5.o
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=md5 -c md5.c -o md5.o
md5-x86.o: md5-x86.S
- $(CP1) $(CC) $(AFLAGS) -c $(PP1)md5-x86.S -o $(PP1)md5-x86.o
+ $(CC) $(AFLAGS) -c md5-x86.S -o md5-x86.o
md5-amd64.o: md5-amd64.S
- $(CP1) $(CC) $(AFLAGS) -c $(PP1)md5-amd64.S -o $(PP1)md5-amd64.o
+ $(CC) $(AFLAGS) -c md5-amd64.S -o md5-amd64.o
+
+loop_twofish.o: loop_twofish.c
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=loop_twofish -c loop_twofish.c -o loop_twofish.o
+loop_serpent.o: loop_serpent.c
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=loop_serpent -c loop_serpent.c -o loop_serpent.o
+loop_blowfish.o: loop_blowfish.c
+ $(CC) $(CFLAGS) $(EF) -DKBUILD_BASENAME=loop_blowfish -c loop_blowfish.c -o loop_blowfish.o
clean:
- rm -f *.o *.ko *.orig *.rej *.mod.c patched-loop.[ch] test-file[1234]
+ rm -f *.o *.ko *.orig *.rej patched-loop.[ch] test-file[1234]
rm -f -r test-dir1 tmp-d-kbuild
# tests can be run after loop.o and losetup are compiled and installed
TLD:=/dev/loop7
-TEST_GPG_TYPES:=yes
-TEST_UNHASHED_AES_TYPES:=yes
+TEST_GPG_TYPES:=y
+TEST_UNHASHED_AES_TYPES:=y
TEST_PARTITION_TO_TRASH:=none
+TEST_LE_BLOWFISH_TYPES:=n
tests:
dd if=/dev/zero of=test-file1 bs=1024 count=33
cp test-file1 test-file3
echo 09876543210987654321 | /sbin/losetup -p 0 -e AES128 $(TLD) test-file3
dd if=/dev/zero of=$(TLD) bs=1024 count=33 conv=notrunc
/sbin/losetup -d $(TLD)
- make test-part2 CT=XOR ITER=0 HF=sha256 GK= MD=d28220a1737763260f6e0109f141814a TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=NONE ITER=0 HF=sha256 GK= MD=0b08ceeb8b609b0885471ba25a23f5a5 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES128 ITER=0 HF=sha256 GK= MD=7c1cfd4fdd0d7cc847dd0942a2d48e48 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES192 ITER=0 HF=sha384 GK= MD=51c91bcc04ee2a4ca00310b519b3228c TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=0 HF=sha512 GK= MD=1bf92ee337b653cdb32838047dec00fc TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=0 HF=rmd160 GK= MD=c85eb59da18876ae71ebd838675c6ef4 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=10 HF=sha512 GK= MD=dadad48a6d3d9b9914199626ed7b710c TF=test-file1 PSW=12345678901234567890
-ifeq ($(TEST_GPG_TYPES),yes)
+ make test-part2 PAR="-e XOR" MD=d28220a1737763260f6e0109f141814a TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR= MD=0b08ceeb8b609b0885471ba25a23f5a5 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES128" MD=7c1cfd4fdd0d7cc847dd0942a2d48e48 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES192" MD=51c91bcc04ee2a4ca00310b519b3228c TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256" MD=1bf92ee337b653cdb32838047dec00fc TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256 -H rmd160" MD=c85eb59da18876ae71ebd838675c6ef4 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256 -C 10" MD=dadad48a6d3d9b9914199626ed7b710c TF=test-file1 PSW=12345678901234567890
+ifeq ($(TEST_GPG_TYPES),y)
mkdir test-dir1
- make test-part2 CT=AES128 ITER=0 HF=sha256 GK="-K gpgkey1.asc -G test-dir1" MD=fa5c9a84bc8f6257830c3cbe60294c69 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES192 ITER=0 HF=sha384 GK="-K gpgkey1.asc -G test-dir1" MD=ddec9544a36100156aef353ec2bf9740 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=0 HF=sha512 GK="-K gpgkey1.asc -G test-dir1" MD=cb38b603f96f0deac1891d423983d69c TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES128 ITER=0 HF=sha256 GK="-K gpgkey2.asc -G test-dir1" MD=f9825b79873f5c439ae9371c1a929a6c TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES192 ITER=0 HF=sha384 GK="-K gpgkey2.asc -G test-dir1" MD=489991b779213f60219f09c575c08247 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=0 HF=sha512 GK="-K gpgkey2.asc -G test-dir1" MD=2a1d0d3fce83fbe5f3edcca95fbab3b7 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES128 ITER=0 HF=sha256 GK="-K gpgkey3.asc -G test-dir1" MD=fabe7422f534820838dfd4571ba14ade TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES192 ITER=0 HF=sha384 GK="-K gpgkey3.asc -G test-dir1" MD=3eadc976525f9df7e18d56676ec730c8 TF=test-file1 PSW=12345678901234567890
- make test-part2 CT=AES256 ITER=0 HF=sha512 GK="-K gpgkey3.asc -G test-dir1" MD=3be488a60dd77bcab9fbeba4a428c3d5 TF=test-file1 PSW=12345678901234567890
-endif
-ifeq ($(TEST_UNHASHED_AES_TYPES),yes)
- make test-part2 CT=AES ITER=0 HF=unhashed1 GK= MD=293b09053055af7ca5235dc6a5bc0b74 TF=test-file1 PSW=1234567890123456789012345678901
- make test-part2 CT=AES ITER=0 HF=unhashed1 GK= MD=6b157917570250ef4370bf9acae49279 TF=test-file1 PSW=12345678901234567890123456789012
- make test-part2 CT=AES ITER=0 HF=unhashed1 GK= MD=6b157917570250ef4370bf9acae49279 TF=test-file1 PSW=123456789012345678901234567890123456789012
- make test-part2 CT=AES ITER=0 HF=unhashed1 GK= MD=e12fd55fbae9fc0e03517593e253e239 TF=test-file1 PSW=1234567890123456789012345678901234567890123
+ make test-part2 PAR="-e AES128 -K gpgkey1.asc -G test-dir1" MD=fa5c9a84bc8f6257830c3cbe60294c69 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES192 -K gpgkey1.asc -G test-dir1" MD=ddec9544a36100156aef353ec2bf9740 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256 -K gpgkey1.asc -G test-dir1" MD=cb38b603f96f0deac1891d423983d69c TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES128 -K gpgkey2.asc -G test-dir1" MD=f9825b79873f5c439ae9371c1a929a6c TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES192 -K gpgkey2.asc -G test-dir1" MD=489991b779213f60219f09c575c08247 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256 -K gpgkey2.asc -G test-dir1" MD=2a1d0d3fce83fbe5f3edcca95fbab3b7 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES128 -K gpgkey3.asc -G test-dir1" MD=fabe7422f534820838dfd4571ba14ade TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES192 -K gpgkey3.asc -G test-dir1" MD=3eadc976525f9df7e18d56676ec730c8 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e AES256 -K gpgkey3.asc -G test-dir1" MD=3be488a60dd77bcab9fbeba4a428c3d5 TF=test-file1 PSW=12345678901234567890
+endif
+ifeq ($(TEST_UNHASHED_AES_TYPES),y)
+ make test-part2 PAR="-e AES -H unhashed1" MD=293b09053055af7ca5235dc6a5bc0b74 TF=test-file1 PSW=1234567890123456789012345678901
+ make test-part2 PAR="-e AES -H unhashed1" MD=6b157917570250ef4370bf9acae49279 TF=test-file1 PSW=12345678901234567890123456789012
+ make test-part2 PAR="-e AES -H unhashed1" MD=6b157917570250ef4370bf9acae49279 TF=test-file1 PSW=123456789012345678901234567890123456789012
+ make test-part2 PAR="-e AES -H unhashed1" MD=e12fd55fbae9fc0e03517593e253e239 TF=test-file1 PSW=1234567890123456789012345678901234567890123
endif
ifneq ($(TEST_PARTITION_TO_TRASH),none)
- make test-part2 CT=AES128 ITER=0 HF=sha256 GK= MD=7c1cfd4fdd0d7cc847dd0942a2d48e48 TF=$(TEST_PARTITION_TO_TRASH) PSW=12345678901234567890
- make test-part2 CT=NONE ITER=0 HF=sha256 GK= MD=0b08ceeb8b609b0885471ba25a23f5a5 TF=$(TEST_PARTITION_TO_TRASH) PSW=12345678901234567890
+ make test-part2 PAR="-e AES128" MD=7c1cfd4fdd0d7cc847dd0942a2d48e48 TF=$(TEST_PARTITION_TO_TRASH) PSW=12345678901234567890
+ make test-part2 PAR= MD=0b08ceeb8b609b0885471ba25a23f5a5 TF=$(TEST_PARTITION_TO_TRASH) PSW=12345678901234567890
+endif
+ifeq ($(EXTRA_CIPHERS),y)
+ /sbin/modprobe loop_twofish
+ make test-part2 PAR="-e twofish128" MD=763ebf26964b3202e4740ced21018f19 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish192" MD=6d5868395e2bf9de5b5bc9e036646061 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish256" MD=65332bb73af9ae564d452a21e053f1c5 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish128 -I 1" MD=1a814ea93ec65bf0a321177c8f2afbb0 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish192 -I 1" MD=941c708664436917cfa2301aac900164 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish256 -I 1" MD=5c4ca27adacce34b22d4ffdad9086309 TF=test-file1 PSW=12345678901234567890
+ /sbin/modprobe loop_serpent
+ make test-part2 PAR="-e serpent128" MD=7d7bc9de37b30179a164e7f9e9361557 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent192" MD=5c7623e041530f6647ae0b72a78c41fd TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent256" MD=31851a69091fc7681bfb8bbea4663f3f TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent128 -I 2" MD=54bf141d4571bae5b954cd34df09e9a9 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent192 -I 2" MD=e48ce972d02749284ae018749821e425 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent256 -I 2" MD=260a96d831cfa4c89975327cea217e07 TF=test-file1 PSW=12345678901234567890
+ /sbin/modprobe loop_blowfish
+ make test-part2 PAR="-e blowfish128" MD=0decbfdab73dea75b7bf14afbc3181b9 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish192" MD=031669b257da3e6dc9cf4aba140ef1ad TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish256" MD=c7ed54673dedc02a1d30abe4ebec2753 TF=test-file1 PSW=12345678901234567890
+ifeq ($(TEST_LE_BLOWFISH_TYPES),y)
+ # these md5 sums can only be produced on little endian boxes
+ make test-part2 PAR="-e blowfish128 -I 1" MD=22c8593065df1250306bfed05c0b486a TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish192 -I 1" MD=31c964f6e830f74a02a90905aa8efb2c TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish256 -I 1" MD=74ada888670d7278be00eb133feae2f5 TF=test-file1 PSW=12345678901234567890
+endif
+ifeq ($(TEST_GPG_TYPES),y)
+ make test-part2 PAR="-e twofish128 -K gpgkey1.asc -G test-dir1" MD=ddf13c7d8e98e2e811c909521dc14509 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish192 -K gpgkey1.asc -G test-dir1" MD=b6903ab3c6edcfb7d4304536ede5a7eb TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish256 -K gpgkey1.asc -G test-dir1" MD=da58adcd6354578dfda581239a1e045f TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish128 -K gpgkey2.asc -G test-dir1" MD=9ade662b89929151f9addadb1c50c473 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish192 -K gpgkey2.asc -G test-dir1" MD=6282fcb36094212a88ca4e2f3b1d5df3 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish256 -K gpgkey2.asc -G test-dir1" MD=c9cfd9ede40efc7786c4d20ee64da245 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish128 -K gpgkey3.asc -G test-dir1" MD=318869c1f51d86912d5784a1dc717b08 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish192 -K gpgkey3.asc -G test-dir1" MD=ffe7e80743edc5120be7bbcb8076b368 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e twofish256 -K gpgkey3.asc -G test-dir1" MD=345b77d2e3d318ba27214bbc8313ae0f TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent128 -K gpgkey1.asc -G test-dir1" MD=ac78f204e993e7141baaa30cd1e24221 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent192 -K gpgkey1.asc -G test-dir1" MD=c2a724f1973694cb898996dba3182c55 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent256 -K gpgkey1.asc -G test-dir1" MD=7c2d2f438129e1084cb41a622fb77ca4 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent128 -K gpgkey2.asc -G test-dir1" MD=b3992dd60a999a3cba18fad15492b8aa TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent192 -K gpgkey2.asc -G test-dir1" MD=e6cfc39e113943db1d03797dbf5cd5cd TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent256 -K gpgkey2.asc -G test-dir1" MD=f111de9256b5adf0f12fe1c75c261feb TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent128 -K gpgkey3.asc -G test-dir1" MD=96f3d5321b00f5bf25852627dc2d48a8 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent192 -K gpgkey3.asc -G test-dir1" MD=cb9729cb56a8358198dc61995b3a3cd2 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e serpent256 -K gpgkey3.asc -G test-dir1" MD=b4d9758d5d387fce43a1d436a01d3d68 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish128 -K gpgkey1.asc -G test-dir1" MD=d1cca0dc44e7af8a628a0978ac0fe26d TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish192 -K gpgkey1.asc -G test-dir1" MD=e5bbb6648b893d1e1db08423e8806b53 TF=test-file1 PSW=12345678901234567890
+ make test-part2 PAR="-e blowfish256 -K gpgkey1.asc -G test-dir1" MD=fdf78c384eb14215061f81e0c098b777 TF=test-file1 PSW=12345678901234567890
+endif
endif
rm -f -r test-file[1234] test-dir1
@echo "*** Test results ok ***"
test-part2:
- echo $(PSW) | /sbin/losetup -p 0 -e $(CT) -H $(HF) -C $(ITER) $(GK) $(TLD) $(TF)
+ echo $(PSW) | /sbin/losetup -p 0 $(PAR) $(TLD) $(TF)
dd if=test-file3 of=$(TLD) bs=1024 count=33 conv=notrunc
/sbin/losetup -d $(TLD)
- echo $(PSW) | /sbin/losetup -p 0 -e $(CT) -H $(HF) -C $(ITER) $(GK) $(TLD) $(TF)
+ echo $(PSW) | /sbin/losetup -p 0 $(PAR) $(TLD) $(TF)
dd if=$(TLD) of=test-file4 bs=33792 count=1
/sbin/losetup -d $(TLD)
ifneq ($(TF),test-file1)
@@ -332,4 +393,4 @@
echo "$(MD) test-file1" | cmp test-file2 -
cmp test-file3 test-file4
-.PHONY: all clean tests test-part2
+.PHONY: all old-k26-depmod clean tests test-part2
Modified: upstream/loop-aes/current/README
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/README?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/README (original)
+++ upstream/loop-aes/current/README Thu May 17 13:32:14 2007
@@ -1,4 +1,4 @@
-Written by Jari Ruusu <jariruusu at users.sourceforge.net>, February 23 2007
+Written by Jari Ruusu <jariruusu at users.sourceforge.net>, May 15 2007
Copyright 2001-2007 by Jari Ruusu.
Redistribution of this file is permitted under the GNU Public License.
@@ -14,6 +14,8 @@
2.4. Use of software suspend
2.5. File system soft block sizes
2.6. Compatibility with earlier versions
+2.7. Other loop ciphers - twofish, serpent, and blowfish
+2.8. Compatibility with other loop encryption implementations
3. Instructions for building loop.o driver
4. Instructions for building new mount, umount, losetup, swapon and swapoff
5. Instructions for building new gpg
@@ -26,6 +28,7 @@
7.5. Example 5 - Encrypting root partition
7.6. Example 6 - Boot from CD-ROM + encrypted root partition
7.7. Example 7 - Boot from USB-stick + encrypted root partition
+7.8. Example 8 - Encrypted partition using serpent cipher
8. Security levels
9. Performance tuning for 2.4 and newer kernels
10. Files
@@ -199,6 +202,60 @@
mount+losetup from loop-AES-v3.X | on-disk- v1 v1,v2 v1,v2,v3
+2.7. Other loop ciphers - twofish, serpent, and blowfish
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+These cipher modules work with linux kernel versions 2.2 or later. Twofish
+and serpent ciphers can be used in either multi-key or single-key mode, but
+blowfish cipher can be used only in single-key mode.
+
+Cipher names that are available to losetup and mount programs:
+
+loop_twofish.o : twofish128 twofish160 twofish192 twofish256
+loop_blowfish.o : blowfish128 blowfish192 blowfish256
+loop_serpent.o : serpent128 serpent192 serpent256
+
+2.6 kernels use .ko extension for kernel modules, so module names will be
+loop_twofish.ko, loop_blowfish.ko and loop_serpent.ko on those kernels.
+
+These extra cipher modules are built only if EXTRA_CIPHERS=y parameter
+is present on make command line (see section 3).
+
+
+2.8. Compatibility with other loop encryption implementations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+To use serpent, AES, twofish, or blowfish disk images encrypted using
+kerneli.org 512-byte-IV version (which uses RIPE-MD160 as password hash),
+use commands like these:
+
+ losetup -e twofish128 -H rmd160 /dev/loop0 /dev/hda9
+ or ^^^^^^^^^
+ mount -t ext2 /dev/hda9 /mnt9 -o loop,encryption=twofish128,phash=rmd160
+ ^^^^^^^^^^^^
+Serpent module interprets loinit=2 option as "big-endian" flag. To use
+incorrect big-endian serpent disk images, use commands like these:
+
+ losetup -e serpent128 -I 2 /dev/loop0 /dev/hda9
+ or ^^^^
+ mount -t ext2 /dev/hda9 /mnt9 -o loop,encryption=serpent128,loinit=2
+ ^^^^^^^^
+Blowfish module interprets loinit=1 option as "bug-compatible" flag. To use
+mutated-little-endian blowfish disk images encrypted using kerneli.org
+512-byte-IV version, use commands like these:
+
+ losetup -e blowfish128 -H rmd160 -I 1 /dev/loop0 /dev/hda9
+ or ^^^^^^^^^ ^^^^
+ mount -t ext2 /dev/hda9 /mnt9 -o loop,encryption=blowfish128,phash=rmd160,loinit=1
+ ^^^^^^^^^^^^ ^^^^^^^^
+Twofish module interprets loinit=1 option as "SUSE-compatible" flag. To use
+twofish disk images encrypted using SUSE-kernel-twofish version (which uses
+constant IV for each 512 byte sector), use commands like these:
+
+ losetup -e twofish160 -H rmd160 -I 1 /dev/loop0 /dev/hda9
+ or ^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^
+ mount -t ext2 /dev/hda9 /mnt9 -o loop,encryption=twofish160,phash=rmd160,loinit=1
+ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^
+
+
3. Instructions for building loop.o driver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Before you attempt to build loop.o driver (loop.ko on 2.6 kernels), you
@@ -235,10 +292,12 @@
file called patched-loop.c.
Resulting patched-loop.c along with other source files is then compiled and
-linked to form a new loop.o driver that is (usually) installed in
-/lib/modules/`uname -r`/block directory. AES cipher is permanently glued to
-loop.o driver so that when loop.o is loaded it automagically has AES support
-built in. There is no need to define any aliases in /etc/modules.conf file.
+linked to form a new loop.o driver (loop.ko on 2.6 kernels) that is
+installed in /lib/modules/`uname -r`/block (2.4 and older kernels) or
+/lib/modules/`uname -r`/extra (2.6 kernels) directory. AES cipher is
+permanently glued to loop.o driver so that when loop.o is loaded it
+automagically has AES support built in. There is no need to define any
+aliases in /etc/modules.conf file.
To compile and install loop.o driver, as root, use commands:
@@ -263,7 +322,7 @@
2.6.x kernel with separate object directory.
You can disable automatic module installation and creation of module
-dependencies by specifying MODINST=n RUNDM=n on make command line.
+dependencies by specifying MODINST=n on make command line.
Automatic kernel source directory detection is not foolproof. For best
results, always specify LINUX_SOURCE, especially if loop.o module appears to
@@ -297,6 +356,14 @@
PADLOCK=y on make command line. If enabled, presence of VIA padlock
instructions is detected at run time, but code still works on non-padlock
processors too.
+
+Twofish, serpent, and blowfish loop cipher modules are also available, but
+they are not built by default. Add EXTRA_CIPHERS=y parameter to make command
+line if you want them built and installed. Prior to loop-AES-v3.2a, these
+modules were on separate 'ciphers' package. Due to versioned symbol build
+difficulties on 2.6 kernels involving two separately built kernel module
+packages, these modules are now merged to loop-AES, and are now built from
+one package.
Note: If your patch program is very old, it may not understand the --dry-run
option, and may puke lengthy error messages. Even if that happens, the build
@@ -372,9 +439,9 @@
These commands, as root user, will recompile and install gpg and gpgv and
their man pages:
- bzip2 -d -c gnupg-1.4.6.tar.bz2 | tar xvf -
- cd gnupg-1.4.6
- patch -p1 </PATH/TO/LOOP-AES/gnupg-1.4.6.diff
+ bzip2 -d -c gnupg-1.4.7.tar.bz2 | tar xvf -
+ cd gnupg-1.4.7
+ patch -p1 </PATH/TO/LOOP-AES/gnupg-1.4.7.diff
CFLAGS="-O2" LDFLAGS="-static -s" ./configure --prefix=/usr --enable-static-rnd=linux
make
rm -f /usr/share/man/man1/{gpg,gpgv}.1.gz
@@ -404,6 +471,13 @@
cd /PATH/TO/LOOP-AES
make tests
+
+If you chose to build twofish, serpent, and blowfish ciphers, and want to
+test them in addition to AES cipher, then add EXTRA_CIPHERS=y parameter to
+'make tests' command line. Like this:
+
+ cd /PATH/TO/LOOP-AES
+ make tests EXTRA_CIPHERS=y
Makefile will display "*** Test results ok ***" message if tests are
completed successfully. If tests fail, do not use the driver as it is
@@ -774,8 +848,13 @@
mkdir /boot/modules-2.4.22aa1
^^^^^^^^^
- cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/modules-2.4.22aa1/
- ^^^^^^^^^ ^^^^^^^^^
+ cp -p /lib/modules/2.4.22aa1/block/loop.o /boot/modules-2.4.22aa1/
+ ^^^^^^^^^ ^^^^^^^^^
+ OR
+ mkdir /boot/modules-2.6.21.1
+ ^^^^^^^^
+ cp -p /lib/modules/2.6.21.1/extra/loop.ko /boot/modules-2.6.21.1/
+ ^^^^^^^^ ^^^^^^^^
Note: You need to have a kernel version specific loop.o or loop.ko
module in /boot/modules-KERNELRELEASE/ directory for every kernel you
intend to use.
@@ -979,8 +1058,14 @@
rm -r -f /boot/iso/modules-*
mkdir -p /boot/iso/modules-2.4.22aa1
^^^^^^^^^
- cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/iso/modules-2.4.22aa1/
- ^^^^^^^^^ ^^^^^^^^^
+ cp -p /lib/modules/2.4.22aa1/block/loop.o /boot/iso/modules-2.4.22aa1/
+ ^^^^^^^^^ ^^^^^^^^^
+ OR
+ rm -r -f /boot/iso/modules-*
+ mkdir -p /boot/iso/modules-2.6.21.1
+ ^^^^^^^^
+ cp -p /lib/modules/2.6.21.1/extra/loop.ko /boot/iso/modules-2.6.21.1/
+ ^^^^^^^^ ^^^^^^^^
8-9) Same as above 'encrypting root partition' steps 8-9, with exception
that in step 9 you must write rootkey.gpg to /boot/iso directory instead
of /boot directory.
@@ -1219,6 +1304,74 @@
encrypted, only steps 5 to 7 and 13d to 13e are needed. However, if you are
upgrading from 2.4 kernel to 2.6 kernel, new insmod may need to be copied to
/boot directory by running step 12 before running step 13d.
+
+
+7.8. Example 8 - Encrypted partition using serpent cipher
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+This example shows how to create an ext2 file system on serpent encrypted
+hard disk partition. This example uses a fictitious partition /dev/hda666
+for storage and fictitious directory /mnt666 as mount point.
+
+Create 65 random encryption keys and encrypt those keys using gpg. Reading
+from /dev/random may take indefinitely long if kernel's random entropy pool
+is empty. If that happens, do some other work on some other console (use
+keyboard, mouse and disks). Use of gpg-encrypted key file depends on
+encrypted swap.
+
+ umask 077
+ head -c 2925 /dev/random | uuencode -m - | head -n 66 | tail -n 65 \
+ | gpg --symmetric -a >/etc/fskey2.gpg
+
+Fill the partition with random looking data. "dd" command may take a while
+to execute if partition is large.
+
+ head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 \
+ | losetup -p 0 -e AES128 /dev/loop0 /dev/hda666
+ dd if=/dev/zero of=/dev/loop0 bs=4k conv=notrunc 2>/dev/null
+ losetup -d /dev/loop0
+
+Add this to your /etc/fstab file:
+
+ /dev/hda666 /mnt666 ext2 defaults,noauto,loop=/dev/loop0,encryption=serpent128,gpgkey=/etc/fskey2.gpg 0 0
+
+The "losetup -F" command asks for passphrase to unlock your key file.
+Losetup -F option reads loop related options from /etc/fstab. Partition name
+/dev/hda666, encryption=serpent128 and gpgkey=/etc/fskey2.gpg come from
+/etc/fstab.
+
+ modprobe loop_serpent
+ losetup -F /dev/loop0
+ mkfs -t ext2 /dev/loop0
+ losetup -d /dev/loop0
+ mkdir /mnt666
+
+Now you should be able to mount the file system like this. The "mount"
+command asks for your encryption password.
+
+ modprobe loop_serpent
+ mount /mnt666
+
+And unmount it like this:
+
+ umount /mnt666
+
+Or without modifying /etc/fstab, you can mount and and unmount file system
+like this:
+
+ modprobe loop_serpent
+ mount -t ext2 /dev/hda666 /mnt666 -o loop=/dev/loop0,encryption=serpent128,gpgkey=/etc/fskey2.gpg
+ umount /mnt666
+
+Or fsck, mount and unmount like this. Losetup -F option reads loop related
+options from /etc/fstab. Partition name /dev/hda666, encryption=serpent128
+and gpgkey=/etc/fskey2.gpg come from /etc/fstab.
+
+ modprobe loop_serpent
+ losetup -F /dev/loop0
+ fsck -t ext2 -f -y /dev/loop0
+ mount -t ext2 /dev/loop0 /mnt666
+ umount /mnt666
+ losetup -d /dev/loop0
8. Security levels
@@ -1421,6 +1574,15 @@
loop.c-2.[46].patched Pre-patched loop.c sources for kernels where
changes are so extensive that distributing
*.original plus *.diff does not make sense.
+
+loop_blowfish.c Loop cipher module that provides blowfish
+ encryption.
+
+loop_serpent.c Loop cipher module that provides serpent
+ encryption.
+
+loop_twofish.c Loop cipher module that provides twofish
+ encryption.
md5-amd64.S Optimized assembler implementation of MD5
transform function for AMD64 and compatible
Modified: upstream/loop-aes/current/build-initrd.sh
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/build-initrd.sh?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/build-initrd.sh (original)
+++ upstream/loop-aes/current/build-initrd.sh Thu May 17 13:32:14 2007
@@ -2,7 +2,7 @@
#
# build-initrd.sh
#
-# Written by Jari Ruusu, January 31 2007
+# Written by Jari Ruusu, May 14 2007
#
# Copyright 2001-2007 by Jari Ruusu.
# Redistribution of this file is permitted under the GNU Public License.
@@ -54,6 +54,11 @@
# lilo
# mkdir /boot/modules-`uname -r`
# cp -p /lib/modules/`uname -r`/block/loop.*o /boot/modules-`uname -r`/
+# or ^^^^^
+# cp -p /lib/modules/`uname -r`/extra/loop.*o /boot/modules-`uname -r`/
+# ^^^^^
+# 2.4 and older kernels always install to block/ directory
+# 2.6 kernels with loop-AES-v3.2a and later install to extra/ directory
#
### All default-values can be altered via the configfile
@@ -413,9 +418,11 @@
#if ${INITIALDELAY}
{
struct timespec req;
+ wrStr("Delaying ${BOOTDEV} mount for ${INITIALDELAY} seconds...\n");
req.tv_sec = ${INITIALDELAY};
req.tv_nsec = 0;
nanosleep(&req, 0);
+ wrStr("...delay complete, continuing\n");
}
#endif
@@ -512,9 +519,11 @@
#if ${MOUNTDELAY}
{
struct timespec req;
+ wrStr("Delaying ${EXTERNALGPGDEV} mount for ${MOUNTDELAY} seconds...\n");
req.tv_sec = ${MOUNTDELAY};
req.tv_nsec = 0;
nanosleep(&req, 0);
+ wrStr("...delay complete, continuing\n");
}
#endif
if(mount("${EXTERNALGPGDEV}", "/mnt", "${EXTERNALGPGTYPE}", MS_MGC_VAL | MS_RDONLY, 0)) {
Modified: upstream/loop-aes/current/dkms.conf
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/dkms.conf?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/dkms.conf (original)
+++ upstream/loop-aes/current/dkms.conf Thu May 17 13:32:14 2007
@@ -1,12 +1,19 @@
# dkms.conf for Dynamic Kernel Module Support
# http://linux.dell.com/dkms/dkms.html for more info
-PACKAGE_VERSION=v3.1f
+PACKAGE_VERSION=v3.2a
+PACKAGE_NAME="loop-AES"
+CLEAN="make clean"
-# Items below here should not have to change with each driver version
-PACKAGE_NAME="loop-AES"
-MAKE[0]="make MODINST=n RUNDM=n LINUX_SOURCE=${kernel_source_dir}"
-CLEAN="make clean"
+MAKE[0]="make MODINST=n LINUX_SOURCE=${kernel_source_dir}"
+#MAKE[0]="make EXTRA_CIPHERS=y MODINST=n LINUX_SOURCE=${kernel_source_dir}"
+
BUILT_MODULE_NAME[0]="loop"
-# WARNING - nonstandard installation location
+#BUILT_MODULE_NAME[1]="loop_twofish"
+#BUILT_MODULE_NAME[2]="loop_serpent"
+#BUILT_MODULE_NAME[3]="loop_blowfish"
+
DEST_MODULE_LOCATION[0]="/kernel/drivers/block"
+#DEST_MODULE_LOCATION[1]="/kernel/drivers/block"
+#DEST_MODULE_LOCATION[2]="/kernel/drivers/block"
+#DEST_MODULE_LOCATION[3]="/kernel/drivers/block"
Copied: upstream/loop-aes/current/gnupg-1.4.7.diff (from r1373, upstream/loop-aes/current/gnupg-1.4.6.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/gnupg-1.4.7.diff?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/gnupg-1.4.6.diff (original)
+++ upstream/loop-aes/current/gnupg-1.4.7.diff Thu May 17 13:32:14 2007
@@ -1,6 +1,6 @@
---- gnupg-1.4.6/g10/gpg.c.old 2006-12-03 17:37:45.000000000 +0200
-+++ gnupg-1.4.6/g10/gpg.c 2006-12-06 21:58:07.000000000 +0200
-@@ -1792,7 +1792,7 @@
+--- gnupg-1.4.7/g10/gpg.c.old 2007-03-05 11:02:57.000000000 +0200
++++ gnupg-1.4.7/g10/gpg.c 2007-03-14 20:13:50.000000000 +0200
+@@ -1795,7 +1795,7 @@
opt.cert_digest_algo = 0;
opt.compress_algo = -1; /* defaults to DEFAULT_COMPRESS_ALGO */
opt.s2k_mode = 3; /* iterated+salted */
Copied: upstream/loop-aes/current/kernel-2.6.21.diff (from r1373, upstream/loop-aes/current/kernel-2.6.20.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/kernel-2.6.21.diff?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/kernel-2.6.20.diff (original)
+++ upstream/loop-aes/current/kernel-2.6.21.diff Thu May 17 13:32:14 2007
@@ -3,9 +3,9 @@
rm -f drivers/block/loop.c include/linux/loop.h
-diff -urN linux-2.6.20-noloop/drivers/block/Kconfig linux-2.6.20-AES/drivers/block/Kconfig
---- linux-2.6.20-noloop/drivers/block/Kconfig 2007-02-06 22:32:11.000000000 +0200
-+++ linux-2.6.20-AES/drivers/block/Kconfig 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/block/Kconfig linux-2.6.21-AES/drivers/block/Kconfig
+--- linux-2.6.21-noloop/drivers/block/Kconfig 2007-04-26 21:14:36.000000000 +0300
++++ linux-2.6.21-AES/drivers/block/Kconfig 2007-04-26 21:35:28.000000000 +0300
@@ -280,14 +280,6 @@
bits of, say, a sound file). This is also safe if the file resides
on a remote file server.
@@ -66,24 +66,25 @@
config BLK_DEV_NBD
tristate "Network block device support"
-diff -urN linux-2.6.20-noloop/drivers/block/Makefile linux-2.6.20-AES/drivers/block/Makefile
---- linux-2.6.20-noloop/drivers/block/Makefile 2007-02-06 22:32:11.000000000 +0200
-+++ linux-2.6.20-AES/drivers/block/Makefile 2007-02-06 22:43:20.000000000 +0200
-@@ -1,6 +1,10 @@
+diff -urN linux-2.6.21-noloop/drivers/block/Makefile linux-2.6.21-AES/drivers/block/Makefile
+--- linux-2.6.21-noloop/drivers/block/Makefile 2007-02-06 22:32:11.000000000 +0200
++++ linux-2.6.21-AES/drivers/block/Makefile 2007-04-29 15:19:08.000000000 +0300
+@@ -1,6 +1,11 @@
#
# Makefile for the kernel block device drivers.
#
+
+CFLAGS_loop.o := $(shell if test -r include/linux/sched.h; then if sed -e '1,/^struct task_struct {$$/ d' include/linux/sched.h | sed -e '/^};$$/,$$ d' | grep -q -s 'struct rlimit rlim.RLIM_NLIMITS.;'; then echo "-DOLD_PER_THREAD_RLIMITS"; fi; fi)
+CFLAGS_loop.o += $(shell if test -r include/linux/timer.h; then if ! sed -e '1,/^struct timer_list {$$/ d' include/linux/timer.h | sed -e '/^};$$/,$$ d' | grep -q -s 'unsigned long data;'; then echo "-DNEW_TIMER_VOID_PTR_PARAM"; fi; fi)
++CFLAGS_loop.o += $(shell if test -r include/linux/buffer_head.h; then if grep -q -s '^void invalidate_bdev.*struct block_device.*int' include/linux/buffer_head.h; then echo "-DOLD_INVALIDATE_BDEV_INTERFACE"; fi; fi)
+
# 12 June 2000, Christoph Hellwig <hch at infradead.org>
# Rewritten to use lists instead of if-statements.
#
-diff -urN linux-2.6.20-noloop/drivers/block/loop.c linux-2.6.20-AES/drivers/block/loop.c
---- linux-2.6.20-noloop/drivers/block/loop.c 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/block/loop.c 2007-02-06 22:43:20.000000000 +0200
-@@ -0,0 +1,2831 @@
+diff -urN linux-2.6.21-noloop/drivers/block/loop.c linux-2.6.21-AES/drivers/block/loop.c
+--- linux-2.6.21-noloop/drivers/block/loop.c 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/block/loop.c 2007-04-29 15:19:08.000000000 +0300
+@@ -0,0 +1,2835 @@
+/*
+ * linux/drivers/block/loop.c
+ *
@@ -2334,7 +2335,11 @@
+ memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
+ memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
+ memset(lo->lo_file_name, 0, LO_NAME_SIZE);
++#if !defined(OLD_INVALIDATE_BDEV_INTERFACE)
++ invalidate_bdev(bdev);
++#else
+ invalidate_bdev(bdev, 0);
++#endif
+ set_capacity(disks[lo->lo_number], 0);
+ if (gfp != -1)
+ mapping_set_gfp_mask(filp->LOOP_COMPAT_F_DENTRY->d_inode->i_mapping, gfp);
@@ -2915,9 +2920,9 @@
+}
+EXPORT_SYMBOL(loop_add_keyscrub_fn);
+#endif
-diff -urN linux-2.6.20-noloop/drivers/misc/Makefile linux-2.6.20-AES/drivers/misc/Makefile
---- linux-2.6.20-noloop/drivers/misc/Makefile 2006-11-30 11:02:39.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/Makefile 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/Makefile linux-2.6.21-AES/drivers/misc/Makefile
+--- linux-2.6.21-noloop/drivers/misc/Makefile 2007-04-26 21:14:48.000000000 +0300
++++ linux-2.6.21-AES/drivers/misc/Makefile 2007-04-26 21:35:28.000000000 +0300
@@ -1,6 +1,28 @@
#
# Makefile for misc devices that really don't fit anywhere else.
@@ -2947,9 +2952,9 @@
obj- := misc.o # Dummy rule to force built-in.o to be made
obj-$(CONFIG_IBM_ASM) += ibmasm/
-diff -urN linux-2.6.20-noloop/drivers/misc/aes-amd64.S linux-2.6.20-AES/drivers/misc/aes-amd64.S
---- linux-2.6.20-noloop/drivers/misc/aes-amd64.S 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/aes-amd64.S 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/aes-amd64.S linux-2.6.21-AES/drivers/misc/aes-amd64.S
+--- linux-2.6.21-noloop/drivers/misc/aes-amd64.S 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/aes-amd64.S 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,893 @@
+//
+// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -3844,9 +3849,9 @@
+ im_data5(v3)
+ im_data6(v3)
+ im_data7(v3)
-diff -urN linux-2.6.20-noloop/drivers/misc/aes-x86.S linux-2.6.20-AES/drivers/misc/aes-x86.S
---- linux-2.6.20-noloop/drivers/misc/aes-x86.S 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/aes-x86.S 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/aes-x86.S linux-2.6.21-AES/drivers/misc/aes-x86.S
+--- linux-2.6.21-noloop/drivers/misc/aes-x86.S 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/aes-x86.S 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,923 @@
+//
+// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -4771,9 +4776,9 @@
+ im_data5(v3)
+ im_data6(v3)
+ im_data7(v3)
-diff -urN linux-2.6.20-noloop/drivers/misc/aes.c linux-2.6.20-AES/drivers/misc/aes.c
---- linux-2.6.20-noloop/drivers/misc/aes.c 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/aes.c 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/aes.c linux-2.6.21-AES/drivers/misc/aes.c
+--- linux-2.6.21-noloop/drivers/misc/aes.c 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/aes.c 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,1479 @@
+// I retain copyright in this code but I encourage its free use provided
+// that I don't carry any responsibility for the results. I am especially
@@ -6254,9 +6259,9 @@
+
+ state_out(out_blk, b0);
+}
-diff -urN linux-2.6.20-noloop/drivers/misc/aes.h linux-2.6.20-AES/drivers/misc/aes.h
---- linux-2.6.20-noloop/drivers/misc/aes.h 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/aes.h 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/aes.h linux-2.6.21-AES/drivers/misc/aes.h
+--- linux-2.6.21-noloop/drivers/misc/aes.h 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/aes.h 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,112 @@
+// I retain copyright in this code but I encourage its free use provided
+// that I don't carry any responsibility for the results. I am especially
@@ -6370,9 +6375,9 @@
+// if their parameters have not changed.
+
+#endif // _AES_H
-diff -urN linux-2.6.20-noloop/drivers/misc/crypto-ksym.c linux-2.6.20-AES/drivers/misc/crypto-ksym.c
---- linux-2.6.20-noloop/drivers/misc/crypto-ksym.c 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/crypto-ksym.c 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/crypto-ksym.c linux-2.6.21-AES/drivers/misc/crypto-ksym.c
+--- linux-2.6.21-noloop/drivers/misc/crypto-ksym.c 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/crypto-ksym.c 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+#include "aes.h"
@@ -6381,9 +6386,9 @@
+EXPORT_SYMBOL(aes_encrypt);
+EXPORT_SYMBOL(aes_decrypt);
+EXPORT_SYMBOL(md5_transform_CPUbyteorder);
-diff -urN linux-2.6.20-noloop/drivers/misc/md5-amd64.S linux-2.6.20-AES/drivers/misc/md5-amd64.S
---- linux-2.6.20-noloop/drivers/misc/md5-amd64.S 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/md5-amd64.S 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/md5-amd64.S linux-2.6.21-AES/drivers/misc/md5-amd64.S
+--- linux-2.6.21-noloop/drivers/misc/md5-amd64.S 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/md5-amd64.S 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,200 @@
+//
+// md5-amd64.S
@@ -6585,9 +6590,9 @@
+ addl %ecx,8(%rdi)
+ addl %edx,12(%rdi)
+ ret
-diff -urN linux-2.6.20-noloop/drivers/misc/md5-x86.S linux-2.6.20-AES/drivers/misc/md5-x86.S
---- linux-2.6.20-noloop/drivers/misc/md5-x86.S 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/md5-x86.S 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/md5-x86.S linux-2.6.21-AES/drivers/misc/md5-x86.S
+--- linux-2.6.21-noloop/drivers/misc/md5-x86.S 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/md5-x86.S 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,207 @@
+//
+// md5-x86.S
@@ -6796,9 +6801,9 @@
+ pop %ebx
+ pop %ebp
+ ret
-diff -urN linux-2.6.20-noloop/drivers/misc/md5.c linux-2.6.20-AES/drivers/misc/md5.c
---- linux-2.6.20-noloop/drivers/misc/md5.c 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/md5.c 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/md5.c linux-2.6.21-AES/drivers/misc/md5.c
+--- linux-2.6.21-noloop/drivers/misc/md5.c 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/md5.c 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,106 @@
+/*
+ * MD5 Message Digest Algorithm (RFC1321).
@@ -6906,9 +6911,9 @@
+ hash[2] += c;
+ hash[3] += d;
+}
-diff -urN linux-2.6.20-noloop/drivers/misc/md5.h linux-2.6.20-AES/drivers/misc/md5.h
---- linux-2.6.20-noloop/drivers/misc/md5.h 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/drivers/misc/md5.h 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/drivers/misc/md5.h linux-2.6.21-AES/drivers/misc/md5.h
+--- linux-2.6.21-noloop/drivers/misc/md5.h 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/drivers/misc/md5.h 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,10 @@
+/* md5.h */
+
@@ -6920,9 +6925,9 @@
+ asmlinkage
+#endif
+extern void md5_transform_CPUbyteorder(u_int32_t *, u_int32_t const *);
-diff -urN linux-2.6.20-noloop/include/linux/loop.h linux-2.6.20-AES/include/linux/loop.h
---- linux-2.6.20-noloop/include/linux/loop.h 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20-AES/include/linux/loop.h 2007-02-06 22:43:20.000000000 +0200
+diff -urN linux-2.6.21-noloop/include/linux/loop.h linux-2.6.21-AES/include/linux/loop.h
+--- linux-2.6.21-noloop/include/linux/loop.h 1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.21-AES/include/linux/loop.h 2007-04-26 21:35:28.000000000 +0300
@@ -0,0 +1,167 @@
+#ifndef _LINUX_LOOP_H
+#define _LINUX_LOOP_H
Modified: upstream/loop-aes/current/loop.c-2.6.patched
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/loop.c-2.6.patched?rev=1396&op=diff
==============================================================================
--- upstream/loop-aes/current/loop.c-2.6.patched (original)
+++ upstream/loop-aes/current/loop.c-2.6.patched Thu May 17 13:32:14 2007
@@ -1542,7 +1542,11 @@
memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
memset(lo->lo_file_name, 0, LO_NAME_SIZE);
+#if !defined(OLD_INVALIDATE_BDEV_INTERFACE)
+ invalidate_bdev(bdev);
+#else
invalidate_bdev(bdev, 0);
+#endif
set_capacity(disks[lo->lo_number], 0);
if (gfp != -1)
mapping_set_gfp_mask(filp->LOOP_COMPAT_F_DENTRY->d_inode->i_mapping, gfp);
More information about the Pkg-loop-aes-commits
mailing list