svn commit: r316754 - in head/sys/boot: common i386/libi386

2017-04-13 Thread Roger Pau Monné
Author: royger Date: Thu Apr 13 09:59:12 2017 New Revision: 316754 URL: https://svnweb.freebsd.org/changeset/base/316754 Log: loader/multiboot: fix multiboot loading The current multiboot loader code doesn't clean the metadata added to the kernel after the bi_load64 dry run, which breaks

Re: svn commit: r316746 - head/share/examples/bhyve

2017-04-13 Thread Rodney W. Grimes
> Author: allanjude > Date: Thu Apr 13 00:07:39 2017 > New Revision: 316746 > URL: https://svnweb.freebsd.org/changeset/base/316746 > > Log: > Add UEFI support to vmrun.sh > > Adds: >-E: Use UEFI mode >-f: path to UEFI firmware image (default: path to uefi-edk2-bhyve package) >-

svn commit: r316755 - in head/sys/arm64: arm64 include

2017-04-13 Thread Andrew Turner
Author: andrew Date: Thu Apr 13 11:56:27 2017 New Revision: 316755 URL: https://svnweb.freebsd.org/changeset/base/316755 Log: Add SCTLR bits added in ARMv8.1 and ARMv8.2 and start to use them in the early boot code. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/locore.S he

svn commit: r316756 - in head/sys/arm64: arm64 include

2017-04-13 Thread Andrew Turner
Author: andrew Date: Thu Apr 13 13:46:01 2017 New Revision: 316756 URL: https://svnweb.freebsd.org/changeset/base/316756 Log: In ARMv8.1 ARM has added a process state bit to disable access to userspace from the kernel. Make use of this to restrict accessing userspace to just the functions th

svn commit: r316757 - in head/sys: arm/arm arm64/arm64

2017-04-13 Thread Alexander Kabaev
Author: kan Date: Thu Apr 13 14:23:27 2017 New Revision: 316757 URL: https://svnweb.freebsd.org/changeset/base/316757 Log: Use proper fields to check for interrupt trigger mode. Modified: head/sys/arm/arm/gic.c head/sys/arm64/arm64/gic_v3.c Modified: head/sys/arm/arm/gic.c

svn commit: r316758 - head/sys/dev/sound/pci/hda

2017-04-13 Thread Alexander Motin
Author: mav Date: Thu Apr 13 14:40:48 2017 New Revision: 316758 URL: https://svnweb.freebsd.org/changeset/base/316758 Log: Update list of Conexant and Realtek codecs. MFC after:2 weeks Modified: head/sys/dev/sound/pci/hda/hdac.h head/sys/dev/sound/pci/hda/hdacc.c Modified: head/sy

svn commit: r316759 - in head: lib/libipsec sbin/setkey sys/netipsec

2017-04-13 Thread Andrey V. Elsukov
Author: ae Date: Thu Apr 13 14:44:17 2017 New Revision: 316759 URL: https://svnweb.freebsd.org/changeset/base/316759 Log: Add large replay widow support to setkey(8) and libipsec. When the replay window size is large than UINT8_MAX, add to the request the SADB_X_EXT_SA_REPLAY extension he

svn commit: r316760 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-04-13 Thread Alan Somers
Author: asomers Date: Thu Apr 13 14:51:34 2017 New Revision: 316760 URL: https://svnweb.freebsd.org/changeset/base/316760 Log: Fix vdev_geom_attach_by_guids for partitioned disks When opening a vdev whose path is unknown, vdev_geom must find a geom provider with a label whose guids match

svn commit: r316761 - head/sys/arm64/arm64

2017-04-13 Thread Andrew Turner
Author: andrew Date: Thu Apr 13 15:03:03 2017 New Revision: 316761 URL: https://svnweb.freebsd.org/changeset/base/316761 Log: Set the arm64 Execute-never bits in more places. We need to set the Execute-never bits when mapping device memory as the hardware may perform speculative instructi

svn commit: r316764 - head/sys/kern

2017-04-13 Thread Andrew Turner
Author: andrew Date: Thu Apr 13 15:43:44 2017 New Revision: 316764 URL: https://svnweb.freebsd.org/changeset/base/316764 Log: Don't prefix zero with 0x in assym.s. The arm64 binutils only accepts 0 as an offset to the Load-Acquire Register instructions where llvm will acceps both 0 and 0x

