From owner-svn-src-user@freebsd.org Mon Aug 22 01:43:52 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA09BBC1ED4 for ; Mon, 22 Aug 2016 01:43:52 +0000 (UTC) (envelope-from markj@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 mx1.freebsd.org (Postfix) with ESMTPS id 5B8BF171B; Mon, 22 Aug 2016 01:43:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7M1hpLV079602; Mon, 22 Aug 2016 01:43:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7M1hmxJ079565; Mon, 22 Aug 2016 01:43:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608220143.u7M1hmxJ079565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 Aug 2016 01:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304578 - in user/alc/PQ_LAUNDRY: . cddl/contrib/opensolaris/lib/libzfs/common contrib/dma contrib/llvm/lib/Target/ARM/MCTargetDesc etc lib/clang lib/libc/sys libexec/dma release/doc/en... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 01:43:52 -0000 Author: markj Date: Mon Aug 22 01:43:47 2016 New Revision: 304578 URL: https://svnweb.freebsd.org/changeset/base/304578 Log: MFH r304577 Added: user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_vdso.lds - copied unchanged from r304577, head/sys/compat/cloudabi/cloudabi_vdso.lds user/alc/PQ_LAUNDRY/sys/compat/cloudabi32/ - copied from r304577, head/sys/compat/cloudabi32/ user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi32_types.h - copied unchanged from r304577, head/sys/contrib/cloudabi/cloudabi32_types.h user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S - copied unchanged from r304577, head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S - copied unchanged from r304577, head/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/syscalls32.master - copied unchanged from r304577, head/sys/contrib/cloudabi/syscalls32.master user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/syscalls64.master - copied unchanged from r304577, head/sys/contrib/cloudabi/syscalls64.master Deleted: user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/ie.4 user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/wl.4 user/alc/PQ_LAUNDRY/share/man/man4/scd.4 user/alc/PQ_LAUNDRY/share/man/man4/si.4 user/alc/PQ_LAUNDRY/share/man/man4/spic.4 user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_vdso.lds.s user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_aarch64.c user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_x86_64.c user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/syscalls.master user/alc/PQ_LAUNDRY/sys/dev/ie/ user/alc/PQ_LAUNDRY/sys/dev/scd/ user/alc/PQ_LAUNDRY/sys/dev/si/ user/alc/PQ_LAUNDRY/sys/dev/wds/ user/alc/PQ_LAUNDRY/sys/dev/wl/ user/alc/PQ_LAUNDRY/sys/i386/isa/spic.c user/alc/PQ_LAUNDRY/sys/i386/isa/spicreg.h user/alc/PQ_LAUNDRY/sys/modules/ie/ user/alc/PQ_LAUNDRY/sys/modules/scd/ user/alc/PQ_LAUNDRY/sys/modules/si/ user/alc/PQ_LAUNDRY/sys/modules/wds/ user/alc/PQ_LAUNDRY/sys/modules/wl/ user/alc/PQ_LAUNDRY/tools/kerneldoc/subsys/Doxyfile-dev_mcd user/alc/PQ_LAUNDRY/tools/kerneldoc/subsys/Doxyfile-dev_scd user/alc/PQ_LAUNDRY/tools/kerneldoc/subsys/Doxyfile-dev_si user/alc/PQ_LAUNDRY/tools/kerneldoc/subsys/Doxyfile-dev_wds user/alc/PQ_LAUNDRY/tools/kerneldoc/subsys/Doxyfile-dev_wl user/alc/PQ_LAUNDRY/usr.sbin/sicontrol/ user/alc/PQ_LAUNDRY/usr.sbin/wlconfig/ Modified: user/alc/PQ_LAUNDRY/ObsoleteFiles.inc user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c user/alc/PQ_LAUNDRY/contrib/dma/VERSION user/alc/PQ_LAUNDRY/contrib/dma/dma-mbox-create.c user/alc/PQ_LAUNDRY/contrib/dma/dma.c user/alc/PQ_LAUNDRY/contrib/dma/dma.h user/alc/PQ_LAUNDRY/contrib/dma/dns.c user/alc/PQ_LAUNDRY/contrib/dma/local.c user/alc/PQ_LAUNDRY/contrib/dma/net.c user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp user/alc/PQ_LAUNDRY/etc/devd.conf user/alc/PQ_LAUNDRY/lib/clang/freebsd_cc_version.h user/alc/PQ_LAUNDRY/lib/libc/sys/aio_fsync.2 user/alc/PQ_LAUNDRY/lib/libc/sys/aio_mlock.2 user/alc/PQ_LAUNDRY/lib/libc/sys/aio_read.2 user/alc/PQ_LAUNDRY/lib/libc/sys/aio_write.2 user/alc/PQ_LAUNDRY/libexec/dma/Makefile.inc user/alc/PQ_LAUNDRY/release/doc/en_US.ISO8859-1/hardware/article.xml user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 user/alc/PQ_LAUNDRY/share/man/man4/Makefile user/alc/PQ_LAUNDRY/share/man/man4/alc.4 user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/Makefile user/alc/PQ_LAUNDRY/sys/amd64/conf/NOTES user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner user/alc/PQ_LAUNDRY/sys/arm/allwinner/if_emac.c user/alc/PQ_LAUNDRY/sys/arm/arm/elf_trampoline.c user/alc/PQ_LAUNDRY/sys/boot/common/boot.c user/alc/PQ_LAUNDRY/sys/boot/common/bootstrap.h user/alc/PQ_LAUNDRY/sys/boot/common/commands.c user/alc/PQ_LAUNDRY/sys/boot/common/interp.c user/alc/PQ_LAUNDRY/sys/boot/common/ls.c user/alc/PQ_LAUNDRY/sys/boot/common/module.c user/alc/PQ_LAUNDRY/sys/boot/efi/loader/arch/amd64/framebuffer.c user/alc/PQ_LAUNDRY/sys/boot/fdt/fdt_loader_cmd.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_clock.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_thread.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/Makefile user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_fd.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_poll.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_proto.h user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_sock.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_syscall.h user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_syscalls.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_sysent.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_systrace_args.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_util.h user/alc/PQ_LAUNDRY/sys/conf/NOTES user/alc/PQ_LAUNDRY/sys/conf/files user/alc/PQ_LAUNDRY/sys/conf/files.amd64 user/alc/PQ_LAUNDRY/sys/conf/files.arm64 user/alc/PQ_LAUNDRY/sys/conf/files.i386 user/alc/PQ_LAUNDRY/sys/conf/options user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi64_types.h user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_types.h user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_types_common.h user/alc/PQ_LAUNDRY/sys/dev/ahci/ahci_pci.c user/alc/PQ_LAUNDRY/sys/dev/alc/if_alc.c user/alc/PQ_LAUNDRY/sys/dev/alc/if_alcreg.h user/alc/PQ_LAUNDRY/sys/dev/cxgbe/common/common.h user/alc/PQ_LAUNDRY/sys/dev/cxgbe/common/t4_hw.c user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_main.c user/alc/PQ_LAUNDRY/sys/dev/ixl/if_ixlv.c user/alc/PQ_LAUNDRY/sys/dev/pci/pci.c user/alc/PQ_LAUNDRY/sys/dev/usb/input/ukbd.c user/alc/PQ_LAUNDRY/sys/i386/conf/NOTES user/alc/PQ_LAUNDRY/sys/kern/kern_fork.c user/alc/PQ_LAUNDRY/sys/kern/kern_prot.c user/alc/PQ_LAUNDRY/sys/kern/sys_process.c user/alc/PQ_LAUNDRY/sys/kern/vfs_vnops.c user/alc/PQ_LAUNDRY/sys/mips/mips/elf_machdep.c user/alc/PQ_LAUNDRY/sys/modules/Makefile user/alc/PQ_LAUNDRY/sys/modules/cloudabi64/Makefile user/alc/PQ_LAUNDRY/sys/netinet/ip_ipsec.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_usrreq.c user/alc/PQ_LAUNDRY/sys/netinet/sctputil.c user/alc/PQ_LAUNDRY/sys/netinet/udp_usrreq.c user/alc/PQ_LAUNDRY/sys/netinet6/ip6_ipsec.c user/alc/PQ_LAUNDRY/sys/netinet6/udp6_usrreq.c user/alc/PQ_LAUNDRY/sys/pc98/conf/NOTES user/alc/PQ_LAUNDRY/sys/powerpc/booke/locore.S user/alc/PQ_LAUNDRY/sys/security/audit/audit.h user/alc/PQ_LAUNDRY/sys/security/audit/audit_bsm.c user/alc/PQ_LAUNDRY/sys/sparc64/conf/NOTES user/alc/PQ_LAUNDRY/sys/sys/proc.h user/alc/PQ_LAUNDRY/targets/pseudo/userland/Makefile.depend user/alc/PQ_LAUNDRY/tools/build/mk/OptionalObsoleteFiles.inc user/alc/PQ_LAUNDRY/usr.bin/truss/syscalls.c user/alc/PQ_LAUNDRY/usr.sbin/Makefile.amd64 user/alc/PQ_LAUNDRY/usr.sbin/Makefile.i386 user/alc/PQ_LAUNDRY/usr.sbin/cron/cron/cron.8 user/alc/PQ_LAUNDRY/usr.sbin/cron/cron/cron.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/cddl/ (props changed) user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/ (props changed) user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/lib/libzfs/ (props changed) user/alc/PQ_LAUNDRY/contrib/dma/ (props changed) user/alc/PQ_LAUNDRY/contrib/llvm/ (props changed) Modified: user/alc/PQ_LAUNDRY/ObsoleteFiles.inc ============================================================================== --- user/alc/PQ_LAUNDRY/ObsoleteFiles.inc Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/ObsoleteFiles.inc Mon Aug 22 01:43:47 2016 (r304578) @@ -38,6 +38,20 @@ # xargs -n1 | sort | uniq -d; # done +# 20160819: Remove ie(4) +OLD_FILES+=usr/share/man/man4/i386/ie.4.gz +# 20160819: Remove spic(4) +OLD_FILES+=usr/share/man/man4/spic.4.gz +# 20160819: Remove wl(4) and wlconfig(8) +OLD_FILES+=usr/share/man/man4/i386/wl.4.gz +OLD_FILES+=usr/sbin/wlconfig +OLD_FILES+=usr/share/man/man8/i386/wlconfig.8.gz +# 20160819: Remove si(4) and sicontrol(8) +OLD_FILES+=usr/share/man/man4/si.4.gz +OLD_FILES+=usr/sbin/sicontrol +OLD_FILES+=usr/share/man/man8/sicontrol.8.gz +# 20160819: Remove scd(4) +OLD_FILES+=usr/share/man/man4/scd.4.gz # 20160815: Remove mcd(4) OLD_FILES+=usr/share/man/man4/mcd.4.gz # 20160703: POSIXify locales with variants Modified: user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Aug 22 01:43:47 2016 (r304578) @@ -1630,12 +1630,17 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl assert(cl_idx < nvl_len); /* * We don't want to unmount & remount the dataset when changing - * its canmount property to 'on' or 'noauto'. We only use - * the changelist logic to unmount when setting canmount=off. + * its canmount property. We only use the changelist logic to + * unmount when setting canmount=off for a mounted filesystem + * or when setting canmount=on for an unmounted filesystem. + * For all other changes to canmount property the filesystem + * remains the same. */ if (prop != ZFS_PROP_CANMOUNT || (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && - zfs_is_mounted(zhp, NULL))) { + zfs_is_mounted(zhp, NULL)) || + (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON && + !zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; Modified: user/alc/PQ_LAUNDRY/contrib/dma/VERSION ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/VERSION Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/VERSION Mon Aug 22 01:43:47 2016 (r304578) @@ -1 +1 @@ -v0.10 +v0.11 Modified: user/alc/PQ_LAUNDRY/contrib/dma/dma-mbox-create.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/dma-mbox-create.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/dma-mbox-create.c Mon Aug 22 01:43:47 2016 (r304578) @@ -142,7 +142,7 @@ main(int argc, char **argv) logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); } - f = open(fn, O_RDONLY|O_CREAT, 0600); + f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); if (f < 0) logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); Modified: user/alc/PQ_LAUNDRY/contrib/dma/dma.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/dma.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/dma.c Mon Aug 22 01:43:47 2016 (r304578) @@ -321,7 +321,7 @@ deliver(struct qitem *it) snprintf(errmsg, sizeof(errmsg), "unknown bounce reason"); retry: - syslog(LOG_INFO, "trying delivery"); + syslog(LOG_INFO, "<%s> trying delivery", it->addr); if (it->remote) error = deliver_remote(it); @@ -331,7 +331,7 @@ retry: switch (error) { case 0: delqueue(it); - syslog(LOG_INFO, "delivery successful"); + syslog(LOG_INFO, "<%s> delivery successful", it->addr); exit(EX_OK); case 1: Modified: user/alc/PQ_LAUNDRY/contrib/dma/dma.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/dma.h Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/dma.h Mon Aug 22 01:43:47 2016 (r304578) @@ -49,7 +49,7 @@ #define VERSION "DragonFly Mail Agent " DMA_VERSION #define BUF_SIZE 2048 -#define ERRMSG_SIZE 200 +#define ERRMSG_SIZE 1024 #define USERNAME_SIZE 50 #define MIN_RETRY 300 /* 5 minutes */ #define MAX_RETRY (3*60*60) /* retry at least every 3 hours */ Modified: user/alc/PQ_LAUNDRY/contrib/dma/dns.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/dns.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/dns.c Mon Aug 22 01:43:47 2016 (r304578) @@ -34,6 +34,7 @@ */ #include +#include #include #include #include Modified: user/alc/PQ_LAUNDRY/contrib/dma/local.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/local.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/local.c Mon Aug 22 01:43:47 2016 (r304578) @@ -196,7 +196,7 @@ retry: goto out; } - error = snprintf(line, sizeof(line), "%sFrom %s\t%s", newline, sender, ctime(&now)); + error = snprintf(line, sizeof(line), "%sFrom %s %s", newline, sender, ctime(&now)); if (error < 0 || (size_t)error >= sizeof(line)) { syslog(LOG_NOTICE, "local delivery deferred: can not write header: %m"); goto out; Modified: user/alc/PQ_LAUNDRY/contrib/dma/net.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/dma/net.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/dma/net.c Mon Aug 22 01:43:47 2016 (r304578) @@ -372,11 +372,13 @@ deliver_to_host(struct qitem *it, struct host->host, host->addr, c, neterr); \ snprintf(errmsg, sizeof(errmsg), "%s [%s] did not like our %s:\n%s", \ host->host, host->addr, c, neterr); \ - return (-1); \ + error = -1; \ + goto out; \ } else if (res != exp) { \ syslog(LOG_NOTICE, "remote delivery deferred: %s [%s] failed after %s: %s", \ host->host, host->addr, c, neterr); \ - return (1); \ + error = 1; \ + goto out; \ } /* Check first reply from remote host */ @@ -426,7 +428,8 @@ deliver_to_host(struct qitem *it, struct syslog(LOG_ERR, "remote delivery failed:" " SMTP login failed: %m"); snprintf(errmsg, sizeof(errmsg), "SMTP login to %s failed", host->host); - return (-1); + error = -1; + goto out; } /* SMTP login is not available, so try without */ else if (error > 0) { Modified: user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Mon Aug 22 01:43:47 2016 (r304578) @@ -90,6 +90,7 @@ const MCFixupKindInfo &ARMAsmBackend::ge {"fixup_arm_movw_lo16", 0, 20, 0}, {"fixup_t2_movt_hi16", 0, 20, 0}, {"fixup_t2_movw_lo16", 0, 20, 0}, + {"fixup_arm_mod_imm", 0, 12, 0}, }; const static MCFixupKindInfo InfosBE[ARM::NumTargetFixupKinds] = { // This table *must* be in the order that the fixup_* kinds are defined in @@ -133,6 +134,7 @@ const MCFixupKindInfo &ARMAsmBackend::ge {"fixup_arm_movw_lo16", 12, 20, 0}, {"fixup_t2_movt_hi16", 12, 20, 0}, {"fixup_t2_movw_lo16", 12, 20, 0}, + {"fixup_arm_mod_imm", 20, 12, 0}, }; if (Kind < FirstTargetFixupKind) @@ -624,6 +626,13 @@ unsigned ARMAsmBackend::adjustFixupValue return Value; } + case ARM::fixup_arm_mod_imm: + Value = ARM_AM::getSOImmVal(Value); + if (Ctx && Value >> 12) { + Ctx->reportError(Fixup.getLoc(), "out of range immediate fixup value"); + return 0; + } + return Value; } } @@ -690,6 +699,7 @@ static unsigned getFixupKindNumBytes(uns case FK_Data_2: case ARM::fixup_arm_thumb_br: case ARM::fixup_arm_thumb_cb: + case ARM::fixup_arm_mod_imm: return 2; case ARM::fixup_arm_pcrel_10_unscaled: @@ -766,6 +776,7 @@ static unsigned getFixupKindContainerSiz case ARM::fixup_arm_movw_lo16: case ARM::fixup_t2_movt_hi16: case ARM::fixup_t2_movw_lo16: + case ARM::fixup_arm_mod_imm: // Instruction size is 4 bytes. return 4; } Modified: user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h Mon Aug 22 01:43:47 2016 (r304578) @@ -100,6 +100,9 @@ enum Fixups { fixup_t2_movt_hi16, // :upper16: fixup_t2_movw_lo16, // :lower16: + // fixup_arm_mod_imm - Fixup for mod_imm + fixup_arm_mod_imm, + // Marker LastTargetFixupKind, NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind Modified: user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Mon Aug 22 01:43:47 2016 (r304578) @@ -312,12 +312,8 @@ public: // Support for fixups (MCFixup) if (MO.isExpr()) { const MCExpr *Expr = MO.getExpr(); - // In instruction code this value always encoded as lowest 12 bits, - // so we don't have to perform any specific adjustments. - // Due to requirements of relocatable records we have to use FK_Data_4. - // See ARMELFObjectWriter::ExplicitRelSym and - // ARMELFObjectWriter::GetRelocTypeInner for more details. - MCFixupKind Kind = MCFixupKind(FK_Data_4); + // Fixups resolve to plain values that need to be encoded. + MCFixupKind Kind = MCFixupKind(ARM::fixup_arm_mod_imm); Fixups.push_back(MCFixup::create(0, Expr, Kind, MI.getLoc())); return 0; } Modified: user/alc/PQ_LAUNDRY/etc/devd.conf ============================================================================== --- user/alc/PQ_LAUNDRY/etc/devd.conf Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/etc/devd.conf Mon Aug 22 01:43:47 2016 (r304578) @@ -19,8 +19,8 @@ options { # Setup some shorthand for regex that we use later in the file. #XXX Yes, these are gross -- imp set scsi-controller-regex - "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\ - esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\ + "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ + esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm)\ [0-9]+"; set wifi-driver-regex "(ath|bwi|bwn|ipw|iwi|iwm|iwn|malo|mwl|ral|rsu|rum|run|uath|\ Modified: user/alc/PQ_LAUNDRY/lib/clang/freebsd_cc_version.h ============================================================================== --- user/alc/PQ_LAUNDRY/lib/clang/freebsd_cc_version.h Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/lib/clang/freebsd_cc_version.h Mon Aug 22 01:43:47 2016 (r304578) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1200001 +#define FREEBSD_CC_VERSION 1200002 Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/aio_fsync.2 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/sys/aio_fsync.2 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/lib/libc/sys/aio_fsync.2 Mon Aug 22 01:43:47 2016 (r304578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd August 19, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -74,16 +74,14 @@ the call returns without having enqueued .Pp The .Fa iocb->aio_sigevent -structure can be used to request notification of the request's +structure can be used to request notification of the operation's completion as described in .Xr aio 4 . .Sh RESTRICTIONS -The asynchronous I/O Control Block structure pointed to by +The Asynchronous I/O Control Block structure pointed to by .Fa iocb must remain valid until the operation has completed. -For this reason, use of auto (stack) variables -for these objects is discouraged. .Pp The asynchronous I/O control buffer .Fa iocb @@ -91,9 +89,8 @@ should be zeroed before the .Fn aio_fsync call to avoid passing bogus context information to the kernel. .Pp -Modifications of the Asynchronous I/O Control Block structure or the -buffer contents after the request has been enqueued, but before the -request has completed, are not allowed. +Modification of the Asynchronous I/O Control Block structure is not allowed +while the request is queued. .Sh RETURN VALUES .Rv -std aio_fsync .Sh ERRORS Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/aio_mlock.2 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/sys/aio_mlock.2 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/lib/libc/sys/aio_mlock.2 Mon Aug 22 01:43:47 2016 (r304578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd August 19, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -67,7 +67,7 @@ then the call returns without having enq .Pp The .Fa iocb->aio_sigevent -structure can be used to request notification of the request's +structure can be used to request notification of the operation's completion as described in .Xr aio 4 . .Sh RESTRICTIONS @@ -77,8 +77,6 @@ and the buffer that the .Fa iocb->aio_buf member of that structure references must remain valid until the operation has completed. -For this reason, use of auto (stack) variables -for these objects is discouraged. .Pp The asynchronous I/O control buffer .Fa iocb @@ -87,8 +85,8 @@ should be zeroed before the call to avoid passing bogus context information to the kernel. .Pp Modifications of the Asynchronous I/O Control Block structure or the -buffer contents after the request has been enqueued, but before the -request has completed, are not allowed. +memory mapping described by the virtual address range are not allowed +while the request is queued. .Sh RETURN VALUES .Rv -std aio_mlock .Sh ERRORS Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/aio_read.2 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/sys/aio_read.2 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/lib/libc/sys/aio_read.2 Mon Aug 22 01:43:47 2016 (r304578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd August 19, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -82,7 +82,7 @@ not be referenced after the request is e .Pp The .Fa iocb->aio_sigevent -structure can be used to request notification of the request's +structure can be used to request notification of the operation's completion as described in .Xr aio 4 . .Sh RESTRICTIONS @@ -92,8 +92,6 @@ and the buffer that the .Fa iocb->aio_buf member of that structure references must remain valid until the operation has completed. -For this reason, use of auto (stack) variables -for these objects is discouraged. .Pp The asynchronous I/O control buffer .Fa iocb @@ -102,8 +100,7 @@ should be zeroed before the call to avoid passing bogus context information to the kernel. .Pp Modifications of the Asynchronous I/O Control Block structure or the -buffer contents after the request has been enqueued, but before the -request has completed, are not allowed. +buffer contents are not allowed while the request is queued. .Pp If the file offset in .Fa iocb->aio_offset Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/aio_write.2 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/sys/aio_write.2 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/lib/libc/sys/aio_write.2 Mon Aug 22 01:43:47 2016 (r304578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd August 19, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -88,7 +88,7 @@ be referenced after the request is enque .Pp The .Fa iocb->aio_sigevent -structure can be used to request notification of the request's +structure can be used to request notification of the operation's completion as described in .Xr aio 4 . .Sh RESTRICTIONS @@ -98,8 +98,6 @@ and the buffer that the .Fa iocb->aio_buf member of that structure references must remain valid until the operation has completed. -For this reason, use of auto (stack) variables -for these objects is discouraged. .Pp The asynchronous I/O control buffer .Fa iocb @@ -108,8 +106,7 @@ should be zeroed before the system call to avoid passing bogus context information to the kernel. .Pp Modifications of the Asynchronous I/O Control Block structure or the -buffer contents after the request has been enqueued, but before the -request has completed, are not allowed. +buffer contents are not allowed while the request is queued. .Pp If the file offset in .Fa iocb->aio_offset Modified: user/alc/PQ_LAUNDRY/libexec/dma/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/libexec/dma/Makefile.inc Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/libexec/dma/Makefile.inc Mon Aug 22 01:43:47 2016 (r304578) @@ -7,7 +7,7 @@ DMA_SOURCES= ${.CURDIR}/../../../contrib CFLAGS+= -I${DMA_SOURCES} \ -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ -DCONF_PATH='"/etc/dma"' \ - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.10"' \ + -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.11+"' \ -DDMA_ROOT_USER='"mailnull"' \ -DDMA_GROUP='"mail"' BINGRP= mail Modified: user/alc/PQ_LAUNDRY/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- user/alc/PQ_LAUNDRY/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Aug 22 01:43:47 2016 (r304578) @@ -751,9 +751,6 @@ &hwlist.vpo; - [&arch.i386;] The wds(4) driver supports the WD7000 SCSI - controller. - With all supported SCSI controllers, full support is provided for SCSI-I, SCSI-II, and SCSI-III peripherals, including hard disks, optical disks, tape drives (including @@ -775,23 +772,9 @@ - [&arch.i386;] Sony proprietary interface (all models) - (&man.scd.4;) - - - ATAPI IDE interface (&man.acd.4;) - - [&arch.i386;] The following device is unmaintained: - - - - Mitsumi proprietary CD-ROM interface (all models) - (&man.mcd.4;) - - @@ -853,8 +836,6 @@ &hwlist.hme; - &hwlist.ie; - &hwlist.igb; &hwlist.ipheth; @@ -1040,9 +1021,6 @@ Intersil PRISM-2.5, Intersil Prism-3, and Symbol Spectrum24 chipsets (&man.wi.4; driver) - [&arch.i386;] NCR / AT&T / Lucent Technologies WaveLan - T1-speed ISA/radio LAN cards (&man.wl.4; driver) - [&arch.i386;, &arch.amd64;] Intel PRO/Wireless 3945ABG MiniPCI network adapters (&man.wpi.4; driver) @@ -1238,13 +1216,6 @@ &hwlist.rc; - [&arch.i386;, &arch.amd64;] Specialix SI/XIO/SX multiport - serial cards, with both the older SIHOST2.x and the - enhanced (transputer based, aka JET) host cards - (ISA, EISA and PCI) are supported. Note that the newer SX+ - PCI cards are not currently supported. (&man.si.4; - driver) - [&arch.pc98;] Internel serial interfaces (&man.sio.4; driver) Modified: user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 ============================================================================== --- user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 Mon Aug 22 01:43:47 2016 (r304578) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2016 +.Dd August 21, 2016 .Dt IPFW 8 .Os .Sh NAME @@ -1588,8 +1588,7 @@ Matches IPv4 packets whose precedence fi .It Cm ipsec Matches packets that have IPSEC history associated with them (i.e., the packet comes encapsulated in IPSEC, the kernel -has IPSEC support and IPSEC_FILTERTUNNEL option, and can correctly -decapsulate it). +has IPSEC support, and can correctly decapsulate it). .Pp Note that specifying .Cm ipsec Modified: user/alc/PQ_LAUNDRY/share/man/man4/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/share/man/man4/Makefile Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/share/man/man4/Makefile Mon Aug 22 01:43:47 2016 (r304578) @@ -441,7 +441,6 @@ MAN= aac.4 \ sbp.4 \ sbp_targ.4 \ scc.4 \ - scd.4 \ sched_4bsd.4 \ sched_ule.4 \ screen.4 \ @@ -454,7 +453,6 @@ MAN= aac.4 \ sf.4 \ ${_sfxge.4} \ sge.4 \ - si.4 \ siba.4 \ siftr.4 \ siis.4 \ @@ -498,7 +496,6 @@ MAN= aac.4 \ snd_via82c686.4 \ snd_vibes.4 \ snp.4 \ - spic.4 \ ${_spkr.4} \ splash.4 \ sppp.4 \ Modified: user/alc/PQ_LAUNDRY/share/man/man4/alc.4 ============================================================================== --- user/alc/PQ_LAUNDRY/share/man/man4/alc.4 Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/share/man/man4/alc.4 Mon Aug 22 01:43:47 2016 (r304578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd August 22, 2016 .Dt ALC 4 .Os .Sh NAME @@ -122,6 +122,8 @@ Atheros AR8171 PCI Express Gigabit Ether Atheros AR8172 PCI Express Fast Ethernet controller .It Killer E2200 Gigabit Ethernet controller +.It +Killer E2400 Gigabit Ethernet controller .El .Sh LOADER TUNABLES Tunables can be set at the Modified: user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/Makefile Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/share/man/man4/man4.i386/Makefile Mon Aug 22 01:43:47 2016 (r304578) @@ -16,7 +16,6 @@ MAN= aic.4 \ fe.4 \ glxiic.4 \ glxsb.4 \ - ie.4 \ longrun.4 \ mse.4 \ npx.4 \ @@ -31,8 +30,7 @@ MAN= aic.4 \ streams.4 \ svr4.4 \ vpd.4 \ - vx.4 \ - wl.4 + vx.4 MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4 MLINKS+=pae.4 PAE.4 Modified: user/alc/PQ_LAUNDRY/sys/amd64/conf/NOTES ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/conf/NOTES Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/amd64/conf/NOTES Mon Aug 22 01:43:47 2016 (r304578) @@ -542,7 +542,6 @@ hint.pbio.0.port="0x360" device smbios device vpd device asmc -device si device tpm device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner Mon Aug 22 01:43:47 2016 (r304578) @@ -15,7 +15,6 @@ arm/allwinner/aw_if_dwc.c optional dwc arm/allwinner/aw_rsb.c optional rsb arm/allwinner/aw_rtc.c standard arm/allwinner/aw_wdog.c standard -arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/aw_machdep.c standard arm/allwinner/aw_mp.c optional smp arm/allwinner/axp209.c optional axp209 Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/if_emac.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/if_emac.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/if_emac.c Mon Aug 22 01:43:47 2016 (r304578) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -167,12 +168,17 @@ static void emac_get_hwaddr(struct emac_softc *sc, uint8_t *hwaddr) { uint32_t val0, val1, rnd; + u_char rootkey[16]; /* * Try to get MAC address from running hardware. * If there is something non-zero there just use it. * * Otherwise set the address to a convenient locally assigned address, + * using the SID rootkey. + * This is was uboot does so we end up with the same mac as if uboot + * did set it. + * If we can't get the root key, generate a random one, * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally * assigned bit set, and the broadcast/multicast bit clear. */ @@ -186,13 +192,23 @@ emac_get_hwaddr(struct emac_softc *sc, u hwaddr[4] = (val0 >> 8) & 0xff; hwaddr[5] = (val0 >> 0) & 0xff; } else { - rnd = arc4random() & 0x00ffffff; - hwaddr[0] = 'b'; - hwaddr[1] = 's'; - hwaddr[2] = 'd'; - hwaddr[3] = (rnd >> 16) & 0xff; - hwaddr[4] = (rnd >> 8) & 0xff; - hwaddr[5] = (rnd >> 0) & 0xff; + if (aw_sid_get_rootkey(rootkey) == 0) { + hwaddr[0] = 0x2; + hwaddr[1] = rootkey[3]; + hwaddr[2] = rootkey[12]; + hwaddr[3] = rootkey[13]; + hwaddr[4] = rootkey[14]; + hwaddr[5] = rootkey[15]; + } + else { + rnd = arc4random() & 0x00ffffff; + hwaddr[0] = 'b'; + hwaddr[1] = 's'; + hwaddr[2] = 'd'; + hwaddr[3] = (rnd >> 16) & 0xff; + hwaddr[4] = (rnd >> 8) & 0xff; + hwaddr[5] = (rnd >> 0) & 0xff; + } } if (bootverbose) printf("MAC address: %s\n", ether_sprintf(hwaddr)); Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/elf_trampoline.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/elf_trampoline.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/elf_trampoline.c Mon Aug 22 01:43:47 2016 (r304578) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include extern char kernel_start[]; extern char kernel_end[]; @@ -47,7 +48,7 @@ extern void *_end; void _start(void); void __start(void); -void __startC(void); +void __startC(unsigned r0, unsigned r1, unsigned r2, unsigned r3); extern unsigned int cpu_ident(void); extern void armv6_idcache_wbinv_all(void); @@ -124,6 +125,10 @@ static int arm_dcache_l2_nsets; static int arm_dcache_l2_assoc; static int arm_dcache_l2_linesize; +/* + * Boot parameters + */ +static struct arm_boot_params s_boot_params; extern int arm9_dcache_sets_inc; extern int arm9_dcache_sets_max; @@ -172,12 +177,17 @@ bzero(void *addr, int count) static void arm9_setup(void); void -_startC(void) +_startC(unsigned r0, unsigned r1, unsigned r2, unsigned r3) { int tmp1; unsigned int sp = ((unsigned int)&_end & ~3) + 4; unsigned int pc, kernphysaddr; + s_boot_params.abp_r0 = r0; + s_boot_params.abp_r1 = r1; + s_boot_params.abp_r2 = r2; + s_boot_params.abp_r3 = r3; + /* * Figure out the physical address the kernel was loaded at. This * assumes the entry point (this code right here) is in the first page, @@ -211,8 +221,15 @@ _startC(void) /* Temporary set the sp and jump to the new location. */ __asm __volatile( "mov sp, %1\n" + "mov r0, %2\n" + "mov r1, %3\n" + "mov r2, %4\n" + "mov r3, %5\n" "mov pc, %0\n" - : : "r" (target_addr), "r" (tmp_sp)); + : : "r" (target_addr), "r" (tmp_sp), + "r" (s_boot_params.abp_r0), "r" (s_boot_params.abp_r1), + "r" (s_boot_params.abp_r2), "r" (s_boot_params.abp_r3), + : "r0", "r1", "r2", "r3"); } #endif @@ -487,6 +504,7 @@ load_kernel(unsigned int kstart, unsigne vm_offset_t lastaddr = 0; Elf_Addr ssym = 0; Elf_Dyn *dp; + struct arm_boot_params local_boot_params; eh = (Elf32_Ehdr *)kstart; ssym = 0; @@ -555,6 +573,12 @@ load_kernel(unsigned int kstart, unsigne if (!d) return ((void *)lastaddr); + /* + * Now the stack is fixed, copy boot params + * before it's overrided + */ + memcpy(&local_boot_params, &s_boot_params, sizeof(local_boot_params)); + j = eh->e_phnum; for (i = 0; i < j; i++) { volatile char c; @@ -604,7 +628,10 @@ load_kernel(unsigned int kstart, unsigne "mcr p15, 0, %0, c1, c0, 0\n" /* CP15_SCTLR(%0)*/ : "=r" (ssym)); /* Jump to the entry point. */ - ((void(*)(void))(entry_point - KERNVIRTADDR + curaddr))(); + ((void(*)(unsigned, unsigned, unsigned, unsigned)) + (entry_point - KERNVIRTADDR + curaddr)) + (local_boot_params.abp_r0, local_boot_params.abp_r1, + local_boot_params.abp_r2, local_boot_params.abp_r3); __asm __volatile(".globl func_end\n" "func_end:"); Modified: user/alc/PQ_LAUNDRY/sys/boot/common/boot.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/boot.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/boot.c Mon Aug 22 01:43:47 2016 (r304578) @@ -61,7 +61,8 @@ command_boot(int argc, char *argv[]) /* XXX maybe we should discard everything and start again? */ if (file_findfile(NULL, NULL) != NULL) { - sprintf(command_errbuf, "can't boot '%s', kernel module already loaded", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "can't boot '%s', kernel module already loaded", argv[1]); return(CMD_ERROR); } @@ -129,7 +130,8 @@ command_autoboot(int argc, char *argv[]) case 2: howlong = strtol(argv[1], &cp, 0); if (*cp != 0) { - sprintf(command_errbuf, "bad delay '%s'", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "bad delay '%s'", argv[1]); return(CMD_ERROR); } /* FALLTHROUGH */ Modified: user/alc/PQ_LAUNDRY/sys/boot/common/bootstrap.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/bootstrap.h Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/bootstrap.h Mon Aug 22 01:43:47 2016 (r304578) @@ -35,8 +35,9 @@ /* Commands and return values; nonzero return sets command_errmsg != NULL */ typedef int (bootblk_cmd_t)(int argc, char *argv[]); +#define COMMAND_ERRBUFSZ (256) extern char *command_errmsg; -extern char command_errbuf[]; /* XXX blah, length */ +extern char command_errbuf[COMMAND_ERRBUFSZ]; #define CMD_OK 0 #define CMD_WARN 1 #define CMD_ERROR 2 Modified: user/alc/PQ_LAUNDRY/sys/boot/common/commands.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/commands.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/commands.c Mon Aug 22 01:43:47 2016 (r304578) @@ -33,7 +33,8 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" char *command_errmsg; -char command_errbuf[256]; /* XXX should have procedural interface for setting, size limit? */ +/* XXX should have procedural interface for setting, size limit? */ +char command_errbuf[COMMAND_ERRBUFSZ]; static int page_file(char *filename); @@ -196,7 +197,8 @@ command_help(int argc, char *argv[]) pager_close(); close(hfd); if (!matched) { - sprintf(command_errbuf, "no help available for '%s'", topic); + snprintf(command_errbuf, sizeof(command_errbuf), + "no help available for '%s'", topic); free(topic); if (subtopic) free(subtopic); @@ -276,7 +278,8 @@ command_show(int argc, char *argv[]) if ((cp = getenv(argv[1])) != NULL) { printf("%s\n", cp); } else { - sprintf(command_errbuf, "variable '%s' not found", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "variable '%s' not found", argv[1]); return(CMD_ERROR); } } @@ -386,7 +389,8 @@ command_read(int argc, char *argv[]) case 't': timeout = strtol(optarg, &cp, 0); if (cp == optarg) { - sprintf(command_errbuf, "bad timeout '%s'", optarg); + snprintf(command_errbuf, sizeof(command_errbuf), + "bad timeout '%s'", optarg); return(CMD_ERROR); } break; @@ -454,8 +458,10 @@ page_file(char *filename) result = pager_file(filename); - if (result == -1) - sprintf(command_errbuf, "error showing %s", filename); + if (result == -1) { + snprintf(command_errbuf, sizeof(command_errbuf), + "error showing %s", filename); + } return result; } Modified: user/alc/PQ_LAUNDRY/sys/boot/common/interp.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/interp.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/interp.c Mon Aug 22 01:43:47 2016 (r304578) @@ -214,7 +214,8 @@ include(const char *filename) #endif if (((fd = open(filename, O_RDONLY)) == -1)) { - sprintf(command_errbuf,"can't open '%s': %s", filename, strerror(errno)); + snprintf(command_errbuf, sizeof(command_errbuf), + "can't open '%s': %s", filename, strerror(errno)); return(CMD_ERROR); } @@ -256,8 +257,9 @@ include(const char *filename) script = script->next; free(se); } - sprintf(command_errbuf, "file '%s' line %d: memory allocation " - "failure - aborting", filename, line); + snprintf(command_errbuf, sizeof(command_errbuf), + "file '%s' line %d: memory allocation failure - aborting", + filename, line); return (CMD_ERROR); } strcpy(sp->text, cp); @@ -291,7 +293,9 @@ include(const char *filename) #ifdef BOOT_FORTH res = bf_run(sp->text); if (res != VM_OUTOFTEXT) { - sprintf(command_errbuf, "Error while including %s, in the line:\n%s", filename, sp->text); + snprintf(command_errbuf, sizeof(command_errbuf), + "Error while including %s, in the line:\n%s", + filename, sp->text); res = CMD_ERROR; break; } else Modified: user/alc/PQ_LAUNDRY/sys/boot/common/ls.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/ls.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/ls.c Mon Aug 22 01:43:47 2016 (r304578) @@ -150,7 +150,8 @@ ls_getdir(char **pathp) /* Make sure the path is respectable to begin with */ if (archsw.arch_getdev(NULL, path, &cp)) { - sprintf(command_errbuf, "bad path '%s'", path); + snprintf(command_errbuf, sizeof(command_errbuf), + "bad path '%s'", path); goto out; } @@ -160,15 +161,18 @@ ls_getdir(char **pathp) fd = open(path, O_RDONLY); if (fd < 0) { - sprintf(command_errbuf, "open '%s' failed: %s", path, strerror(errno)); + snprintf(command_errbuf, sizeof(command_errbuf), + "open '%s' failed: %s", path, strerror(errno)); goto out; } if (fstat(fd, &sb) < 0) { - sprintf(command_errbuf, "stat failed: %s", strerror(errno)); + snprintf(command_errbuf, sizeof(command_errbuf), + "stat failed: %s", strerror(errno)); goto out; } if (!S_ISDIR(sb.st_mode)) { - sprintf(command_errbuf, "%s: %s", path, strerror(ENOTDIR)); + snprintf(command_errbuf, sizeof(command_errbuf), + "%s: %s", path, strerror(ENOTDIR)); goto out; } Modified: user/alc/PQ_LAUNDRY/sys/boot/common/module.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/common/module.c Mon Aug 22 01:41:03 2016 (r304577) +++ user/alc/PQ_LAUNDRY/sys/boot/common/module.c Mon Aug 22 01:43:47 2016 (r304578) @@ -143,7 +143,8 @@ command_load(int argc, char *argv[]) fp = file_findfile(argv[1], typestr); if (fp) { - sprintf(command_errbuf, "warning: file '%s' already loaded", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "warning: file '%s' already loaded", argv[1]); return (CMD_WARN); } @@ -162,7 +163,8 @@ command_load(int argc, char *argv[]) if (dokld || file_havepath(argv[1])) { error = mod_loadkld(argv[1], argc - 2, argv + 2); if (error == EEXIST) { - sprintf(command_errbuf, "warning: KLD '%s' already loaded", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "warning: KLD '%s' already loaded", argv[1]); return (CMD_WARN); } @@ -173,7 +175,8 @@ command_load(int argc, char *argv[]) */ error = mod_load(argv[1], NULL, argc - 2, argv + 2); if (error == EEXIST) { - sprintf(command_errbuf, "warning: module '%s' already loaded", argv[1]); + snprintf(command_errbuf, sizeof(command_errbuf), + "warning: module '%s' already loaded", argv[1]); return (CMD_WARN); } @@ -202,7 +205,8 @@ command_load_geli(int argc, char *argv[] case 'n': num = strtol(optarg, &cp, 0); if (cp == optarg) { - sprintf(command_errbuf, "bad key index '%s'", optarg); + snprintf(command_errbuf, sizeof(command_errbuf), + "bad key index '%s'", optarg); return(CMD_ERROR); } break; @@ -334,8 +338,8 @@ file_load(char *filename, vm_offset_t de if (error == EFTYPE) continue; /* Unknown to this handler? */ if (error) { - sprintf(command_errbuf, "can't load file '%s': %s", - filename, strerror(error)); + snprintf(command_errbuf, sizeof(command_errbuf), + "can't load file '%s': %s", filename, strerror(error)); break; } } @@ -371,8 +375,8 @@ file_load_dependencies(struct preloaded_ */ mp = file_findmodule(NULL, dmodname, verinfo); if (mp == NULL) { - sprintf(command_errbuf, "module '%s' exists but with wrong version", - dmodname); + snprintf(command_errbuf, sizeof(command_errbuf), + "module '%s' exists but with wrong version", dmodname); error = ENOENT; break; } @@ -411,12 +415,14 @@ file_loadraw(const char *fname, char *ty /* locate the file on the load path */ name = file_search(fname, NULL); if (name == NULL) { - sprintf(command_errbuf, "can't find '%s'", fname); + snprintf(command_errbuf, sizeof(command_errbuf), + "can't find '%s'", fname); return(NULL); } if ((fd = open(name, O_RDONLY)) < 0) { - sprintf(command_errbuf, "can't open '%s': %s", name, strerror(errno)); + snprintf(command_errbuf, sizeof(command_errbuf), + "can't open '%s': %s", name, strerror(errno)); free(name); return(NULL); } @@ -433,7 +439,8 @@ file_loadraw(const char *fname, char *ty if (got == 0) /* end of file */ break; if (got < 0) { /* error */ - sprintf(command_errbuf, "error reading '%s': %s", name, strerror(errno)); + snprintf(command_errbuf, sizeof(command_errbuf), + "error reading '%s': %s", name, strerror(errno)); free(name); close(fd); return(NULL); @@ -487,13 +494,15 @@ mod_load(char *modname, struct mod_depen free(mp->m_args); mp->m_args = unargv(argc, argv); #endif - sprintf(command_errbuf, "warning: module '%s' already loaded", mp->m_name); + snprintf(command_errbuf, sizeof(command_errbuf), *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***