Hi!
From: Darran Hunt <dar...@netbsd.org> Date: Wed, 25 Mar 2009 01:26:14 +0000 > Module Name: src > Committed By: darran > Date: Wed Mar 25 01:26:13 UTC 2009 > > Modified Files: > src/sys/lib/libkern: Makefile.libkern libkern.h > src/sys/lib/libkern/arch/i386: Makefile.inc > src/sys/net: zlib.h > src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h cryptosoft.c > cryptosoft.h cryptosoft_xform.c deflate.c deflate.h > files.opencrypto xform.c xform.h > Added Files: > src/sys/lib/libkern: crc32.c crc32.h > src/sys/opencrypto: ocryptodev.c ocryptodev.h > > Log Message: > Fixes PR kern/41069 and PR kern/41070. > > Extends the Opencrypto API to allow the destination buffer size to be > specified when its not the same size as the input buffer (i.e. for > operations like compress and decompress). > The crypto_op and crypt_n_op structures gain a u_int dst_len field. > The session_op structure gains a comp_alg field to specify a compression > algorithm. > Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION, CIOCCRYPT, > and CIOCNCRYPTM. > Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION, > OCIOCCRYPT, and OCIOCNCRYPTM. > > Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which > implement the original ioctls and set dst_len and comp_alg to 0. > > Adds user-space access to compression features. > > Adds software gzip support (CRYPTO_GZIP_COMP). > > Adds the fast version of crc32 from zlib to libkern. This should be generally > useful and provide a place to start normalizing the various crc32 routines > in the kernel. The crc32 routine is used in this patch to support GZIP. > > With input and support from t...@netbsd.org. I look the warning message 'cast from pointer to integer of different size' on my amd64 when rebuilding the kernel after this change perhaps. # compile kern/crc32.o cc -mcmodel=kernel -mno-red-zone -ffreestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Werror -I../../../../../../lib/libkern/arch/x86_64 -Damd64 -Dx86_64 -I../../. -I../../../../../../../common/include -I../../../../../../arch -I../../../../../.. -nostdinc -DPCMCIACISDEBUG -DRBUS_IO_BASE="0xb000" -DRBUS_IO_SIZE="0x3000" -DRBUS_MIN_START="0xf8a00000" -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -I../../../../../../lib/libkern/../../../common/lib/libc/quad -I../../../../../../lib/libkern/../../../common/lib/libc/string -I../../../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/string -I../../../../../../external/isc/atheros_hal/dist -I../../../../../../external/isc/a! theros_hal/ic -I../../../../../../dev/drm -I../../../../../../../common/include -I../../../../../../dev/pci/drm -I../../../../../../lib/libkern/../../../common/lib/libc/quad -I../../../../../../lib/libkern/../../../common/lib/libc/string -I../../../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/string -I../../../../../../lib/libkern/../../../common/include -c ../../../../../../lib/libkern/crc32.c -o crc32.o cc1: warnings being treated as errors ../../../../../../lib/libkern/crc32.c: In function 'crc32': ../../../../../../lib/libkern/crc32.c:55: warning: cast from pointer to integer of different size *** Error code 1 Please fix. Thanks, -- kiyohara