svn commit: r316766 - head/lib/libutil

2017-04-13 Thread Brooks Davis
Author: brooks Date: Thu Apr 13 15:49:32 2017 New Revision: 316766 URL: https://svnweb.freebsd.org/changeset/base/316766 Log: Correct an out of bounds read with HN_AUTOSCALE and very large numbers. The maximum scale is 6 (K, M, G, T, P, E) (B is 0). Overly large explict scales were che

svn commit: r316767 - head/sys/amd64/amd64

2017-04-13 Thread Konstantin Belousov
Author: kib Date: Thu Apr 13 15:49:55 2017 New Revision: 316767 URL: https://svnweb.freebsd.org/changeset/base/316767 Log: Map DMAP as nx. Demotions preserve PG_NX, so it is enough to set nx bit for initial lowest-level paging entries. Suggested and reviewed by:alc Sponsored by

svn commit: r316768 - head/lib/libc/gen

2017-04-13 Thread Brooks Davis
Author: brooks Date: Thu Apr 13 15:52:45 2017 New Revision: 316768 URL: https://svnweb.freebsd.org/changeset/base/316768 Log: Fix an out-of-bounds write when a zero-length buffer is passed. Found with ttyname_test and CHERI bounds checking. Reviewed by: emaste Obtained from:

Re: svn commit: r316766 - head/lib/libutil

2017-04-13 Thread Brooks Davis
On Thu, Apr 13, 2017 at 03:49:33PM +, Brooks Davis wrote: > Author: brooks > Date: Thu Apr 13 15:49:32 2017 > New Revision: 316766 > URL: https://svnweb.freebsd.org/changeset/base/316766 > > Log: > Correct an out of bounds read with HN_AUTOSCALE and very large numbers. > > The maximum s

svn commit: r316769 - head/sys/arm64/arm64

2017-04-13 Thread Andrew Turner
Author: andrew Date: Thu Apr 13 16:57:02 2017 New Revision: 316769 URL: https://svnweb.freebsd.org/changeset/base/316769 Log: Rather than checking if the top bit in a virtual address is a 0 or 1 compare against VM_MAXUSER_ADDRESS as we should have been doing. Sponsored by: DARPA, AFRL Mo

svn commit: r316770 - in head/sys: netinet netinet6

2017-04-13 Thread Andrey V. Elsukov
Author: ae Date: Thu Apr 13 17:03:57 2017 New Revision: 316770 URL: https://svnweb.freebsd.org/changeset/base/316770 Log: Clear h/w csum flags on mbuf handled by UDP. When checksums of received IP and UDP header already checked, UDP uses sbappendaddr_locked() to pass received data to the

svn commit: r316771 - head/sys/boot/common

2017-04-13 Thread Conrad Meyer
Author: cem Date: Thu Apr 13 17:11:49 2017 New Revision: 316771 URL: https://svnweb.freebsd.org/changeset/base/316771 Log: loader: Avoid possible overflow via environment variable Reported by: Coverity (CWE-120) CID: 1006704 Sponsored by: Dell EMC Isilon Modified: head/sys/

svn commit: r316774 - in head/sys/dev/cxgbe: . common

2017-04-13 Thread Navdeep Parhar
Author: np Date: Thu Apr 13 17:16:36 2017 New Revision: 316774 URL: https://svnweb.freebsd.org/changeset/base/316774 Log: cxgbe: Query some more RDMA related parameters from the firmware. MFC after:3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/comm

svn commit: r316776 - head/sys/compat/linux

2017-04-13 Thread Conrad Meyer
Author: cem Date: Thu Apr 13 17:34:51 2017 New Revision: 316776 URL: https://svnweb.freebsd.org/changeset/base/316776 Log: linux_ioctl: Refactor some v4l2 struct converters According to the C standard, it is invalid to copy beyond the end of an object, even if that object is obviously a m

svn commit: r316777 - head/sys/netpfil/ipfw

