Re: svn commit: r341682 - head/sys/sys

2018-12-07 Thread Mateusz Guzik
On 12/7/18, Ian Lepore wrote: > On Fri, 2018-12-07 at 12:05 +, Mateusz Guzik wrote: >> Author: mjg >> Date: Fri Dec 7 12:05:11 2018 >> New Revision: 341682 >> URL: https://svnweb.freebsd.org/changeset/base/341682 >> >> Log: >> unr64: use locked variant if not __LP64__ >> >> The current if

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread John Baldwin
On 12/7/18 3:13 PM, Konstantin Belousov wrote: > On Fri, Dec 07, 2018 at 10:04:51AM -0800, John Baldwin wrote: >> On 12/7/18 9:47 AM, Konstantin Belousov wrote: >>> On Fri, Dec 07, 2018 at 09:21:34AM -0800, John Baldwin wrote: On 12/7/18 7:17 AM, Konstantin Belousov wrote: > Author: kib >>

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread Konstantin Belousov
On Fri, Dec 07, 2018 at 10:04:51AM -0800, John Baldwin wrote: > On 12/7/18 9:47 AM, Konstantin Belousov wrote: > > On Fri, Dec 07, 2018 at 09:21:34AM -0800, John Baldwin wrote: > >> On 12/7/18 7:17 AM, Konstantin Belousov wrote: > >>> Author: kib > >>> Date: Fri Dec 7 15:17:29 2018 > >>> New Revis

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread Konstantin Belousov
On Fri, Dec 07, 2018 at 11:34:50AM -0800, John Baldwin wrote: > On 12/7/18 10:59 AM, Conrad Meyer wrote: > > On Fri, Dec 7, 2018 at 10:05 AM John Baldwin wrote: > >> The > >> requirement for root mostly mitigates this when root vs not-root is your > >> only privilege. However, a capsicum vs non-c

svn commit: r341712 - head/sys/kern

2018-12-07 Thread Konstantin Belousov
Author: kib Date: Fri Dec 7 23:07:51 2018 New Revision: 341712 URL: https://svnweb.freebsd.org/changeset/base/341712 Log: Simplify kern_readlink_vp(). When we detected that the vnode is not symlink, return immediately. This moves the readlink code out of else branch and unindents it.

svn commit: r341711 - head/sys/kern

2018-12-07 Thread Konstantin Belousov
Author: kib Date: Fri Dec 7 23:05:12 2018 New Revision: 341711 URL: https://svnweb.freebsd.org/changeset/base/341711 Log: Fix expression evaluation. Braces were put in the wrong place, causing failing EAGAIN check to return zero result. Remove the problematic assignment from the condi

svn commit: r341710 - head/sys/dev/nvme

2018-12-07 Thread Warner Losh
Author: imp Date: Fri Dec 7 21:58:08 2018 New Revision: 341710 URL: https://svnweb.freebsd.org/changeset/base/341710 Log: Even though they are reserved, cdw2 and cdw3 can be set via nvme-cli (and soon nvmecontrol). Go ahead and copy them into rsvd2 and rsvd3. Sponsored by: Netflix Modif

svn commit: r341709 - head/share/man/man4

2018-12-07 Thread Warner Losh
Author: imp Date: Fri Dec 7 21:57:39 2018 New Revision: 341709 URL: https://svnweb.freebsd.org/changeset/base/341709 Log: Add nda(4) cross reference to nvme(4) Modified: head/share/man/man4/nvme.4 Modified: head/share/man/man4/nvme.4 =

svn commit: r341706 - head/usr.sbin/bhyve

2018-12-07 Thread Alexander Motin
Author: mav Date: Fri Dec 7 20:55:29 2018 New Revision: 341706 URL: https://svnweb.freebsd.org/changeset/base/341706 Log: Make virtio-scsi pass SCSI Task Attributes to CTL. MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_virtio_scsi.c Modified: he

svn commit: r341705 - head/usr.sbin/bhyve

