--- sysutils/pefs-kmod/Makefile (Revision 487040) +++ sysutils/pefs-kmod/Makefile (Arbeitskopie) @@ -3,6 +3,7 @@ PORTNAME= pefs DISTVERSION= 2017-06-20 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= LOCAL/gleb PKGNAMESUFFIX= -kmod --- sysutils/pefs-kmod/files/patch-lib_libpam_modules_Makefile.inc (nicht existent) +++ sysutils/pefs-kmod/files/patch-lib_libpam_modules_Makefile.inc (Arbeitskopie) @@ -0,0 +1,10 @@ +--- lib/libpam/modules/Makefile.inc.orig 2017-06-21 04:37:11 UTC ++++ lib/libpam/modules/Makefile.inc +@@ -1,4 +1,6 @@ + # Include Makefiles from $SRCDIR + +-.include ++LIBDIR=${PREFIX}/lib ++ ++.include <${SYSDIR}/../lib/libpam/modules/Makefile.inc> + --- sysutils/pefs-kmod/files/patch-lib_libpam_modules_pam__pefs_Makefile (nicht existent) +++ sysutils/pefs-kmod/files/patch-lib_libpam_modules_pam__pefs_Makefile (Arbeitskopie) @@ -0,0 +1,9 @@ +--- lib/libpam/modules/pam_pefs/Makefile.orig 2017-06-21 04:37:11 UTC ++++ lib/libpam/modules/pam_pefs/Makefile +@@ -29,3 +29,6 @@ LDADD= -lutil + .PATH: ${SYS}/crypto + .PATH: ${SYS}/crypto/rijndael + .PATH: ${SYS}/crypto/hmac ${SYS}/crypto/pbkdf2 ${SYS}/crypto/sha2 ++ ++# Fix build without OBJDIR for shared components ++.NOPATH: ${OBJS} --- sysutils/pefs-kmod/files/patch-libpam-Makefile (Revision 487040) +++ sysutils/pefs-kmod/files/patch-libpam-Makefile (nicht existent) @@ -1,10 +0,0 @@ ---- lib/libpam/modules/Makefile.inc.orig 2011-12-25 08:01:28.000000000 +0200 -+++ lib/libpam/modules/Makefile.inc 2011-12-25 08:02:17.000000000 +0200 -@@ -1,4 +1,6 @@ - # Include Makefiles from $SRCDIR - --.include -+LIBDIR=${PREFIX}/lib -+ -+.include <${SYSDIR}/../lib/libpam/modules/Makefile.inc> - --- sysutils/pefs-kmod/files/patch-pefs_aesni.h (Revision 487040) +++ sysutils/pefs-kmod/files/patch-pefs_aesni.h (nicht existent) @@ -1,17 +0,0 @@ ---- sys/fs/pefs/pefs_aesni.h.orig -+++ sys/fs/pefs/pefs_aesni.h -@@ -26,6 +26,8 @@ - * $FreeBSD$ - */ - -+#ifdef PEFS_AESNI -+ - #include - - struct pefs_aesni_ctx { -@@ -41,3 +43,5 @@ - u_int fpu_cpuid; - int fpu_saved; - }; -+ -+#endif --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs.h (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs.h (Arbeitskopie) @@ -0,0 +1,12 @@ +--- sys/fs/pefs/pefs.h.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs.h +@@ -140,6 +140,9 @@ int pefs_uninit(struct vfsconf *vfsp); + void pefs_crypto_init(void); + void pefs_crypto_uninit(void); + ++void pefs_zone_dtor_bzero(void *mem, int size, void *arg); ++void pefs_zone_fini_bzero(void *mem, int size); ++ + int pefs_node_get_nokey(struct mount *mp, struct vnode *lvp, + struct vnode **vpp); + int pefs_node_get_haskey(struct mount *mp, struct vnode *lvp, --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__aesni.c (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__aesni.c (Arbeitskopie) @@ -0,0 +1,52 @@ +--- sys/fs/pefs/pefs_aesni.c.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs_aesni.c +@@ -84,7 +84,6 @@ pefs_aesni_keysetup(const struct pefs_session *xses, + const struct pefs_aesni_ses *ses = &xses->o.ps_aesni; + struct pefs_aesni_ctx *ctx = &xctx->o.pctx_aesni; + struct fpu_kern_ctx *tmpctx = NULL; +- int error; + + switch (keybits) { + case 128: +@@ -105,11 +104,7 @@ pefs_aesni_keysetup(const struct pefs_session *xses, + tmpctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL); + if (tmpctx == NULL) + return (ENOMEM); +- error = fpu_kern_enter(curthread, tmpctx, FPU_KERN_NORMAL); +- if (error != 0) { +- fpu_kern_free_ctx(tmpctx); +- return (error); +- } ++ fpu_kern_enter(curthread, tmpctx, FPU_KERN_NORMAL); + } + + aesni_set_enckey(key, ctx->enc_schedule, ctx->rounds); +@@ -156,7 +151,6 @@ static void + pefs_aesni_enter(struct pefs_session *xses) + { + struct pefs_aesni_ses *ses = &xses->o.ps_aesni; +- int error; + + if (is_fpu_kern_thread(0)) { + ses->fpu_saved = 0; +@@ -170,15 +164,12 @@ pefs_aesni_enter(struct pefs_session *xses) + ses->td = curthread; + ses->fpu_cpuid = curcpu; + critical_exit(); +- error = fpu_kern_enter(ses->td, ses->fpu_ctx, FPU_KERN_NORMAL); +- if (error == 0) { +- ses->fpu_saved = 1; +- return; +- } +- DPCPU_ID_SET(ses->fpu_cpuid, pefs_aesni_fpu, ses->fpu_ctx); +- } else ++ fpu_kern_enter(ses->td, ses->fpu_ctx, FPU_KERN_NORMAL); ++ ses->fpu_saved = 1; ++ } else { + critical_exit(); +- ses->fpu_saved = -1; ++ ses->fpu_saved = -1; ++ } + } + + static void --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__aesni.h (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__aesni.h (Arbeitskopie) @@ -0,0 +1,17 @@ +--- sys/fs/pefs/pefs_aesni.h.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs_aesni.h +@@ -26,6 +26,8 @@ + * $FreeBSD$ + */ + ++#ifdef PEFS_AESNI ++ + #include + + struct pefs_aesni_ctx { +@@ -41,3 +43,5 @@ struct pefs_aesni_ses { + u_int fpu_cpuid; + int fpu_saved; + }; ++ ++#endif --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__crypto.c (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__crypto.c (Arbeitskopie) @@ -0,0 +1,22 @@ +--- sys/fs/pefs/pefs_crypto.c.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs_crypto.c +@@ -28,6 +28,7 @@ + __FBSDID("$FreeBSD$"); + + #include ++#include + #include + #include + #include +@@ -100,9 +101,9 @@ void + pefs_crypto_init(void) + { + pefs_ctx_zone = uma_zcreate("pefs_ctx", sizeof(struct pefs_ctx), +- NULL, NULL, NULL, (uma_fini)bzero, UMA_ALIGN_CACHE, 0); ++ NULL, pefs_zone_dtor_bzero, NULL, NULL, UMA_ALIGN_CACHE, 0); + pefs_key_zone = uma_zcreate("pefs_key", sizeof(struct pefs_key), +- NULL, NULL, NULL, (uma_fini)bzero, UMA_ALIGN_PTR, 0); ++ NULL, pefs_zone_dtor_bzero, NULL, NULL, UMA_ALIGN_PTR, 0); + pefs_alg_init(&pefs_alg_aes); + pefs_alg_init(&pefs_alg_camellia); + } --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__dircache.c (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__dircache.c (Arbeitskopie) @@ -0,0 +1,11 @@ +--- sys/fs/pefs/pefs_dircache.c.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs_dircache.c +@@ -124,7 +124,7 @@ pefs_dircache_init(void) + UMA_ALIGN_PTR, 0); + dircache_entry_zone = uma_zcreate("pefs_dircache_entry", + sizeof(struct pefs_dircache_entry), NULL, NULL, NULL, +- (uma_fini) bzero, UMA_ALIGN_PTR, 0); ++ pefs_zone_fini_bzero, UMA_ALIGN_PTR, 0); + + if (dircache_global_enable != 0) { + pefs_dircache_pool_init(&dircache_global); --- sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__subr.c (nicht existent) +++ sysutils/pefs-kmod/files/patch-sys_fs_pefs_pefs__subr.c (Arbeitskopie) @@ -0,0 +1,30 @@ +--- sys/fs/pefs/pefs_subr.c.orig 2017-06-21 04:37:11 UTC ++++ sys/fs/pefs/pefs_subr.c +@@ -96,7 +96,7 @@ pefs_init(struct vfsconf *vfsp) + taskqueue_start_threads(&pefs_taskq, 1, PVFS, "pefs taskq"); + + pefs_node_zone = uma_zcreate("pefs_node", sizeof(struct pefs_node), +- NULL, NULL, NULL, (uma_fini) bzero, UMA_ALIGN_PTR, 0); ++ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + + pefs_nodehash_tbl = hashinit(desiredvnodes / 8, M_PEFSHASH, + &pefs_nodehash_mask); +@@ -121,6 +121,18 @@ pefs_uninit(struct vfsconf *vfsp) + free(pefs_nodehash_tbl, M_PEFSHASH); + uma_zdestroy(pefs_node_zone); + return (0); ++} ++ ++void ++pefs_zone_dtor_bzero(void *mem, int size, void *arg __unused) ++{ ++ explicit_bzero(mem, size); ++} ++ ++void ++pefs_zone_fini_bzero(void *mem, int size) ++{ ++ explicit_bzero(mem, size); + } + + static __inline struct pefs_node_listhead *