2017-04-13 Thread Conrad Meyer
Author: cem Date: Thu Apr 13 17:47:44 2017 New Revision: 316777 URL: https://svnweb.freebsd.org/changeset/base/316777 Log: dummynet: Use strlcpy to appease static checkers Some dummynet modules used strcpy() to copy from a larger buffer (dn_aqm->name) to a smaller buffer (dn_extra_parms->

svn commit: r316778 - head/sys/netpfil/ipfw

2017-04-13 Thread Maxim Konovalov
Author: maxim Date: Thu Apr 13 18:13:10 2017 New Revision: 316778 URL: https://svnweb.freebsd.org/changeset/base/316778 Log: o Redundant assignments removed. Found by: PVS-Stdio, V519 Reviewed by: ae Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_tab

svn commit: r316780 - head

2017-04-13 Thread Bryan Drewery
Author: bdrewery Date: Thu Apr 13 19:27:46 2017 New Revision: 316780 URL: https://svnweb.freebsd.org/changeset/base/316780 Log: Pass COMPILER_FEATURES down to submakes for installworld. This is for WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, external compiler, etc. MFC after:2

svn commit: r316782 - head/sys/fs/nfsclient

2017-04-13 Thread Rick Macklem
Author: rmacklem Date: Thu Apr 13 20:16:29 2017 New Revision: 316782 URL: https://svnweb.freebsd.org/changeset/base/316782 Log: Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd). A function called svcpool_close() was added to the server side krpc by r313735, so that

svn commit: r316792 - in head/sys: fs/nfs fs/nfsclient nfsclient

2017-04-13 Thread Rick Macklem
Author: rmacklem Date: Thu Apr 13 21:54:19 2017 New Revision: 316792 URL: https://svnweb.freebsd.org/changeset/base/316792 Log: Add an NFSv4.1 mount option for "use one openowner". Some NFSv4.1 servers such as AmazonEFS can only support a small fixed number of open_owner4s. This patch add

svn commit: r316793 - head/sbin/mount_nfs

2017-04-13 Thread Rick Macklem
Author: rmacklem Date: Thu Apr 13 22:05:24 2017 New Revision: 316793 URL: https://svnweb.freebsd.org/changeset/base/316793 Log: Document the "oneopenown" option added by r316792. This is a content change. MFC after:2 weeks Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: hea

svn commit: r316794 - head

2017-04-13 Thread Bryan Drewery
Author: bdrewery Date: Thu Apr 13 22:07:34 2017 New Revision: 316794 URL: https://svnweb.freebsd.org/changeset/base/316794 Log: Cache compiler metadata and reuse it at installworld time. Right after cross-tools, a compiler-metadata.mk file is created that stores all of the bsd.compiler.mk

svn commit: r316795 - in head/usr.sbin/ctm: ctm_dequeue ctm_smail

2017-04-13 Thread Conrad Meyer
Author: cem Date: Thu Apr 13 22:59:17 2017 New Revision: 316795 URL: https://svnweb.freebsd.org/changeset/base/316795 Log: ctm: Fix some trivial argv buffer overruns It may not do the right thing with these obviously wrong inputs, but at least it won't smash the stack. Reported by:

svn commit: r316796 - head/sys/dev/vt

2017-04-13 Thread Jung-uk Kim
Author: jkim Date: Thu Apr 13 23:00:26 2017 New Revision: 316796 URL: https://svnweb.freebsd.org/changeset/base/316796 Log: Attempt to clear logos more thoroughly. PR: 202288 Reviewed by: cem Modified: head/sys/dev/vt/vt_cpulogos.c Modified: head/sys/dev/vt/vt_cpulogos.c ==

svn commit: r316797 - head/usr.bin/banner

2017-04-13 Thread Conrad Meyer
Author: cem Date: Thu Apr 13 23:22:18 2017 New Revision: 316797 URL: https://svnweb.freebsd.org/changeset/base/316797 Log: banner(6): Squash a harmless coverity warning The destination buffer is sized as the sum of program argument lengths, so it has plenty of room for *argv. Appease Cov

svn commit: r316799 - head/sbin/restore

2017-04-13 Thread Conrad Meyer
Author: cem Date: Fri Apr 14 00:14:40 2017 New Revision: 316799 URL: https://svnweb.freebsd.org/changeset/base/316799 Log: restore(8): Prevent some heap overflows The environment variable TMPDIR was copied unchecked into a fixed-size heap buffer. Use a length-limiting snprintf in place o

