From owner-svn-src-head@freebsd.org Mon Jun 18 16:24:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAA161011581; Mon, 18 Jun 2018 16:24:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5980686A5A; Mon, 18 Jun 2018 16:24:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 375AB26830; Mon, 18 Jun 2018 16:24:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5IGOj8n034759; Mon, 18 Jun 2018 16:24:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5IGOgUL034745; Mon, 18 Jun 2018 16:24:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806181624.w5IGOgUL034745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Jun 2018 16:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335321 - in head/stand: . geli i386/gptboot i386/gptzfsboot i386/isoboot i386/loader i386/zfsboot libsa libsa/geli X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . geli i386/gptboot i386/gptzfsboot i386/isoboot i386/loader i386/zfsboot libsa libsa/geli X-SVN-Commit-Revision: 335321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 16:24:46 -0000 Author: imp Date: Mon Jun 18 16:24:42 2018 New Revision: 335321 URL: https://svnweb.freebsd.org/changeset/base/335321 Log: stand: move libgeliboot into libsa. Reduce by 1 the number of crazy libraries we need in stand by moving geli into libsa (where architecturally it belonged all along). This just moves things around without any code changes. Added: head/stand/libsa/geli/ head/stand/libsa/geli/Makefile.inc (contents, props changed) - copied, changed from r335320, head/stand/geli/Makefile head/stand/libsa/geli/geliboot.c (contents, props changed) - copied, changed from r335320, head/stand/geli/geliboot.c head/stand/libsa/geli/geliboot.h (contents, props changed) - copied, changed from r335320, head/stand/geli/geliboot.h head/stand/libsa/geli/geliboot_crypto.c (contents, props changed) - copied, changed from r335320, head/stand/geli/geliboot_crypto.c head/stand/libsa/geli/geliboot_internal.h (contents, props changed) - copied, changed from r335320, head/stand/geli/geliboot_internal.h head/stand/libsa/geli/pwgets.c (contents, props changed) - copied, changed from r335320, head/stand/geli/pwgets.c Deleted: head/stand/geli/Makefile head/stand/geli/Makefile.depend head/stand/geli/geliboot.c head/stand/geli/geliboot.h head/stand/geli/geliboot_crypto.c head/stand/geli/geliboot_internal.h head/stand/geli/pwgets.c Modified: head/stand/Makefile head/stand/defs.mk head/stand/i386/gptboot/Makefile head/stand/i386/gptzfsboot/Makefile head/stand/i386/isoboot/Makefile head/stand/i386/loader/Makefile head/stand/i386/zfsboot/Makefile head/stand/libsa/Makefile Modified: head/stand/Makefile ============================================================================== --- head/stand/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -21,8 +21,6 @@ S.${MK_ZFS}+= zfs S.yes+= defaults S.yes+= man -S.${MK_LOADER_GELI}+= geli - .include S.${MK_EFI}+= efi Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/defs.mk Mon Jun 18 16:24:42 2018 (r335321) @@ -67,8 +67,7 @@ MK_LOADER_GELI=yes .endif .if ${MK_LOADER_GELI} == "yes" CFLAGS+= -DLOADER_GELI_SUPPORT -CFLAGS+= -I${BOOTSRC}/geli -LIBGELIBOOT= ${BOOTOBJ}/geli/libgeliboot.a +CFLAGS+= -I${SASRC}/geli .endif # MK_LOADER_GELI .endif # HAVE_GELI Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/i386/gptboot/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -64,7 +64,7 @@ gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/i386/gptzfsboot/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -75,7 +75,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBZFSBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32} zfsboot.o: ${ZFSSRC}/zfsimpl.c Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/i386/isoboot/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -66,6 +66,6 @@ isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/i386/loader/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -71,8 +71,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} -DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} -LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} +DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32} +LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32} .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -DLOADER_PREFER_AMD64 Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/i386/zfsboot/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -82,7 +82,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBGELIBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32} SRCS= zfsboot.c Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Mon Jun 18 15:37:43 2018 (r335320) +++ head/stand/libsa/Makefile Mon Jun 18 16:24:42 2018 (r335321) @@ -151,4 +151,9 @@ CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 .PATH: ${SYSDIR}/libkern SRCS+= explicit_bzero.c +# Maybe GELI +.if ${MK_LOADER_GELI} == "yes" +.include "${SASRC}/geli/Makefile.inc" +.endif + .include Copied and modified: head/stand/libsa/geli/Makefile.inc (from r335320, head/stand/geli/Makefile) ============================================================================== --- head/stand/geli/Makefile Mon Jun 18 15:37:43 2018 (r335320, copy source) +++ head/stand/libsa/geli/Makefile.inc Mon Jun 18 16:24:42 2018 (r335321) @@ -1,12 +1,10 @@ # $FreeBSD$ -# libgeliboot +# Extra stuff for GELI -DO32=1 +.PATH: ${SASRC}/geli -.include +CFLAGS+= -I${LDRSRC} -LIB= geliboot - # Our password input method SRCS+= pwgets.c @@ -21,10 +19,11 @@ SRCS+= md5c.c # AES implementation from sys/crypto .PATH: ${SYSDIR}/crypto/rijndael -CFLAGS+= -I${LDRSRC} -# Remove asserts -CFLAGS+= -DNDEBUG -SRCS+= rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c +.for i in rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c +# Remove asserts XXX BAD +CFLAGS.${i}+= -DNDEBUG +SRCS+= ${i} +.endfor # local GELI Implementation .PATH: ${SYSDIR}/geom/eli @@ -33,5 +32,3 @@ SRCS+= geliboot_crypto.c g_eli_hmac.c g_eli_key.c g_e # aes .PATH: ${SYSDIR}/opencrypto SRCS+= xform_aes_xts.c - -.include Copied and modified: head/stand/libsa/geli/geliboot.c (from r335320, head/stand/geli/geliboot.c) ============================================================================== Copied and modified: head/stand/libsa/geli/geliboot.h (from r335320, head/stand/geli/geliboot.h) ============================================================================== Copied and modified: head/stand/libsa/geli/geliboot_crypto.c (from r335320, head/stand/geli/geliboot_crypto.c) ============================================================================== --- head/stand/geli/geliboot_crypto.c Mon Jun 18 15:37:43 2018 (r335320, copy source) +++ head/stand/libsa/geli/geliboot_crypto.c Mon Jun 18 16:24:42 2018 (r335321) @@ -71,7 +71,7 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size } if (datasize != (blks / 8)) { printf("Failed to decrypt the entire input: " - "%u != %u\n", blks, datasize); + "%u != %zu\n", blks, datasize); return (1); } break; Copied and modified: head/stand/libsa/geli/geliboot_internal.h (from r335320, head/stand/geli/geliboot_internal.h) ============================================================================== Copied and modified: head/stand/libsa/geli/pwgets.c (from r335320, head/stand/geli/pwgets.c) ==============================================================================