2018-12-07 Thread Alexander Motin
Author: mav Date: Fri Dec 7 20:30:00 2018 New Revision: 341705 URL: https://svnweb.freebsd.org/changeset/base/341705 Log: Fix several iov handling bugs in bhyve virtio-scsi backend. - buf_to_iov() does not use buflen parameter, allowing out of bound read. - buf_to_iov() leaks memory if

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread John Baldwin
On 12/7/18 10:59 AM, Conrad Meyer wrote: > On Fri, Dec 7, 2018 at 10:05 AM John Baldwin wrote: >> The >> requirement for root mostly mitigates this when root vs not-root is your >> only privilege. However, a capsicum vs non-capsicum process is a more >> recent privilege that is orthogonal to root

svn commit: r341704 - head/usr.sbin/bhyve

2018-12-07 Thread Alexander Motin
Author: mav Date: Fri Dec 7 19:10:51 2018 New Revision: 341704 URL: https://svnweb.freebsd.org/changeset/base/341704 Log: Fill initid explicitly on requests. Unfortunately ctl_scsi_zero_io() wipes that field, so it was always zero. While there, targ_port is set by kernel, so user-space s

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread Conrad Meyer
On Fri, Dec 7, 2018 at 10:05 AM John Baldwin wrote: > The > requirement for root mostly mitigates this when root vs not-root is your > only privilege. However, a capsicum vs non-capsicum process is a more > recent privilege that is orthogonal to root vs non-root. It might be that > allowing a ca

Re: svn commit: r341682 - head/sys/sys

2018-12-07 Thread John Baldwin
On 12/7/18 10:10 AM, Ian Lepore wrote: > On Fri, 2018-12-07 at 12:05 +, Mateusz Guzik wrote: >> Author: mjg >> Date: Fri Dec  7 12:05:11 2018 >> New Revision: 341682 >> URL: https://svnweb.freebsd.org/changeset/base/341682 >> >> Log: >>   unr64: use locked variant if not __LP64__ >>    >>   The

Re: svn commit: r341682 - head/sys/sys

2018-12-07 Thread Ian Lepore
On Fri, 2018-12-07 at 12:05 +, Mateusz Guzik wrote: > Author: mjg > Date: Fri Dec  7 12:05:11 2018 > New Revision: 341682 > URL: https://svnweb.freebsd.org/changeset/base/341682 > > Log: >   unr64: use locked variant if not __LP64__ >    >   The current ifdefs are not sufficient to distinguish

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread John Baldwin
On 12/7/18 9:47 AM, Konstantin Belousov wrote: > On Fri, Dec 07, 2018 at 09:21:34AM -0800, John Baldwin wrote: >> On 12/7/18 7:17 AM, Konstantin Belousov wrote: >>> Author: kib >>> Date: Fri Dec 7 15:17:29 2018 >>> New Revision: 341689 >>> URL: https://svnweb.freebsd.org/changeset/base/341689 >>>

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread Konstantin Belousov
On Fri, Dec 07, 2018 at 09:21:34AM -0800, John Baldwin wrote: > On 12/7/18 7:17 AM, Konstantin Belousov wrote: > > Author: kib > > Date: Fri Dec 7 15:17:29 2018 > > New Revision: 341689 > > URL: https://svnweb.freebsd.org/changeset/base/341689 > > > > Log: > > Add new file handle system calls.

Re: svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread John Baldwin
On 12/7/18 7:17 AM, Konstantin Belousov wrote: > Author: kib > Date: Fri Dec 7 15:17:29 2018 > New Revision: 341689 > URL: https://svnweb.freebsd.org/changeset/base/341689 > > Log: > Add new file handle system calls. > > Namely, getfhat(2), fhlink(2), fhlinkat(2), fhreadlink(2). The > s

Re: svn commit: r341681 - head/sys/cam/scsi