Re: svn commit: r316435 - in head: sbin/ipfw sys/conf sys/modules sys/modules/ipfw_pmod sys/netpfil/ipfw/pmod

2017-04-13 Thread Gleb Smirnoff
On Mon, Apr 03, 2017 at 10:12:11PM +0800, Julian Elischer wrote: J> On 3/4/17 11:07 am, Andrey V. Elsukov wrote: J> > Author: ae J> > Date: Mon Apr 3 03:07:48 2017 J> > New Revision: 316435 J> > URL: https://svnweb.freebsd.org/changeset/base/316435 J> J> it was always my intention to hook netgrap

svn commit: r316801 - head/sbin/fsck

2017-04-13 Thread Conrad Meyer
Author: cem Date: Fri Apr 14 00:22:28 2017 New Revision: 316801 URL: https://svnweb.freebsd.org/changeset/base/316801 Log: fsck(8): Don't overrun mount device buffer Apply a very similar fix to r299460 (fsck_ffs) to apparently duplicated code in fsck. Reported by: Coverity CID:

svn commit: r316802 - head/usr.sbin/bsdinstall/partedit

2017-04-13 Thread Conrad Meyer
Author: cem Date: Fri Apr 14 00:36:45 2017 New Revision: 316802 URL: https://svnweb.freebsd.org/changeset/base/316802 Log: bsdinstall(8): Sprinkle a snprintf to fixed size buffer Use a snprintf to write an environment variable to a fixed-size buffer to avoid stack overflow. Reported

svn commit: r316803 - head/contrib/tcp_wrappers

2017-04-13 Thread Conrad Meyer
Author: cem Date: Fri Apr 14 00:45:09 2017 New Revision: 316803 URL: https://svnweb.freebsd.org/changeset/base/316803 Log: tcp_wrappers: Sprinkle some bounds-checked string copying It isn't clear if tcpd.c is even compiled in FreeBSD. Reported by: Coverity CIDs: 1006710, 100

svn commit: r316804 - head/sys/netpfil/pf

2017-04-13 Thread Gleb Smirnoff
Author: glebius Date: Fri Apr 14 01:56:15 2017 New Revision: 316804 URL: https://svnweb.freebsd.org/changeset/base/316804 Log: Fix potential NULL deref. Found by: PVS Studio Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ===

svn commit: r316805 - head/sys/dev/ae

2017-04-13 Thread Pyun YongHyeon
Author: yongari Date: Fri Apr 14 02:24:02 2017 New Revision: 316805 URL: https://svnweb.freebsd.org/changeset/base/316805 Log: Fix a potentially forever loop. Found by: PVS-Studio Modified: head/sys/dev/ae/if_ae.c Modified: head/sys/dev/ae/if_ae.c ===

svn commit: r316806 - head/sys/dev/fxp

2017-04-13 Thread Pyun YongHyeon
Author: yongari Date: Fri Apr 14 02:33:26 2017 New Revision: 316806 URL: https://svnweb.freebsd.org/changeset/base/316806 Log: Remove unnecessary comparison. Found by: PVS-Studio Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c

svn commit: r316807 - head/contrib/gcc/config/rs6000

2017-04-13 Thread Justin Hibbits
Author: jhibbits Date: Fri Apr 14 03:20:34 2017 New Revision: 316807 URL: https://svnweb.freebsd.org/changeset/base/316807 Log: Default powerpcspe processor target to 8540 This prevents internal compiler errors when -mcpu is omitted. Modified: head/contrib/gcc/config/rs6000/freebsdspe.h

svn commit: r316808 - head/sys/dev/txp

2017-04-13 Thread Pyun YongHyeon
Author: yongari Date: Fri Apr 14 03:23:03 2017 New Revision: 316808 URL: https://svnweb.freebsd.org/changeset/base/316808 Log: Remove unnecessary check aginst NULL. txp_ext_command() with TXP_CMD_WAIT argument allocates a response buffer. If the allocation fails, txp_ext_command() returns

svn commit: r316809 - head/sys/contrib/ipfilter/netinet