2018-12-07 Thread Andriy Gapon
On 07/12/2018 18:33, Warner Losh wrote: > > > On Fri, Dec 7, 2018 at 5:02 AM Andriy Gapon > wrote: > > Author: avg > Date: Fri Dec  7 12:02:31 2018 > New Revision: 341681 > URL: https://svnweb.freebsd.org/changeset/base/341681 > > Log: >   dapro

svn commit: r341703 - head/etc/mtree

2018-12-07 Thread Ed Maste
Author: emaste Date: Fri Dec 7 16:52:52 2018 New Revision: 341703 URL: https://svnweb.freebsd.org/changeset/base/341703 Log: BSD.debug.dist: add newly added nvmecontrol directory Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist

svn commit: r341702 - head/sys/kern

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:51:38 2018 New Revision: 341702 URL: https://svnweb.freebsd.org/changeset/base/341702 Log: fd: use racct_set_unlocked Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ==

svn commit: r341701 - in head/sys: kern sys

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:47:34 2018 New Revision: 341701 URL: https://svnweb.freebsd.org/changeset/base/341701 Log: racct: add RACCT_ENABLED macro and racct_set_unlocked This allows to remove PROC_LOCK/UNLOCK pairs spread thorought the kernel only used to appease racct_set. Sp

svn commit: r341700 - head/sys/kern

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:44:52 2018 New Revision: 341700 URL: https://svnweb.freebsd.org/changeset/base/341700 Log: fd: try do less work with the lock in dup Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ===

Re: svn commit: r341681 - head/sys/cam/scsi

2018-12-07 Thread Warner Losh
On Fri, Dec 7, 2018 at 5:02 AM Andriy Gapon wrote: > Author: avg > Date: Fri Dec 7 12:02:31 2018 > New Revision: 341681 > URL: https://svnweb.freebsd.org/changeset/base/341681 > > Log: > daprobedone: announce if a disk is write-protected > > MFC after:2 weeks > > Modified: > head/sys/c

svn commit: r341699 - head/sys/vm

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:22:54 2018 New Revision: 341699 URL: https://svnweb.freebsd.org/changeset/base/341699 Log: vm: use fcmpset for vmspace reference counting Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ==

svn commit: r341698 - head/sys/kern

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:11:45 2018 New Revision: 341698 URL: https://svnweb.freebsd.org/changeset/base/341698 Log: Replace hand-rolled unrefs if > 1 with refcount_release_if_not_last Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_log

svn commit: r341697 - head/sys/sys

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 16:10:13 2018 New Revision: 341697 URL: https://svnweb.freebsd.org/changeset/base/341697 Log: refcount: remove a stale comment about conditional ref/unref routines It was there for vfs-specific variants and was copied over when it should not. Sponsored by:

svn commit: r341696 - head/sys/dev/acpica

2018-12-07 Thread Andriy Gapon
Author: avg Date: Fri Dec 7 16:05:39 2018 New Revision: 341696 URL: https://svnweb.freebsd.org/changeset/base/341696 Log: acpi_MatchHid: use ACPI_MATCHHID_NOMATCH instead of FALSE Binary representation of both is the same (zero), but ACPI_MATCHHID_NOMATCH is better for consistency.

svn commit: r341695 - head/sys/dev/acpi_support

2018-12-07 Thread Andriy Gapon
Author: avg Date: Fri Dec 7 16:01:51 2018 New Revision: 341695 URL: https://svnweb.freebsd.org/changeset/base/341695 Log: aibs: fix a typo in the probe method that was introduced in r339754 Because of that typo the driver would try to attach to every device on acpi bus. That disrupted a

svn commit: r341694 - head/sys/riscv/include

2018-12-07 Thread Mark Johnston
Author: markj Date: Fri Dec 7 15:56:40 2018 New Revision: 341694 URL: https://svnweb.freebsd.org/changeset/base/341694 Log: Update the description of the address space layout on RISC-V. This adds more detail and fixes some inaccuracies. Reviewed by: jhb MFC after:1 week Spons

svn commit: r341693 - in head/sys/riscv: include riscv

2018-12-07 Thread Mark Johnston
Author: markj Date: Fri Dec 7 15:55:23 2018 New Revision: 341693 URL: https://svnweb.freebsd.org/changeset/base/341693 Log: Rename sptbr to satp per v1.10 of the privileged architecture spec. Add a subroutine for updating satp, for use when updating the active pmap. No functional change

svn commit: r341692 - head/lib/libcasper/services/cap_syslog

2018-12-07 Thread Mark Johnston
Author: markj Date: Fri Dec 7 15:52:50 2018 New Revision: 341692 URL: https://svnweb.freebsd.org/changeset/base/341692 Log: Let the cap_syslog capability inherit stdio descriptors. Otherwise cap_openlog(LOG_PERROR) doesn't work. Reviewed by: oshogbo MFC after:1 week Sponsored

svn commit: r341690 - in head/sys: compat/freebsd32 kern sys

2018-12-07 Thread Konstantin Belousov
Author: kib Date: Fri Dec 7 15:19:00 2018 New Revision: 341690 URL: https://svnweb.freebsd.org/changeset/base/341690 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/

svn commit: r341689 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2018-12-07 Thread Konstantin Belousov
Author: kib Date: Fri Dec 7 15:17:29 2018 New Revision: 341689 URL: https://svnweb.freebsd.org/changeset/base/341689 Log: Add new file handle system calls. Namely, getfhat(2), fhlink(2), fhlinkat(2), fhreadlink(2). The syscalls are provided for a NFS userspace server (nfs-ganesha).

svn commit: r341685 - head/sys/kern

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 12:32:25 2018 New Revision: 341685 URL: https://svnweb.freebsd.org/changeset/base/341685 Log: proc: when exiting move to zombproc before taking proctree The kernel was already doing this prior to r329615. It was changed to reduce contention on allproc. However

svn commit: r341684 - in head/sys: kern sys

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 12:22:32 2018 New Revision: 341684 URL: https://svnweb.freebsd.org/changeset/base/341684 Log: Manage process-related IDs with bitmaps Currently unique pid allocation on fork often requires a full walk of process, group, session lists to make sure it is not use

svn commit: r341683 - in head/sys: kern sys

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 12:06:03 2018 New Revision: 341683 URL: https://svnweb.freebsd.org/changeset/base/341683 Log: Annotate Giant drop/pickup macros with __predict_false They are used in important places of the kernel with the lock not being held majority of the time. Sponsor

svn commit: r341682 - head/sys/sys

2018-12-07 Thread Mateusz Guzik
Author: mjg Date: Fri Dec 7 12:05:11 2018 New Revision: 341682 URL: https://svnweb.freebsd.org/changeset/base/341682 Log: unr64: use locked variant if not __LP64__ The current ifdefs are not sufficient to distinguish 32- and 64- bit variants, which results e.g. in powerpc64 not using ato

svn commit: r341681 - head/sys/cam/scsi

2018-12-07 Thread Andriy Gapon
Author: avg Date: Fri Dec 7 12:02:31 2018 New Revision: 341681 URL: https://svnweb.freebsd.org/changeset/base/341681 Log: daprobedone: announce if a disk is write-protected MFC after:2 weeks Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ===

svn commit: r341680 - head/sys/dev/netmap

2018-12-07 Thread Vincenzo Maffione
Author: vmaffione Date: Fri Dec 7 11:47:42 2018 New Revision: 341680 URL: https://svnweb.freebsd.org/changeset/base/341680 Log: netmap: remove dead code obsoleted by iflib The iflib subsystem implements netmap support in a driver-independent way (sys/net/iflib.c). We can therefore remove

svn commit: r341679 - head/sys/arm/include

2018-12-07 Thread Michal Meloun
Author: mmel Date: Fri Dec 7 11:10:27 2018 New Revision: 341679 URL: https://svnweb.freebsd.org/changeset/base/341679 Log: Fix cut&paste typo in atomic_fetchadd_64(). Reported by: Jia-Shiun Li MFC after:1 week Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/in