2017-04-13 Thread Cy Schubert
Author: cy Date: Fri Apr 14 03:54:36 2017 New Revision: 316809 URL: https://svnweb.freebsd.org/changeset/base/316809 Log: Fix a use after free panic in ipfilter's fragment processing. Memory is malloc'd, then a search for a match in the fragment table is made and if the fragment matches, the

Re: svn commit: r316809 - head/sys/contrib/ipfilter/netinet

2017-04-13 Thread Cy Schubert
In message <201704140354.v3e3sawz005...@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Fri Apr 14 03:54:36 2017 > New Revision: 316809 > URL: https://svnweb.freebsd.org/changeset/base/316809 > > Log: > Fix a use after free panic in ipfilter's fragment processing. > Memory is mall

svn commit: r316810 - head/sys/contrib/ipfilter/netinet

2017-04-13 Thread Cy Schubert
Author: cy Date: Fri Apr 14 05:12:01 2017 New Revision: 316810 URL: https://svnweb.freebsd.org/changeset/base/316810 Log: Keep state incorrectly assumes keep frags. This is counter to the ipfilter man pages. This also currently restricts keep frags to only when keep state is used, which is r

svn commit: r316811 - head/sys/contrib/ipfilter/netinet

2017-04-13 Thread Cy Schubert
Author: cy Date: Fri Apr 14 05:13:50 2017 New Revision: 316811 URL: https://svnweb.freebsd.org/changeset/base/316811 Log: Add missing free()'s after calls to randomize(). PR: NetBSD PR/50559 Obtained from:Netbsd radix_ipf.c r1.6 MFC after:1 week Modified: head/s

svn commit: r316812 - head/sys/dev/hyperv/input

2017-04-13 Thread Sepherosa Ziehau
Author: sephe Date: Fri Apr 14 05:18:42 2017 New Revision: 316812 URL: https://svnweb.freebsd.org/changeset/base/316812 Log: hyperv/kbd: Remove unnecessary assignment. Reported by: PVS MFC after:3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/input/hv_kbdc.c Modifi

svn commit: r316814 - head

2017-04-13 Thread Cy Schubert
** SPECIAL WARNING: ** +20170413: + As of r316810 for ipfilter, keep frags is no longer assumed when + keep state is specified in a rule. r316810 aligns ipfilter with + documentation in man pages separating keep frags from keep state. + This

svn commit: r316813 - head/sys/dev/hyperv/storvsc

2017-04-13 Thread Sepherosa Ziehau
Author: sephe Date: Fri Apr 14 05:25:21 2017 New Revision: 316813 URL: https://svnweb.freebsd.org/changeset/base/316813 Log: hyperv/storvsc: Use ULL for 64bits value shift. Reported by: PVS MFC after:3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/storvsc/hv_storvsc

svn commit: r316815 - head/sys/dev/hyperv/utilities

2017-04-13 Thread Sepherosa Ziehau
Author: sephe Date: Fri Apr 14 05:29:27 2017 New Revision: 316815 URL: https://svnweb.freebsd.org/changeset/base/316815 Log: hyperv/kvp: Remove always false condition. Reported by: PVS MFC after:3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/utilities/hv_kvp.c Mod

svn commit: r316816 - head

2017-04-13 Thread Cy Schubert
Author: cy Date: Fri Apr 14 05:32:03 2017 New Revision: 316816 URL: https://svnweb.freebsd.org/changeset/base/316816 Log: Add missing bracket (typo). Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATI

svn commit: r316817 - head/etc/pam.d

2017-04-13 Thread Ngie Cooper
Author: ngie Date: Fri Apr 14 06:33:15 2017 New Revision: 316817 URL: https://svnweb.freebsd.org/changeset/base/316817 Log: Derive {AT,RCMDS}{DIR,MODE} from FILE{DIR,MODE} This reduces duplicity a bit. MFC after:7 weeks Sponsored by: Dell EMC Isilon Modified: head/etc/pam.d/Ma

svn commit: r316818 - in head: etc/pam.d tools/build/mk

2017-04-13 Thread Ngie Cooper
Author: ngie Date: Fri Apr 14 06:42:46 2017 New Revision: 316818 URL: https://svnweb.freebsd.org/changeset/base/316818 Log: Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd /etc/pam.d/ftp* should be installed with MK_FTP != no and /etc/pam.d/telnetd should be installed when MK