svn commit: r364753 - in head: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt sys/sys

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 06:49:10 2020
New Revision: 364753
URL: https://svnweb.freebsd.org/changeset/base/364753

Log:
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D26159

Modified:
  head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  head/lib/libcompiler_rt/Makefile.inc
  head/sys/sys/param.h

Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
05:15:40 2020(r364752)
+++ head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
06:49:10 2020(r364753)
@@ -125,8 +125,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incTue Aug 25 05:15:40 2020
(r364752)
+++ head/lib/libcompiler_rt/Makefile.incTue Aug 25 06:49:10 2020
(r364753)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
@@ -18,6 +20,9 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= atomic
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -120,6 +125,10 @@ SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
 
+.if "${COMPILER_TYPE}" == "clang"
+CFLAGS.atomic.c+=  -Wno-atomic-alignment
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -212,12 +221,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -239,19 +242,11 @@ SRCS+=aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
 .endif
 
 .if ${MACHINE_ARCH:Mriscv*sf}

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hTue Aug 25 05:15:40 2020(r364752)
+++ head/sys/sys/param.hTue Aug 25 06:49:10 2020(r364753)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300112  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300113  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364751 - head/cddl/lib/libzfs

2020-08-24 Thread Matt Macy
Author: mmacy
Date: Tue Aug 25 03:43:52 2020
New Revision: 364751
URL: https://svnweb.freebsd.org/changeset/base/364751

Log:
  Fix libzfs build failures for some
  
  In some environments adding zstd/include to the include path
  would cause zstd's stdlib.h to hide the system one.

Modified:
  head/cddl/lib/libzfs/Makefile

Modified: head/cddl/lib/libzfs/Makefile
==
--- head/cddl/lib/libzfs/Makefile   Tue Aug 25 02:54:48 2020
(r364750)
+++ head/cddl/lib/libzfs/Makefile   Tue Aug 25 03:43:52 2020
(r364751)
@@ -91,7 +91,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include
 CFLAGS+= -I${SRCTOP}/sys
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
-CFLAGS+= -I${SRCDIR}/sys/contrib/openzfs/module/zstd/include
 CFLAGS+= -include 
${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
 CFLAGS+= -DHAVE_ISSETUGID
 CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364749 - head

2020-08-24 Thread Matt Macy
Author: mmacy
Date: Tue Aug 25 02:42:48 2020
New Revision: 364749
URL: https://svnweb.freebsd.org/changeset/base/364749

Log:
  Mention OpenZFS merge in UPDATING

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Tue Aug 25 02:42:07 2020(r364748)
+++ head/UPDATING   Tue Aug 25 02:42:48 2020(r364749)
@@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20200824:
+   OpenZFS support has been integrated. We caution against 'zpool upgrade'
+   for the next few weeks. The change should be transparent unless you 
+   want to use new features.
+
+
The resume code now notifies devd with the 'kernel' system
rather than the old 'kern' subsystem to be consistent with
other use. The old notification will be created as well, but
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364747 - head/sys/sys

2020-08-24 Thread Matt Macy
Author: mmacy
Date: Tue Aug 25 02:22:49 2020
New Revision: 364747
URL: https://svnweb.freebsd.org/changeset/base/364747

Log:
  Bump __FreeBSD_version for OpenZFS switchover

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hTue Aug 25 02:21:27 2020(r364746)
+++ head/sys/sys/param.hTue Aug 25 02:22:49 2020(r364747)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300111  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300112  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364746 - in head: . cddl/compat/opensolaris/include cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd...

2020-08-24 Thread Matt Macy
Author: mmacy
Date: Tue Aug 25 02:21:27 2020
New Revision: 364746
URL: https://svnweb.freebsd.org/changeset/base/364746

Log:
  Merge OpenZFS support in to HEAD.
  
  The primary benefit is maintaining a completely shared
  code base with the community allowing FreeBSD to receive
  new features sooner and with less effort.
  
  I would advise against doing 'zpool upgrade'
  or creating indispensable pools using new
  features until this change has had a month+
  to soak.
  
  Work on merging FreeBSD support in to what was
  at the time "ZFS on Linux" began in August 2018.
  I first publicly proposed transitioning FreeBSD
  to (new) OpenZFS on December 18th, 2018. FreeBSD
  support in OpenZFS was finally completed in December
  2019. A CFT for downstreaming OpenZFS support in
  to FreeBSD was first issued on July 8th. All issues
  that were reported have been addressed or, for
  a couple of less critical matters there are
  pull requests in progress with OpenZFS. iXsystems
  has tested and dogfooded extensively internally.
  The TrueNAS 12 release is based on OpenZFS with
  some additional features that have not yet made
  it upstream.
  
  Improvements include:
project quotas, encrypted datasets,
allocation classes, vectorized raidz,
vectorized checksums, various command line
improvements, zstd compression.
  
  Thanks to those who have helped along the way:
  Ryan Moeller, Allan Jude, Zack Welch, and many
  others.
  
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D25872

Added:
  head/cddl/lib/libicp/
  head/cddl/lib/libicp/Makefile   (contents, props changed)
  head/cddl/lib/libicp_rescue/
  head/cddl/lib/libicp_rescue/Makefile   (contents, props changed)
  head/cddl/lib/libspl/
  head/cddl/lib/libspl/Makefile   (contents, props changed)
  head/cddl/lib/libtpool/
  head/cddl/lib/libtpool/Makefile   (contents, props changed)
  head/cddl/lib/libzutil/
  head/cddl/lib/libzutil/Makefile   (contents, props changed)
  head/cddl/usr.bin/zstream/
  head/cddl/usr.bin/zstream/Makefile   (contents, props changed)
  head/sys/modules/zfs/static_ccompile.h   (contents, props changed)
  head/sys/modules/zfs/zfs_config.h   (contents, props changed)
  head/sys/modules/zfs/zfs_gitrev.h   (contents, props changed)
Deleted:
  head/cddl/compat/opensolaris/include/mnttab.h
  head/cddl/contrib/opensolaris/cmd/zdb/
  head/cddl/contrib/opensolaris/cmd/zfs/
  head/cddl/contrib/opensolaris/cmd/zhack/
  head/cddl/contrib/opensolaris/cmd/zinject/
  head/cddl/contrib/opensolaris/cmd/zlook/
  head/cddl/contrib/opensolaris/cmd/zpool/
  head/cddl/contrib/opensolaris/cmd/zstreamdump/
  head/cddl/contrib/opensolaris/cmd/ztest/
  head/cddl/contrib/opensolaris/lib/libnvpair/
  head/cddl/contrib/opensolaris/lib/libuutil/
  head/cddl/contrib/opensolaris/lib/libzfs/
  head/cddl/contrib/opensolaris/lib/libzfs_core/
  head/cddl/contrib/opensolaris/lib/libzpool/
  head/cddl/usr.bin/zlook/
  head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_sunddi.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c
  head/sys/cddl/compat/opensolaris/sys/acl.h
  head/sys/cddl/compat/opensolaris/sys/file.h
  head/sys/cddl/compat/opensolaris/sys/kobj.h
  head/sys/cddl/compat/opensolaris/sys/lock.h
  head/sys/cddl/compat/opensolaris/sys/mman.h
  head/sys/cddl/compat/opensolaris/sys/mount.h
  head/sys/cddl/compat/opensolaris/sys/mutex.h
  head/sys/cddl/compat/opensolaris/sys/nvpair.h
  head/sys/cddl/compat/opensolaris/sys/param.h
  head/sys/cddl/compat/opensolaris/sys/proc.h
  head/sys/cddl/compat/opensolaris/sys/stat.h
  head/sys/cddl/compat/opensolaris/sys/systm.h
  head/sys/cddl/compat/opensolaris/sys/time.h
  head/sys/cddl/compat/opensolaris/sys/types.h
  head/sys/cddl/compat/opensolaris/sys/uio.h
  head/sys/cddl/compat/opensolaris/sys/vnode.h
  head/sys/cddl/contrib/opensolaris/common/acl/
  head/sys/cddl/contrib/opensolaris/common/atomic/
  head/sys/cddl/contrib/opensolaris/common/avl/
  head/sys/cddl/contrib/opensolaris/common/nvpair/
  head/sys/cddl/contrib/opensolaris/common/zfs/
  head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/
  head/sys/cddl/contrib/opensolaris/uts/common/os/callb.c
  head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c
  head/sys/cddl/contrib/opensolaris/uts/common/os/nvpair_alloc_system.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
  head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h
  head/sys/cddl/contrib/opensolar

svn commit: r364744 - head/sys/kern

2020-08-24 Thread Rick Macklem
Author: rmacklem
Date: Tue Aug 25 00:58:14 2020
New Revision: 364744
URL: https://svnweb.freebsd.org/changeset/base/364744

Log:
  Fix hangs with processes stuck sleeping on btalloc on i386.
  
  r358097 introduced a problem for i386, where kernel builds will intermittently
  get hung, typically with many processes sleeping on "btalloc".
  I know nothing about VM, but received assistance from rlibby@ and markj@.
  
  rlibby@ stated the following:
 It looks like the problem is that
 for systems that do not have UMA_MD_SMALL_ALLOC, we do
 uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc);
 but we haven't set an appropriate free function.  This is probably why
 UMA_ZONE_NOFREE was originally there.  When NOFREE was removed, it was
 appropriate for systems with uma_small_alloc.
  
 So by default we get page_free as our free function.  That calls
 kmem_free, which calls vmem_free ... but we do our allocs with
 vmem_xalloc.  I'm not positive, but I think the problem is that in
 effect we vmem_xalloc -> vmem_free, not vmem_xfree.
  
 Three possible fixes:
  1: The one you tested, but this is not best for systems with
 uma_small_alloc.
  2: Pass UMA_ZONE_NOFREE conditional on UMA_MD_SMALL_ALLOC.
  3: Actually provide an appropriate vmem_bt_free function.
  
 I think we should just do option 2 with a comment, it's simple and it's
 what we used to do.  I'm not sure how much benefit we would see from
 option 3, but it's more work.
  
  This patch implements #2. I haven't done a comment, since I don't know
  what the problem is.
  
  markj@ noted the following:
 I think the suggested patch is ok, but not for the reason stated.
 On platforms without a direct map the problem is:
 to allocate btags we need a slab,
 and to allocate a slab we need to map a page, and to map a page we need
 to allocate btags.
  
 We handle this recursion using a custom slab allocator which specifies
 M_USE_RESERVE, allowing it to dip into a reserve of free btags.
 Because the returned slab can be used to keep the reserve populated,
 this ensures that there are always enough free btags available to
 handle the recursion.
  
 UMA_ZONE_NOFREE ensures that we never reclaim free slabs from the zone.
 However, when it was removed, an apparent bug in UMA was exposed:
 keg_drain() ignores the reservation set by uma_zone_reserve()
 in vmem_startup().
 So under memory pressure we reclaim the free btags that are needed to
 break the recursion.
 That's why adding _NOFREE back fixes the problem: it disables the
 reclamation.
  
 We could perhaps fix it more cleverly, by modifying keg_drain() to always
 leave uk_reserve slabs available.
  
  markj@'s initial patch failed testing, so committing this patch was agreed
  upon as the interim solution.
  Either rlibby@ or markj@ might choose to add a comment to it.
  
  PR:   248008
  Reviewed by:  rlibby, markj

Modified:
  head/sys/kern/subr_vmem.c

Modified: head/sys/kern/subr_vmem.c
==
--- head/sys/kern/subr_vmem.c   Tue Aug 25 00:49:57 2020(r364743)
+++ head/sys/kern/subr_vmem.c   Tue Aug 25 00:58:14 2020(r364744)
@@ -668,10 +668,14 @@ vmem_startup(void)
vmem_zone = uma_zcreate("vmem",
sizeof(struct vmem), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, 0);
+#ifdef UMA_MD_SMALL_ALLOC
vmem_bt_zone = uma_zcreate("vmem btag",
sizeof(struct vmem_btag), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, UMA_ZONE_VM);
-#ifndef UMA_MD_SMALL_ALLOC
+#else
+   vmem_bt_zone = uma_zcreate("vmem btag",
+   sizeof(struct vmem_btag), NULL, NULL, NULL, NULL,
+   UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE);
mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF);
uma_prealloc(vmem_bt_zone, BT_MAXALLOC);
/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364740 - head/sys/contrib/openzfs

2020-08-24 Thread Matt Macy
Author: mmacy
Date: Mon Aug 24 23:31:26 2020
New Revision: 364740
URL: https://svnweb.freebsd.org/changeset/base/364740

Log:
  Initial import from vendor-sys branch of openzfs

Added:
  head/sys/contrib/openzfs/
 - copied from r364739, vendor-sys/openzfs/dist/
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364737 - head/sys/dev/drm2

2020-08-24 Thread Niclas Zeising
Author: zeising (doc,ports committer)
Date: Mon Aug 24 22:53:23 2020
New Revision: 364737
URL: https://svnweb.freebsd.org/changeset/base/364737

Log:
  drm2: Update deprecation message
  
  Update the deprecation message in the drm2 (aka legacy drm) drivers to point
  towards the graphics/drm-kmod ports for all architectures, not just amd64.
  drm-kmod has support for more architectures these days, and the
  graphics/drm-legacy-kmod port is being deprecated.
  
  Approved by:  imp
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D26174

Modified:
  head/sys/dev/drm2/drm_os_freebsd.h

Modified: head/sys/dev/drm2/drm_os_freebsd.h
==
--- head/sys/dev/drm2/drm_os_freebsd.h  Mon Aug 24 22:48:19 2020
(r364736)
+++ head/sys/dev/drm2/drm_os_freebsd.h  Mon Aug 24 22:53:23 2020
(r364737)
@@ -154,16 +154,12 @@ typedef void  irqreturn_t;
*(volatile u_int64_t *)(((vm_offset_t)(map)->handle) +  \
(vm_offset_t)(offset)) = htole64(val)
 
-#ifdef amd64
 #define DRM_PORT "graphics/drm-kmod"
-#else
-#define DRM_PORT "graphics/drm-legacy-kmod"
-#endif
 
 #define DRM_OBSOLETE(dev)  
\
 do {   
\
device_printf(dev, 
"===\n"); \
-   device_printf(dev, "This code is obsolete abandonware. Install the " 
DRM_PORT " pkg\n"); \
+   device_printf(dev, "This code is deprecated.  Install the " DRM_PORT " 
pkg\n"); \
device_printf(dev, 
"===\n"); \
gone_in_dev(dev, 13, "drm2 drivers");   
\
 } while (0)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2020-08-24 Thread Konstantin Belousov
Author: kib
Date: Mon Aug 24 22:12:45 2020
New Revision: 364734
URL: https://svnweb.freebsd.org/changeset/base/364734

Log:
  Restore workaround for sysret fault on non-canonical address after LA57.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/amd64/amd64/trap.c

Modified: head/sys/amd64/amd64/trap.c
==
--- head/sys/amd64/amd64/trap.c Mon Aug 24 20:40:26 2020(r364733)
+++ head/sys/amd64/amd64/trap.c Mon Aug 24 22:12:45 2020(r364734)
@@ -1189,7 +1189,8 @@ amd64_syscall(struct thread *td, int traced)
 * not be safe.  Instead, use the full return path which
 * catches the problem safely.
 */
-   if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS))
+   if (__predict_false(td->td_frame->tf_rip >= (la57 ?
+   VM_MAXUSER_ADDRESS_LA57 : VM_MAXUSER_ADDRESS_LA48)))
set_pcb_flags(td->td_pcb, PCB_FULL_IRET);
 
amd64_syscall_ret_flush_l1d_check_inline(td->td_errno);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364733 - head/share/mk

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:40:26 2020
New Revision: 364733
URL: https://svnweb.freebsd.org/changeset/base/364733

Log:
  After r364732, we can now enable MK_OPENMP for aarch64 by default.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Aug 24 20:37:18 2020(r364732)
+++ head/share/mk/src.opts.mk   Mon Aug 24 20:40:26 2020(r364733)
@@ -359,7 +359,8 @@ BROKEN_OPTIONS+=HYPERV
 BROKEN_OPTIONS+=NVME
 .endif
 
-.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64"
+.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \
+${__T} == "powerpc64"
 __DEFAULT_YES_OPTIONS+=OPENMP
 .else
 __DEFAULT_NO_OPTIONS+=OPENMP
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364732 - head/contrib/llvm-project/openmp/runtime/src

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:37:18 2020
New Revision: 364732
URL: https://svnweb.freebsd.org/changeset/base/364732

Log:
  Merge commit cde8f4c16 from llvm git (by me):
  
Move special va_list handling to kmp_os.h
  
Instead of copying and pasting the same #ifdef expressions in
multiple places, define a type and a pair of macros in kmp_os.h, to
handle whether va_list is pointer-like or not:
  
* kmp_va_list is the type to use for __kmp_fork_call()
* kmp_va_deref() dereferences a va_list, if necessary
* kmp_va_addr_of() takes the address of a va_list, if necessary
  
Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.
  
Reviewed By: AndreyChurbanov
  
Differential Revision: https://reviews.llvm.org/D86397
  
  This should enable building of LLVM's OpenMP on AArch64. Addition to
  share/mk will follow in a subsequent commit.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/contrib/llvm-project/openmp/runtime/src/kmp.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp.h
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:28:21 
2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:37:18 
2020(r364732)
@@ -3459,13 +3459,7 @@ enum fork_context_e {
 extern int __kmp_fork_call(ident_t *loc, int gtid,
enum fork_context_e fork_context, kmp_int32 argc,
microtask_t microtask, launch_t invoker,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   va_list *ap
-#else
-   va_list ap
-#endif
-   );
+   kmp_va_list ap);
 
 extern void __kmp_join_call(ident_t *loc, int gtid
 #if OMPT_SUPPORT

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km
 __kmp_fork_call(loc, gtid, fork_context_intel, argc,
 VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
 VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-&ap
-#else
-ap
-#endif
-);
+kmp_va_addr_of(ap));
 #if INCLUDE_SSC_MARKS
 SSC_MARK_JOINING();
 #endif
@@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1);
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1);
 
-  __kmp_fork_call(loc, gtid, fork_context_intel, argc,
-  VOLATILE_CAST(microtask_t)
-  __kmp_teams_master, // "wrapped" task
-  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-  &ap
-#else
-  ap
-#endif
-  );
+  __kmp_fork_call(
+  loc, gtid, fork_context_intel, argc,
+  VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task
+  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap));
   __kmp_join_call(loc, gtid
 #if OMPT_SUPPORT
   ,

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -376,13 +376,7 @@ static
   va_start(ap, argc);
 
   rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper,
-   __kmp_invoke_task_func,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   &ap
-#else
-   ap
-#endif
-   );
+   __kmp_invoke_task_func, kmp_va_addr_of(ap));
 
   va_end(ap);
 

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp

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

2020-08-24 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Aug 24 20:28:21 2020
New Revision: 364731
URL: https://svnweb.freebsd.org/changeset/base/364731

Log:
  netmap: use FreeBSD guards for epoch calls
  
  EPOCH calls are FreeBSD specific. Use guards to protect these, so
  that the code can compile under Linux.
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==
--- head/sys/dev/netmap/netmap.cMon Aug 24 20:23:34 2020
(r364730)
+++ head/sys/dev/netmap/netmap.cMon Aug 24 20:28:21 2020
(r364731)
@@ -1149,11 +1149,13 @@ netmap_dtor(void *data)
 static void
 netmap_send_up(struct ifnet *dst, struct mbq *q)
 {
-   struct epoch_tracker et;
struct mbuf *m;
struct mbuf *head = NULL, *prev = NULL;
+#ifdef __FreeBSD__
+   struct epoch_tracker et;
 
NET_EPOCH_ENTER(et);
+#endif /* __FreeBSD__ */
/* Send packets up, outside the lock; head/prev machinery
 * is only useful for Windows. */
while ((m = mbq_dequeue(q)) != NULL) {
@@ -1165,7 +1167,9 @@ netmap_send_up(struct ifnet *dst, struct mbq *q)
}
if (head)
nm_os_send_up(dst, NULL, head);
+#ifdef __FreeBSD__
NET_EPOCH_EXIT(et);
+#endif /* __FreeBSD__ */
mbq_fini(q);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364730 - in head/sys: kern net net/route

2020-08-24 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Aug 24 20:23:34 2020
New Revision: 364730
URL: https://svnweb.freebsd.org/changeset/base/364730

Log:
  Remove RT_LOCK mutex from rte.
  
  rtentry lock traditionally served 2 purposed: first was protecting refcounts,
   the second was assuring consistent field access/changes.
  Since route nexthop introduction, the need for the former disappeared and
   the need for the latter reduced.
  To be more precise, the following rte field are mutable:
  
  rt_nhop (nexthop pointer, updated with RIB_WLOCK, passed in rib_cmd_info)
  rte_flags (only RTF_HOST and RTF_UP, where RTF_UP gets changed at rte removal)
  rt_weight (relative weight, updated with RIB_WLOCK, passed in rib_cmd_info)
  rt_expire (time when rte deletion is scheduled, updated with RIB_WLOCK)
  rt_chain (deletion chain pointer, updated with RIB_WLOCK)
  All of them are updated under RIB_WLOCK, so the only remaining concern is the 
reading.
  
  rt_nhop and rt_weight (addressed in this review) are read under rib lock and
   stored in the rib_cmd_info, so the caller has no problem with consitency.
  rte_flags is currently read unlocked in rtsock reporting (however the scope
   is only RTF_UP flag, which is pretty static).
  rt_expire is currently read unlocked in rtsock reporting.
  rt_chain accesses are safe, as this is only used at route deletion.
  
  rt_expire and rte_flags reads will be dealt in a separate reviews soon.
  
  Differential Revision:https://reviews.freebsd.org/D26162

Modified:
  head/sys/kern/subr_witness.c
  head/sys/net/route.c
  head/sys/net/route/route_ctl.c
  head/sys/net/route/route_var.h
  head/sys/net/rtsock.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cMon Aug 24 20:02:36 2020
(r364729)
+++ head/sys/kern/subr_witness.cMon Aug 24 20:23:34 2020
(r364730)
@@ -531,7 +531,6 @@ static struct witness_order_list_entry order_lists[] =
 */
{ "so_rcv", &lock_class_mtx_sleep },
{ "radix node head", &lock_class_rm },
-   { "rtentry", &lock_class_mtx_sleep },
{ "ifaddr", &lock_class_mtx_sleep },
{ NULL, NULL },
/*

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Aug 24 20:02:36 2020(r364729)
+++ head/sys/net/route.cMon Aug 24 20:23:34 2020(r364730)
@@ -214,18 +214,19 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s
/* Verify the allowed flag mask. */
KASSERT(((flags & ~(RTF_GATEWAY)) == 0),
("invalid redirect flags: %x", flags));
+   flags |= RTF_HOST | RTF_DYNAMIC;
 
/* Get the best ifa for the given interface and gateway. */
if ((ifa = ifaof_ifpforaddr(gateway, ifp)) == NULL)
return (ENETUNREACH);
ifa_ref(ifa);
-   
+
bzero(&info, sizeof(info));
info.rti_info[RTAX_DST] = dst;
info.rti_info[RTAX_GATEWAY] = gateway;
info.rti_ifa = ifa;
info.rti_ifp = ifp;
-   info.rti_flags = flags | RTF_HOST | RTF_DYNAMIC;
+   info.rti_flags = flags;
 
/* Setup route metrics to define expire time. */
bzero(&rti_rmx, sizeof(rti_rmx));
@@ -242,10 +243,6 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s
return (error);
}
 
-   RT_LOCK(rc.rc_rt);
-   flags = rc.rc_rt->rte_flags;
-   RT_UNLOCK(rc.rc_rt);
-
RTSTAT_INC(rts_dynamic);
 
/* Send notification of a route addition to userland. */
@@ -253,7 +250,7 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s
info.rti_info[RTAX_DST] = dst;
info.rti_info[RTAX_GATEWAY] = gateway;
info.rti_info[RTAX_AUTHOR] = author;
-   rt_missmsg_fib(RTM_REDIRECT, &info, flags, error, fibnum);
+   rt_missmsg_fib(RTM_REDIRECT, &info, flags | RTF_UP, error, fibnum);
 
return (0);
 }
@@ -811,9 +808,7 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin
 */
if (rn) {
rto = RNTORT(rn);
-   RT_LOCK(rto);
rto->rte_flags |= RTF_UP;
-   RT_UNLOCK(rto);
} else if (rt->rte_flags & RTF_GATEWAY) {
/*
 * For gateway routes, we need to 

Modified: head/sys/net/route/route_ctl.c
==
--- head/sys/net/route/route_ctl.c  Mon Aug 24 20:02:36 2020
(r364729)
+++ head/sys/net/route/route_ctl.c  Mon Aug 24 20:23:34 2020
(r364730)
@@ -149,9 +149,6 @@ rtfree(struct rtentry *rt)
 
KASSERT(rt != NULL, ("%s: NULL rt", __func__));
 
-   RT_LOCK_ASSERT(rt);
-
-   RT_UNLOCK(rt);
epoch_call(net_epoch_preempt, destroy_rtentry_epoch,
&rt->rt_epoch_ctx)

Re: svn commit: r364675 - head/sys/powerpc/powerpc

2020-08-24 Thread John Baldwin
On 8/24/20 6:40 AM, Leandro Lupori wrote:
> Author: luporl
> Date: Mon Aug 24 13:40:35 2020
> New Revision: 364675
> URL: https://svnweb.freebsd.org/changeset/base/364675
> 
> Log:
>   [PowerPC] Make new auxv format default
>   
>   Assume ELF images without OSREL use the new auxv format.
>   
>   This is specially important for rtld, that is not tagged. Using
>   direct exec mode with new (ELFv2) binaries that expect the new auxv
>   format would result in crashes otherwise.
>   
>   Unfortunately, this may break direct exec'ing old binaries,
>   but it seems better to correctly support new binaries by default,
>   considering the transition to ELFv2 happened quite some time
>   ago. If needed, a sysctl may be added to allow old auxv format to
>   be used when OSREL is not found.

BTW, rtld is now tagged in HEAD as of r363264 (a little over a month
ago)

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364728 - head

2020-08-24 Thread Warner Losh
Author: imp
Date: Mon Aug 24 20:02:13 2020
New Revision: 364728
URL: https://svnweb.freebsd.org/changeset/base/364728

Log:
  Fix silly typo...

Modified:
  head/RELNOTES

Modified: head/RELNOTES
==
--- head/RELNOTES   Mon Aug 24 19:49:22 2020(r364727)
+++ head/RELNOTES   Mon Aug 24 20:02:13 2020(r364728)
@@ -12,7 +12,7 @@ Changes to this file should not be MFCed.
 
 r364725:
Changes to one obscure devd event generated on resume need to
-   be documented. The old form will still be gerated in 13, but not
+   be documented. The old form will still be generated in 13, but not
in 14.
 
 r363679:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364727 - head

2020-08-24 Thread Warner Losh
Author: imp
Date: Mon Aug 24 19:49:22 2020
New Revision: 364727
URL: https://svnweb.freebsd.org/changeset/base/364727

Log:
  Document devd event change from r364725

Modified:
  head/RELNOTES

Modified: head/RELNOTES
==
--- head/RELNOTES   Mon Aug 24 19:35:27 2020(r364726)
+++ head/RELNOTES   Mon Aug 24 19:49:22 2020(r364727)
@@ -10,6 +10,11 @@ newline.  Entries should be separated by a newline.
 
 Changes to this file should not be MFCed.
 
+r364725:
+   Changes to one obscure devd event generated on resume need to
+   be documented. The old form will still be gerated in 13, but not
+   in 14.
+
 r363679:
Applications using regex(3), e.g. sed/grep, will no longer accept
redundant escapes for most ordinary characters.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364725 - in head: sbin/devd sys/kern

2020-08-24 Thread Warner Losh
Author: imp
Date: Mon Aug 24 19:35:15 2020
New Revision: 364725
URL: https://svnweb.freebsd.org/changeset/base/364725

Log:
  Change the resume notification event from 'kern' to 'kernel'
  
  We have both a system of 'kern' and of 'kernel'. Prefer the latter and
  convert this notification to use 'kernel' instead of 'kern'. As a
  transition period, continue to also generate the 'kern' notification
  until sometime after FreeBSD 13 is branched.
  
  MFC After: 3 days

Modified:
  head/sbin/devd/devd.conf.5
  head/sys/kern/subr_bus.c

Modified: head/sbin/devd/devd.conf.5
==
--- head/sbin/devd/devd.conf.5  Mon Aug 24 19:00:57 2020(r364724)
+++ head/sbin/devd/devd.conf.5  Mon Aug 24 19:35:15 2020(r364725)
@@ -465,6 +465,8 @@ provider size has changed.
 .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
 .It Li kern Ta Li power Ta Li resume Ta
 Notification that the system has woken from the suspended state.
+Note: this notification is deprecated and will be removed in
+.Fx 14.0 .
 .El
 .Pp
 .Pp
@@ -472,6 +474,8 @@ Notification that the system has woken from the suspen
 .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
 .It Li kernel Ta Li signal Ta Li coredump Ta
 Notification that a process has crashed and dumped core.
+.It Li kernel Ta Li power Ta Li resume Ta
+Notification that the system has woken from the suspended state.
 .El
 .Pp
 .Bl -column "System" "Subsystem" "1234567" -compact

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cMon Aug 24 19:00:57 2020(r364724)
+++ head/sys/kern/subr_bus.cMon Aug 24 19:35:15 2020(r364725)
@@ -4989,8 +4989,10 @@ root_resume(device_t dev)
int error;
 
error = bus_generic_resume(dev);
-   if (error == 0)
-   devctl_notify("kern", "power", "resume", NULL);
+   if (error == 0) {
+   devctl_notify("kern", "power", "resume", NULL); /* Deprecated 
gone in 14 */
+   devctl_notify("kernel", "power", "resume", NULL);
+   }
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364726 - head

2020-08-24 Thread Warner Losh
Author: imp
Date: Mon Aug 24 19:35:27 2020
New Revision: 364726
URL: https://svnweb.freebsd.org/changeset/base/364726

Log:
  Document the kern -> kernel name change for resume events.
  
  MFC After: 3 days

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Aug 24 19:35:15 2020(r364725)
+++ head/UPDATING   Mon Aug 24 19:35:27 2020(r364726)
@@ -26,6 +26,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20200824:
+   The resume code now notifies devd with the 'kernel' system
+   rather than the old 'kern' subsystem to be consistent with
+   other use. The old notification will be created as well, but
+   will be removed prior to FreeBSD 14.0.
+
 20200821:
r362275 changed the internal API between the kernel RPC and the
NFS modules. As such, all the modules must be recompiled from
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364723 - head/sys/kern

2020-08-24 Thread Mateusz Guzik
Author: mjg
Date: Mon Aug 24 18:23:58 2020
New Revision: 364723
URL: https://svnweb.freebsd.org/changeset/base/364723

Log:
  cache: remove leftover assert in vn_fullpath_any_smr
  
  It is only valid when !slash_prefixed. For slash_prefixed the length
  is properly accounted for later.
  
  Reported by:  markj (syzkaller)

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Mon Aug 24 18:17:13 2020(r364722)
+++ head/sys/kern/vfs_cache.c   Mon Aug 24 18:23:58 2020(r364723)
@@ -2834,8 +2834,6 @@ vn_fullpath_any_smr(struct vnode *vp, struct vnode *rd
 
orig_buflen = *buflen;
 
-   MPASS(*buflen >= 2);
-
if (!slash_prefixed) {
MPASS(*buflen >= 2);
*buflen -= 1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364722 - head/usr.sbin/unbound

2020-08-24 Thread Cy Schubert
Author: cy
Date: Mon Aug 24 18:17:13 2020
New Revision: 364722
URL: https://svnweb.freebsd.org/changeset/base/364722

Log:
  Update unbound version number.
  
  MFC after:1 month
  X-MFC with:   r364721

Modified:
  head/usr.sbin/unbound/config.h

Modified: head/usr.sbin/unbound/config.h
==
--- head/usr.sbin/unbound/config.h  Mon Aug 24 18:14:04 2020
(r364721)
+++ head/usr.sbin/unbound/config.h  Mon Aug 24 18:17:13 2020
(r364722)
@@ -687,7 +687,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.10.1"
+#define PACKAGE_VERSION "1.11.0"
 
 /* default pidfile location */
 #define PIDFILE "/var/unbound/unbound.pid"
@@ -709,7 +709,7 @@
 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
 
 /* version number for resource files */
-#define RSRC_PACKAGE_VERSION 1,9,6,0
+#define RSRC_PACKAGE_VERSION 1,11,0,0
 
 /* Directory to chdir to */
 #define RUN_DIR "/var/unbound"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364720 - in head/contrib/sqlite3: . tea

2020-08-24 Thread Cy Schubert
Author: cy
Date: Mon Aug 24 18:13:44 2020
New Revision: 364720
URL: https://svnweb.freebsd.org/changeset/base/364720

Log:
  MFV 364467:
  
  Update sqlite to 3.33.0 (333).
  
  Release announcement at https://www.sqlite.org/releaselog/3_33_0.html.
  
  MFC after:1 month

Added:
  head/contrib/sqlite3/sqlite3rc.h
 - copied unchanged from r364467, vendor/sqlite3/dist/sqlite3rc.h
Modified:
  head/contrib/sqlite3/Makefile.am
  head/contrib/sqlite3/Makefile.in
  head/contrib/sqlite3/configure
  head/contrib/sqlite3/configure.ac
  head/contrib/sqlite3/shell.c
  head/contrib/sqlite3/sqlite3.c
  head/contrib/sqlite3/sqlite3.h
  head/contrib/sqlite3/tea/configure
  head/contrib/sqlite3/tea/configure.ac
Directory Properties:
  head/contrib/sqlite3/   (props changed)

Modified: head/contrib/sqlite3/Makefile.am
==
--- head/contrib/sqlite3/Makefile.amMon Aug 24 17:57:08 2020
(r364719)
+++ head/contrib/sqlite3/Makefile.amMon Aug 24 18:13:44 2020
(r364720)
@@ -13,7 +13,7 @@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_
 
 include_HEADERS = sqlite3.h sqlite3ext.h
 
-EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs 
Makefile.fallback
+EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt 
Replace.cs Makefile.fallback
 pkgconfigdir = ${libdir}/pkgconfig
 pkgconfig_DATA = sqlite3.pc
 

Modified: head/contrib/sqlite3/Makefile.in
==
--- head/contrib/sqlite3/Makefile.inMon Aug 24 17:57:08 2020
(r364719)
+++ head/contrib/sqlite3/Makefile.inMon Aug 24 18:13:44 2020
(r364720)
@@ -370,7 +370,7 @@ sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
 sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
 sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS 
-DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB 
-DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS)
 include_HEADERS = sqlite3.h sqlite3ext.h
-EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs 
Makefile.fallback
+EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt 
Replace.cs Makefile.fallback
 pkgconfigdir = ${libdir}/pkgconfig
 pkgconfig_DATA = sqlite3.pc
 man_MANS = sqlite3.1

Modified: head/contrib/sqlite3/configure
==
--- head/contrib/sqlite3/configure  Mon Aug 24 17:57:08 2020
(r364719)
+++ head/contrib/sqlite3/configure  Mon Aug 24 18:13:44 2020
(r364720)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.32.3.
+# Generated by GNU Autoconf 2.69 for sqlite 3.33.0.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.32.3'
-PACKAGE_STRING='sqlite 3.32.3'
+PACKAGE_VERSION='3.33.0'
+PACKAGE_STRING='sqlite 3.33.0'
 PACKAGE_BUGREPORT='http://www.sqlite.org'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.33.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.32.3:";;
+ short | recursive ) echo "Configuration of sqlite 3.33.0:";;
esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.32.3
+sqlite configure 3.33.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.32.3, which was
+It was created by sqlite $as_me 3.33.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2818,7 +2818,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sqlite'
- VERSION='3.32.3'
+ VERSION='3.33.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.32.3, which was
+This file was extended by sqlite $as_me 3.33.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -14495,7 +14

svn commit: r364721 - in head/contrib/unbound: . .github cachedb contrib contrib/android contrib/ios daemon dns64 dnstap doc dynlibmod edns-subnet iterator libunbound respip services sldns smallapp...

2020-08-24 Thread Cy Schubert
Author: cy
Date: Mon Aug 24 18:14:04 2020
New Revision: 364721
URL: https://svnweb.freebsd.org/changeset/base/364721

Log:
  MFV 364468:
  
  Update unbound 1.10.1 --> 1.11.0.
  
  MFH:  1 month

Added:
  head/contrib/unbound/README-Travis.md
 - copied unchanged from r364468, vendor/unbound/dist/README-Travis.md
  head/contrib/unbound/contrib/android/
 - copied from r364468, vendor/unbound/dist/contrib/android/
  head/contrib/unbound/contrib/ios/
 - copied from r364468, vendor/unbound/dist/contrib/ios/
  head/contrib/unbound/dnstap/dnstap_fstrm.c
 - copied unchanged from r364468, vendor/unbound/dist/dnstap/dnstap_fstrm.c
  head/contrib/unbound/dnstap/dnstap_fstrm.h
 - copied unchanged from r364468, vendor/unbound/dist/dnstap/dnstap_fstrm.h
  head/contrib/unbound/dnstap/dtstream.c
 - copied unchanged from r364468, vendor/unbound/dist/dnstap/dtstream.c
  head/contrib/unbound/dnstap/dtstream.h
 - copied unchanged from r364468, vendor/unbound/dist/dnstap/dtstream.h
  head/contrib/unbound/dnstap/unbound-dnstap-socket.c
 - copied unchanged from r364468, 
vendor/unbound/dist/dnstap/unbound-dnstap-socket.c
  head/contrib/unbound/dynlibmod/
 - copied from r364468, vendor/unbound/dist/dynlibmod/
Modified:
  head/contrib/unbound/.github/FUNDING.yml
  head/contrib/unbound/.travis.yml
  head/contrib/unbound/Makefile.in
  head/contrib/unbound/acx_python.m4
  head/contrib/unbound/cachedb/cachedb.c
  head/contrib/unbound/cachedb/cachedb.h
  head/contrib/unbound/cachedb/redis.c
  head/contrib/unbound/config.guess
  head/contrib/unbound/config.h.in
  head/contrib/unbound/config.sub
  head/contrib/unbound/configure
  head/contrib/unbound/configure.ac
  head/contrib/unbound/contrib/-filter-iterator.patch
  head/contrib/unbound/contrib/fastrpz.patch
  head/contrib/unbound/contrib/libunbound.pc.in
  head/contrib/unbound/contrib/unbound.service.in
  head/contrib/unbound/daemon/acl_list.c
  head/contrib/unbound/daemon/daemon.c
  head/contrib/unbound/daemon/remote.c
  head/contrib/unbound/daemon/unbound.c
  head/contrib/unbound/daemon/worker.c
  head/contrib/unbound/dns64/dns64.c
  head/contrib/unbound/dnstap/dnstap.c
  head/contrib/unbound/dnstap/dnstap.h
  head/contrib/unbound/dnstap/dnstap.m4
  head/contrib/unbound/doc/Changelog
  head/contrib/unbound/doc/README
  head/contrib/unbound/doc/example.conf.in
  head/contrib/unbound/doc/libunbound.3.in
  head/contrib/unbound/doc/unbound-anchor.8.in
  head/contrib/unbound/doc/unbound-checkconf.8.in
  head/contrib/unbound/doc/unbound-control.8.in
  head/contrib/unbound/doc/unbound-host.1.in
  head/contrib/unbound/doc/unbound.8.in
  head/contrib/unbound/doc/unbound.conf.5.in
  head/contrib/unbound/edns-subnet/subnetmod.c
  head/contrib/unbound/edns-subnet/subnetmod.h
  head/contrib/unbound/iterator/iter_utils.c
  head/contrib/unbound/iterator/iterator.c
  head/contrib/unbound/iterator/iterator.h
  head/contrib/unbound/libunbound/libworker.c
  head/contrib/unbound/libunbound/unbound.h
  head/contrib/unbound/respip/respip.c
  head/contrib/unbound/services/authzone.c
  head/contrib/unbound/services/authzone.h
  head/contrib/unbound/services/listen_dnsport.c
  head/contrib/unbound/services/listen_dnsport.h
  head/contrib/unbound/services/localzone.c
  head/contrib/unbound/services/mesh.c
  head/contrib/unbound/services/modstack.c
  head/contrib/unbound/services/outside_network.c
  head/contrib/unbound/services/outside_network.h
  head/contrib/unbound/services/rpz.c
  head/contrib/unbound/services/rpz.h
  head/contrib/unbound/sldns/parseutil.c
  head/contrib/unbound/smallapp/unbound-anchor.c
  head/contrib/unbound/smallapp/unbound-checkconf.c
  head/contrib/unbound/smallapp/unbound-control-setup.sh.in
  head/contrib/unbound/smallapp/unbound-control.c
  head/contrib/unbound/smallapp/worker_cb.c
  head/contrib/unbound/util/config_file.c
  head/contrib/unbound/util/config_file.h
  head/contrib/unbound/util/configlexer.lex
  head/contrib/unbound/util/configparser.y
  head/contrib/unbound/util/fptr_wlist.c
  head/contrib/unbound/util/iana_ports.inc
  head/contrib/unbound/util/mini_event.h
  head/contrib/unbound/util/net_help.c
  head/contrib/unbound/util/net_help.h
  head/contrib/unbound/util/netevent.c
  head/contrib/unbound/util/netevent.h
  head/contrib/unbound/util/shm_side/shm_main.c
  head/contrib/unbound/util/ub_event.c
  head/contrib/unbound/validator/val_secalgo.c
  head/contrib/unbound/validator/val_sigcrypt.c
Directory Properties:
  head/contrib/unbound/   (props changed)

Modified: head/contrib/unbound/.github/FUNDING.yml
==
--- head/contrib/unbound/.github/FUNDING.ymlMon Aug 24 18:13:44 2020
(r364720)
+++ head/contrib/unbound/.github/FUNDING.ymlMon Aug 24 18:14:04 2020
(r364721)
@@ -1,12 +1,2 @@
-# These are supported funding model platforms
-
-github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, 
user2]
-patreon

svn commit: r364719 - head/usr.bin/w

2020-08-24 Thread Fernando Apesteguía
Author: fernape (ports committer)
Date: Mon Aug 24 17:57:08 2020
New Revision: 364719
URL: https://svnweb.freebsd.org/changeset/base/364719

Log:
  w(1): Add EXAMPLES to man page
  
  Add small example section showing general use and -d and -h flags
  
  Approved by:  manpages (bcr@)
  Differential Revision:https://reviews.freebsd.org/D26172

Modified:
  head/usr.bin/w/w.1

Modified: head/usr.bin/w/w.1
==
--- head/usr.bin/w/w.1  Mon Aug 24 17:43:23 2020(r364718)
+++ head/usr.bin/w/w.1  Mon Aug 24 17:57:08 2020(r364719)
@@ -28,7 +28,7 @@
 .\" @(#)w.18.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd December 1, 2015
+.Dd August 24, 2020
 .Dt W 1
 .Os
 .Sh NAME
@@ -99,6 +99,41 @@ names are specified, the output is restricted to those
 .It Pa /var/run/utx.active
 list of users on the system
 .El
+.Sh EXAMPLES
+Show global activity of the system:
+.Bd -literal -offset indent
+$ w
+ 8:05PM  up 35 mins, 3 users, load averages: 0.09, 0.35, 0.27
+USER   TTY  FROMLOGIN@  IDLE WHAT
+fernapev0   -   7:30PM - tmux: client 
(/tmp/tmux-1001/default) (tmux)
+root   v1   -   8:03PM 1 -bash (bash)
+fernapepts/0tmux(1391).%0   8:04PM - w
+.Ed
+.Pp
+Show the entire process list per tty:
+.Bd -literal -offset indent
+$ w -d
+ 8:12PM  up 42 mins, 3 users, load averages: 0.01, 0.11, 0.17
+USER   TTY  FROMLOGIN@  IDLE WHAT
+1199  login [pam] (login)
+1207  -bash (bash)
+1507  tmux: client (/tmp/tmux-1001/default) (tmux)
+fernapev0   -   7:30PM - tmux: client 
(/tmp/tmux-1001/default) (tmux)
+1488  login [pam] (login)
+1489  -bash (bash)
+root   v1   -   8:08PM 3 -bash (bash)
+1510  -bash (bash)
+1515  w -d
+fernapepts/0tmux(1509).%0   8:11PM - w -d
+.Ed
+.Pp
+Same as above but only for the root user and omitting the heading:
+.Bd -literal -offset indent
+$ w -d -h root
+   1183  login [pam] (login)
+   1204  -bash (bash)
+root   v1   -   7:15PM - -bash (bash)
+.Ed
 .Sh COMPATIBILITY
 The
 .Fl f ,
@@ -137,9 +172,7 @@ to ignore interrupts.
 prints
 .Ql \- . )
 .Pp
-The
-.Tn CPU
-time is only an estimate, in particular, if someone leaves a background
+The CPU time is only an estimate, in particular, if someone leaves a background
 process running after logging out, the person currently on that terminal is
 .Dq charged
 with the time.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364718 - in head: contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic...

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 17:43:23 2020
New Revision: 364718
URL: https://svnweb.freebsd.org/changeset/base/364718

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/libunwind/src/AddressSpace.hpp
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/lld/docs/conf.py
  head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64StackOffset.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
==
--- head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:43:23 2020(r364718)
@@ -54,6 +54,10 @@ class TargetOptions { (public)
   /// be a list of strings starting with by '+' or '-'.
   std::vector Features;
 
+  /// The map of which features have been enabled disabled based on the command
+  /// line.
+  llvm::StringMap FeatureMap;
+
   /// Supported OpenCL extensions and optional core features.
   OpenCLOptions SupportedOpenCLOptions;
 

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:43:23 2020(r364718)
@@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect
   HelpText<"Enable stack protectors for all functions">;
 def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, 
Group, Flags<[CC1Option]>,
   HelpText<"Enable stack clash protection">;
-def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, 
Group,
+def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, 
Group,
   HelpText<"Disable stack clash protection">;
 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, 
Group,
   HelpText<"Enable stack protectors for some functions vulnerable to stack 
smashing. "

Modified: head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
==
--- head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp  Mon Aug 24 
17:31:17 2020(r364717)
+++ head/contrib/llvm-proj

svn commit: r364711 - head/usr.sbin/gstat

2020-08-24 Thread Maxim Sobolev
Author: sobomax
Date: Mon Aug 24 16:45:23 2020
New Revision: 364711
URL: https://svnweb.freebsd.org/changeset/base/364711

Log:
  In the endless batch mode (-B), terminate if and when stdout is closed.
  That mode is useful to call gstat from other app, however kinda useless
  since gstat won't exit and stay running forever when its parent process
  has long gone.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/gstat/gstat.c

Modified: head/usr.sbin/gstat/gstat.c
==
--- head/usr.sbin/gstat/gstat.c Mon Aug 24 16:44:17 2020(r364710)
+++ head/usr.sbin/gstat/gstat.c Mon Aug 24 16:45:23 2020(r364711)
@@ -517,7 +517,8 @@ main(int argc, char **argv)
if (!flag_B)
loop = 0;
else
-   fflush(stdout);
+   if (fflush(stdout) == EOF)
+   goto out;
usleep(flag_I);
continue;
}
@@ -585,7 +586,7 @@ main(int argc, char **argv)
}
}
}
-
+out:
if (!flag_b) {
el_end(el);
endwin();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364701 - in head: . tools/build

2020-08-24 Thread Warner Losh
Author: imp
Date: Mon Aug 24 16:06:11 2020
New Revision: 364701
URL: https://svnweb.freebsd.org/changeset/base/364701

Log:
  When copying over the binaries, use '-p' to preserve date/time
  
  Although I can't reproduce it, others are seeing different lex/yacc
  programs always regenerated after my change to copy rather than
  symlink the files. The reported fix is to add '-p' to the copies.
  Since it doesn't hurt, go head and add it, though the reasons for
  this mattering remain at best obscure and poorly articulated.

Modified:
  head/Makefile.inc1
  head/tools/build/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Aug 24 16:00:58 2020(r364700)
+++ head/Makefile.inc1  Mon Aug 24 16:06:11 2020(r364701)
@@ -2319,7 +2319,7 @@ ${_bt}-link-${_tool}: .PHONY .MAKE
if [ ! -e "$${source_path}" ] ; then \
echo "Cannot find host tool '${_tool}'"; false; \
fi; \
-   cp -f "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"
+   cp -pf "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"
 ${_bt}-links: ${_bt}-link-${_tool}
 .endfor
 

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Mon Aug 24 16:00:58 2020(r364700)
+++ head/tools/build/Makefile   Mon Aug 24 16:06:11 2020(r364701)
@@ -130,7 +130,7 @@ host-symlinks:
echo "Cannot find host tool '${_tool}'"; false; \
fi; \
rm -f "${DESTDIR}/bin/${_tool}"; \
-   cp -f "$${source_path}" "${DESTDIR}/bin/${_tool}"
+   cp -pf "$${source_path}" "${DESTDIR}/bin/${_tool}"
 .endfor
 .for _tool in ${_host_abs_tools_to_symlink}
@source_path="${_tool:S/:/ /:[1]}"; \
@@ -139,11 +139,11 @@ host-symlinks:
echo "Host tool '${src_path}' is missing"; false; \
fi; \
rm -f "$${target_path}"; \
-   cp -f "$${source_path}" "$${target_path}"
+   cp -pf "$${source_path}" "$${target_path}"
 .endfor
 .if exists(/usr/libexec/flua)
rm -f ${DESTDIR}/usr/libexec/flua
-   cp -f /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
+   cp -pf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
 .endif
 
 # Create all the directories that are needed during the legacy, bootstrap-tools
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364684 - head/usr.sbin/bsdinstall

2020-08-24 Thread Marc Fonvieille
Author: blackend (doc committer)
Date: Mon Aug 24 14:04:59 2020
New Revision: 364684
URL: https://svnweb.freebsd.org/changeset/base/364684

Log:
  s/redundacy/redundancy
  
  MFC after:1 week

Modified:
  head/usr.sbin/bsdinstall/bsdinstall.8

Modified: head/usr.sbin/bsdinstall/bsdinstall.8
==
--- head/usr.sbin/bsdinstall/bsdinstall.8   Mon Aug 24 14:01:52 2020
(r364683)
+++ head/usr.sbin/bsdinstall/bsdinstall.8   Mon Aug 24 14:04:59 2020
(r364684)
@@ -349,7 +349,7 @@ Default:
 .Dq default
 .It Ev ZFSBOOT_VDEV_TYPE
 The type of pool to be created for the base system.
-This variable can take one of this values: stripe (No redundacy),
+This variable can take one of this values: stripe (No redundancy),
 mirror (n-Way mirroring), raid10 (RAID 1+0 - n x 2-Way Mirrors),
 raidz1 (RAID-Z1 - Single Redundancy RAID), raidz2 (RAID-Z2 - Double Redundancy 
RAID)
 or raidz3 (RAID-Z3 Triple Redundancy RAID).
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364682 - head/usr.sbin/bsdinstall/scripts

2020-08-24 Thread Marc Fonvieille
Author: blackend (doc committer)
Date: Mon Aug 24 14:00:12 2020
New Revision: 364682
URL: https://svnweb.freebsd.org/changeset/base/364682

Log:
  Add missing Korean doc package entry, remove non-existent Serbian doc
  package entry.
  
  Approved by:  re (gjb)
  MFC after:1 week

Modified:
  head/usr.sbin/bsdinstall/scripts/docsinstall

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==
--- head/usr.sbin/bsdinstall/scripts/docsinstallMon Aug 24 13:56:15 
2020(r364681)
+++ head/usr.sbin/bsdinstall/scripts/docsinstallMon Aug 24 14:00:12 
2020(r364682)
@@ -42,7 +42,7 @@ f_include $BSDCFG_SHARE/packages/packages.subr
 # List of languages to display (descriptions pulled from $msg_{lang}doc_desc)
 #
 : ${DOCSINSTALL_LANGS:=\
-   bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \
+   bn da de el en es fr hu it ja ko mn nl pl pt ru tr zh_cn zh_tw \
 }
 
  GLOBALS
@@ -65,13 +65,13 @@ msg_freebsd_installer="FreeBSD Installer"
 msg_hudoc_desc="Hungarian Documentation"
 msg_itdoc_desc="Italian Documentation"
 msg_jadoc_desc="Japanese Documentation"
+msg_kodoc_desc="Korean Documentation"
 msg_mndoc_desc="Mongolian Documentation"
 msg_nldoc_desc="Dutch Documentation"
 msg_ok="OK"
 msg_pldoc_desc="Polish Documentation"
 msg_ptdoc_desc="Portuguese Documentation"
 msg_rudoc_desc="Russian Documentation"
-msg_srdoc_desc="Serbian Documentation"
 msg_trdoc_desc="Turkish Documentation"
 msg_zh_cndoc_desc="Simplified Chinese Documentation"
 msg_zh_twdoc_desc="Traditional Chinese Documentation"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364675 - head/sys/powerpc/powerpc

2020-08-24 Thread Leandro Lupori
Author: luporl
Date: Mon Aug 24 13:40:35 2020
New Revision: 364675
URL: https://svnweb.freebsd.org/changeset/base/364675

Log:
  [PowerPC] Make new auxv format default
  
  Assume ELF images without OSREL use the new auxv format.
  
  This is specially important for rtld, that is not tagged. Using
  direct exec mode with new (ELFv2) binaries that expect the new auxv
  format would result in crashes otherwise.
  
  Unfortunately, this may break direct exec'ing old binaries,
  but it seems better to correctly support new binaries by default,
  considering the transition to ELFv2 happened quite some time
  ago. If needed, a sysctl may be added to allow old auxv format to
  be used when OSREL is not found.
  
  Reviewed by:  bdragon
  Sponsored by: Eldorado Research Institute (eldorado.org.br)
  Differential Revision:https://reviews.freebsd.org/D25651

Modified:
  head/sys/powerpc/powerpc/elf_common.c

Modified: head/sys/powerpc/powerpc/elf_common.c
==
--- head/sys/powerpc/powerpc/elf_common.c   Mon Aug 24 13:19:16 2020
(r364674)
+++ head/sys/powerpc/powerpc/elf_common.c   Mon Aug 24 13:40:35 2020
(r364675)
@@ -36,7 +36,22 @@ __elfN(powerpc_copyout_auxargs)(struct image_params *i
Elf_Auxinfo *argarray, *pos;
int error;
 
-   if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS)
+   /*
+* XXX If we can't find image's OSREL, assume it uses the new auxv
+* format.
+*
+* This is specially important for rtld, that is not tagged. Using
+* direct exec mode with new (ELFv2) binaries that expect the new auxv
+* format would result in crashes otherwise.
+*
+* Unfortunately, this may break direct exec'ing old binaries,
+* but it seems better to correctly support new binaries by default,
+* considering the transition to ELFv2 happened quite some time
+* ago. If needed, a sysctl may be added to allow old auxv format to
+* be used when OSREL is not found.
+*/
+   if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS ||
+   imgp->proc->p_osrel == 0)
return (__elfN(freebsd_copyout_auxargs)(imgp, base));
 
args = (Elf_Auxargs *)imgp->auxargs;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364673 - in head/sys: dev/rtwn dev/usb/wlan net80211

2020-08-24 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Aug 24 13:15:08 2020
New Revision: 364673
URL: https://svnweb.freebsd.org/changeset/base/364673

Log:
  net80211: enhance getflags*() and ieee80211_add_channel*()
  
  For ieee80211_add_channel+*() we are passing in an int flag for
  ht40 and in some cases another int flag for vht80 where we'd only
  need two bits really.
  Convert these variables to a bitflag and fold them together into one.
  This also allows for VHT160 and VHT80P80 and whatever may come to
  be considered. Define the various options currently needed.
  
  Change the drivers (rtwn and rsu) which actually set this bit to non-0.
  For convenience the "1" currently used for HT40 is preserved.
  
  Enahnce getflags_5ghz() to handle the full set of VHT flags based
  on the input flags from the the driver.
  
  Update the regdomain implementation as well to make use of the new
  flags and deal with higher [V]HT bandwidths.
  
  ieee80211_add_channel() specifically did not take flags so it will
  not support naything beyond 20Mhz channels.
  
  Note: I am not entirely happy with the "cbw_flag[s]" name, but we
  do use chan_flags elsewhere already.
  
  MFC after:2 weeks
  Reviewed by:  adrian, gnn
  Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
  Differential revision:https://reviews.freebsd.org/D26091

Modified:
  head/sys/dev/rtwn/if_rtwn.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_regdomain.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/dev/rtwn/if_rtwn.c
==
--- head/sys/dev/rtwn/if_rtwn.c Mon Aug 24 13:14:38 2020(r364672)
+++ head/sys/dev/rtwn/if_rtwn.c Mon Aug 24 13:15:08 2020(r364673)
@@ -1525,25 +1525,29 @@ rtwn_getradiocaps(struct ieee80211com *ic,
 {
struct rtwn_softc *sc = ic->ic_softc;
uint8_t bands[IEEE80211_MODE_BYTES];
-   int i;
+   int cbw_flags, i;
 
+   cbw_flags = (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ?
+   NET80211_CBW_FLAG_HT40 : 0;
+
memset(bands, 0, sizeof(bands));
setbit(bands, IEEE80211_MODE_11B);
setbit(bands, IEEE80211_MODE_11G);
setbit(bands, IEEE80211_MODE_11NG);
ieee80211_add_channels_default_2ghz(chans, maxchans, nchans,
-   bands, !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40));
+   bands, cbw_flags);
 
/* XXX workaround add_channel_list() limitations */
setbit(bands, IEEE80211_MODE_11A);
setbit(bands, IEEE80211_MODE_11NA);
for (i = 0; i < nitems(sc->chan_num_5ghz); i++) {
+
if (sc->chan_num_5ghz[i] == 0)
continue;
 
ieee80211_add_channel_list_5ghz(chans, maxchans, nchans,
sc->chan_list_5ghz[i], sc->chan_num_5ghz[i], bands,
-   !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40));
+   cbw_flags);
}
 }
 

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Mon Aug 24 13:14:38 2020
(r364672)
+++ head/sys/dev/usb/wlan/if_rsu.c  Mon Aug 24 13:15:08 2020
(r364673)
@@ -779,7 +779,8 @@ rsu_getradiocaps(struct ieee80211com *ic,
if (sc->sc_ht)
setbit(bands, IEEE80211_MODE_11NG);
ieee80211_add_channels_default_2ghz(chans, maxchans, nchans,
-   bands, (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) != 0);
+   bands, (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ?
+   NET80211_CBW_FLAG_HT40 : 0);
 }
 
 static void

Modified: head/sys/net80211/ieee80211.c
==
--- head/sys/net80211/ieee80211.c   Mon Aug 24 13:14:38 2020
(r364672)
+++ head/sys/net80211/ieee80211.c   Mon Aug 24 13:15:08 2020
(r364673)
@@ -1301,7 +1301,7 @@ copychan_prev(struct ieee80211_channel chans[], int ma
  * XXX VHT-2GHz
  */
 static void
-getflags_2ghz(const uint8_t bands[], uint32_t flags[], int ht40)
+getflags_2ghz(const uint8_t bands[], uint32_t flags[], int cbw_flags)
 {
int nmodes;
 
@@ -1312,7 +1312,7 @@ getflags_2ghz(const uint8_t bands[], uint32_t flags[],
flags[nmodes++] = IEEE80211_CHAN_G;
if (isset(bands, IEEE80211_MODE_11NG))
flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT20;
-   if (ht40) {
+   if (cbw_flags & NET80211_CBW_FLAG_HT40) {
flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U;
flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D;
}
@@ -1320,12 +1320,12 @@ getflags_2ghz(const uint8_t bands[], uint32_t flags[],
 }
 
 static void
-getflags_5ghz(const uint8_t bands[], uint32_t flags[], int ht40, int vht80)
+getflags_5ghz(const uint8_t bands[], uint32_t flags[], int cbw_flags)
 {
int nmodes;
 
/*
-  

svn commit: r364656 - in head/sys: amd64/amd64 i386/i386

2020-08-24 Thread Peter Grehan
Author: grehan
Date: Mon Aug 24 11:49:49 2020
New Revision: 364656
URL: https://svnweb.freebsd.org/changeset/base/364656

Log:
  cpu_auxmsr: assert caller is preventing CPU migration.
  
  Submitted by: Adam Fenn (adam at fenn dot io)
  Requested by: kib
  Reviewed by:  kib, grehan
  Approved by:  kib
  MFC after:3 weeks
  Differential Revision:https://reviews.freebsd.org/D26166

Modified:
  head/sys/amd64/amd64/initcpu.c
  head/sys/i386/i386/initcpu.c

Modified: head/sys/amd64/amd64/initcpu.c
==
--- head/sys/amd64/amd64/initcpu.c  Mon Aug 24 11:44:20 2020
(r364655)
+++ head/sys/amd64/amd64/initcpu.c  Mon Aug 24 11:49:49 2020
(r364656)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -218,11 +219,14 @@ init_via(void)
 }
 
 /*
- * The value for the TSC_AUX MSR and rdtscp/rdpid.
+ * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU.
+ *
+ * Caller should prevent CPU migration.
  */
 u_int
 cpu_auxmsr(void)
 {
+   KASSERT((read_rflags() & PSL_I) == 0, ("context switch possible"));
return (PCPU_GET(cpuid));
 }
 

Modified: head/sys/i386/i386/initcpu.c
==
--- head/sys/i386/i386/initcpu.cMon Aug 24 11:44:20 2020
(r364655)
+++ head/sys/i386/i386/initcpu.cMon Aug 24 11:49:49 2020
(r364656)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -628,11 +629,14 @@ init_transmeta(void)
 #endif
 
 /*
- * The value for the TSC_AUX MSR and rdtscp/rdpid.
+ * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU.
+ *
+ * Caller should prevent CPU migration.
  */
 u_int
 cpu_auxmsr(void)
 {
+   KASSERT((read_eflags() & PSL_I) == 0, ("context switch possible"));
return (PCPU_GET(cpuid));
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364655 - head/sys/net

2020-08-24 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Aug 24 11:44:20 2020
New Revision: 364655
URL: https://svnweb.freebsd.org/changeset/base/364655

Log:
  iflib: fix isc_rxd_flush call in netmap_fl_refill()
  
  The semantic of the pidx argument of isc_rxd_flush() is the
  last valid index of in the free list, rather than the next
  index to be published. However, netmap was still using the
  old convention. While there, also refactor the netmap_fl_refill()
  to simplify a little bit and add an assertion.
  
  MFC after:2 weeks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cMon Aug 24 10:46:09 2020(r364654)
+++ head/sys/net/iflib.cMon Aug 24 11:44:20 2020(r364655)
@@ -757,7 +757,7 @@ iflib_num_tx_descs(if_ctx_t ctx)
 
 MODULE_DEPEND(iflib, netmap, 1, 1, 1);
 
-static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, 
uint32_t nm_i, bool init);
+static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool 
init);
 
 /*
  * device-specific sysctl variables:
@@ -828,33 +828,43 @@ iflib_netmap_register(struct netmap_adapter *na, int o
 }
 
 static int
-netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, uint32_t nm_i, 
bool init)
+netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init)
 {
struct netmap_adapter *na = kring->na;
u_int const lim = kring->nkr_num_slots - 1;
u_int head = kring->rhead;
+   u_int nm_i = kring->nr_hwcur;
struct netmap_ring *ring = kring->ring;
bus_dmamap_t *map;
struct if_rxd_update iru;
if_ctx_t ctx = rxq->ifr_ctx;
iflib_fl_t fl = &rxq->ifr_fl[0];
-   uint32_t nic_i_first, nic_i;
+   u_int nic_i_first, nic_i;
int i;
 #if IFLIB_DEBUG_COUNTERS
int rf_count = 0;
 #endif
 
-   if (nm_i == head && __predict_true(!init))
+   /*
+* Netmap requires that we leave (at least) one free slot
+* in the ring, so that it can distinguish between an empty
+* ring (nr_hwcur == nr_hwtail, i.e. all the buffers owned by the
+* user) and a full ring (nr_hwtail == (nr_hwcur - 1) mod N, i.e.
+* all the buffers owned by the kernel).
+* We thus set head (the refill limit) to nr_hwcur - 1
+* at initialization. The rest of the code will then make sure
+* than nr_hwtail never overcomes nr_hwcur.
+*/
+   if (__predict_false(init)) {
+   head = nm_prev(nm_i, lim);
+   } else if (nm_i == head) {
+   /* Nothing to do. We can leave early. */
return (0);
+   }
 
iru_init(&iru, rxq, 0 /* flid */);
map = fl->ifl_sds.ifsd_map;
nic_i = netmap_idx_k2n(kring, nm_i);
-   /*
-* IMPORTANT: we must leave one free slot in the ring,
-* so move head back by one unit
-*/
-   head = nm_prev(head, lim);
DBG_COUNTER_INC(fl_refills);
while (nm_i != head) {
 #if IFLIB_DEBUG_COUNTERS
@@ -895,9 +905,13 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring 
}
kring->nr_hwcur = head;
 
+   /* The pidx argument of isc_rxd_flush() is the index of the last valid
+* slot in the free list ring. We need therefore to decrement nic_i,
+* similarly to what happens in iflib_fl_refill() for ifl_pidx. */
bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-   ctx->isc_rxd_flush(ctx->ifc_softc, rxq->ifr_id, fl->ifl_id, nic_i);
+   ctx->isc_rxd_flush(ctx->ifc_softc, rxq->ifr_id, fl->ifl_id,
+   nm_prev(nic_i, lim));
DBG_COUNTER_INC(rxd_flush);
 
return (0);
@@ -1127,6 +1141,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl
 
nic_i = fl->ifl_cidx;
nm_i = netmap_idx_n2k(kring, nic_i);
+   MPASS(nm_i == kring->nr_hwtail);
for (n = 0; avail > 0 && nm_i != hwtail_lim; n++, avail--) {
rxd_info_zero(&ri);
ri.iri_frags = rxq->ifr_frags;
@@ -1165,9 +1180,9 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl
 * nic_i is the index in the NIC ring, and
 * nm_i == (nic_i + kring->nkr_hwofs) % ring_size
 */
-   nm_i = kring->nr_hwcur;
+   netmap_fl_refill(rxq, kring, false);
 
-   return (netmap_fl_refill(rxq, kring, nm_i, false));
+   return (0);
 }
 
 static void
@@ -1239,14 +1254,12 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq)
struct netmap_adapter *na = NA(ctx->ifc_ifp);
struct netmap_kring *kring;
struct netmap_slot *slot;
-   uint32_t nm_i;
 
slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0);
if (slot == NULL)
return (0);
kring = na->rx_rings[rxq->ifr_id];
-   nm_i = netmap_idx_n2k(kring, 0);
- 

svn commit: r364649 - in head: lib/libcompiler_rt lib/libgcc_eh lib/libprocstat stand/userboot/userboot

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:33 2020
New Revision: 364649
URL: https://svnweb.freebsd.org/changeset/base/364649

Log:
  Avoid adding duplicates to SRCS/OBJS/SOBJS/POBJS
  
  This is a change in preparation for stopping to use lorder.sh (D26044) and
  instead assume that we have a linker newer than ~1990. Without lorder.sh
  duplicates end up being passed to the linker when building .so files and this
  can result in duplicate symbol definition errors.
  
  There is one minor change: libcompiler_rt.a will no longer provide
  gcc_personality_v0 and instead we now only have it in libgcc_eh.a/libgcc_s.so.
  This matches GCC's behaviour.
  
  Reviewed By:  emaste, cem
  Differential Revision: https://reviews.freebsd.org/D26042

Modified:
  head/lib/libcompiler_rt/Makefile.inc
  head/lib/libgcc_eh/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libprocstat/Makefile
  head/stand/userboot/userboot/Makefile

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incMon Aug 24 09:20:27 2020
(r364648)
+++ head/lib/libcompiler_rt/Makefile.incMon Aug 24 09:20:33 2020
(r364649)
@@ -67,7 +67,6 @@ SRCF+=floatunsisf
 SRCF+= floatuntidf
 SRCF+= floatuntisf
 SRCF+= floatuntixf
-SRCF+= gcc_personality_v0  # not in upstream
 SRCF+= int_util
 SRCF+= lshrdi3
 SRCF+= lshrti3

Modified: head/lib/libgcc_eh/Makefile
==
--- head/lib/libgcc_eh/Makefile Mon Aug 24 09:20:27 2020(r364648)
+++ head/lib/libgcc_eh/Makefile Mon Aug 24 09:20:33 2020(r364649)
@@ -8,6 +8,7 @@ NO_PIC=
 MK_SSP=no
 WARNS?=2
 
+SRCS_EXC+= int_util.c
 .include "Makefile.inc"
 
 .if ${.MAKE.LEVEL} > 0

Modified: head/lib/libgcc_eh/Makefile.inc
==
--- head/lib/libgcc_eh/Makefile.inc Mon Aug 24 09:20:27 2020
(r364648)
+++ head/lib/libgcc_eh/Makefile.inc Mon Aug 24 09:20:33 2020
(r364649)
@@ -9,7 +9,6 @@ STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBI
 .PATH: ${COMPILERRTDIR}/lib/builtins
 .PATH: ${UNWINDSRCDIR}
 SRCS_EXC+= gcc_personality_v0.c
-SRCS_EXC+= int_util.c
 SRCS_EXC+= Unwind-EHABI.cpp
 SRCS_EXC+= Unwind-sjlj.c
 SRCS_EXC+= UnwindLevel1-gcc-ext.c

Modified: head/lib/libprocstat/Makefile
==
--- head/lib/libprocstat/Makefile   Mon Aug 24 09:20:27 2020
(r364648)
+++ head/lib/libprocstat/Makefile   Mon Aug 24 09:20:33 2020
(r364649)
@@ -59,8 +59,6 @@ MLINKS+=libprocstat.3 procstat_close.3 \
 CFLAGS+=   -DLIBPROCSTAT_ZFS
 SRCS+= zfs.c
 OBJS+= zfs/zfs_defs.o
-SOBJS+=zfs/zfs_defs.pico
-POBJS+=zfs/zfs_defs.po
 SUBDIR=zfs
 zfs/zfs_defs.o: .PHONY
@cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.o

Modified: head/stand/userboot/userboot/Makefile
==
--- head/stand/userboot/userboot/Makefile   Mon Aug 24 09:20:27 2020
(r364648)
+++ head/stand/userboot/userboot/Makefile   Mon Aug 24 09:20:33 2020
(r364649)
@@ -20,7 +20,6 @@ SRCS+=bootinfo.c
 SRCS+= bootinfo32.c
 SRCS+= bootinfo64.c
 SRCS+= conf.c
-SRCS+= console.c
 SRCS+= copy.c
 SRCS+= devicename.c
 SRCS+= elf32_freebsd.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364648 - head/usr.sbin/makefs/msdos

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:27 2020
New Revision: 364648
URL: https://svnweb.freebsd.org/changeset/base/364648

Log:
  makefs (msdosfs): Use fprintf instead of debug print for errors
  
  The added print was very helpful for debugging failed disk image creation.
  
  Reviewed By:  emaste
  Differential Revision: https://reviews.freebsd.org/D23200

Modified:
  head/usr.sbin/makefs/msdos/msdosfs_vnops.c

Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c
==
--- head/usr.sbin/makefs/msdos/msdosfs_vnops.c  Mon Aug 24 09:20:23 2020
(r364647)
+++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c  Mon Aug 24 09:20:27 2020
(r364648)
@@ -467,15 +467,15 @@ msdosfs_wfile(const char *path, struct denode *dep, fs
 
if ((fd = open(path, O_RDONLY)) == -1) {
error = errno;
-   MSDOSFS_DPRINTF(("open %s: %s", path, strerror(error)));
+   fprintf(stderr, "open %s: %s\n", path, strerror(error));
return error;
}
 
if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0))
== MAP_FAILED) {
error = errno;
-   MSDOSFS_DPRINTF(("%s: mmap %s: %s", __func__, node->name,
-   strerror(error)));
+   fprintf(stderr, "%s: mmap %s: %s\n", __func__, node->name,
+   strerror(error));
close(fd);
goto out;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364650 - head

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:38 2020
New Revision: 364650
URL: https://svnweb.freebsd.org/changeset/base/364650

Log:
  Also print number of available CPUs on Linux
  
  Without this change the buildworld/buildkernel epilogue looks like this:
  >>> World built in 249 seconds, sysctl: cannot stat /proc/sys/hw/ncpu: No 
such file or directory
  ncpu: , make -j72.
  
  Reviewed By:  emaste, bdrewery
  Differential Revision: https://reviews.freebsd.org/D26056

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Aug 24 09:20:33 2020(r364649)
+++ head/Makefile.inc1  Mon Aug 24 09:20:38 2020(r364650)
@@ -1136,6 +1136,8 @@ _BUILDWORLD_START!= date '+%s'
 buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY
 .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
 
+_ncpu_cmd=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo unknown
+
 buildworld_prologue: .PHONY
@echo "--"
@echo ">>> World build started on `LC_ALL=C date`"
@@ -1147,7 +1149,7 @@ buildworld_epilogue: .PHONY
@echo ">>> World build completed on `LC_ALL=C date`"
@seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \
  echo -n ">>> World built in $$seconds seconds, "; \
- echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}"
+ echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
@echo "--"
 
 #
@@ -1656,7 +1658,7 @@ buildkernel: .MAKE .PHONY
 .endfor
@seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \
  echo -n ">>> Kernel(s) ${BUILDKERNELS} built in $$seconds seconds, "; 
\
- echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}"
+ echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
@echo "--"
 
 NO_INSTALLEXTRAKERNELS?=   yes
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364647 - head/usr.sbin/crunch/crunchgen

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:23 2020
New Revision: 364647
URL: https://svnweb.freebsd.org/changeset/base/364647

Log:
  Correctly determine the real executable in crunched binaries
  
  This should fix cases like su setting argv[0] to _su for /bin/sh.
  Previously cheribsdbox (a crunched tool we use in CheriBSD to reduce the
  size of our minimal disk images to allow loading them onto FPGAs without
  waiting forever for the transfer) would complain about _su not being
  compiled in, but now that we also look at AT_EXECPATH it correctly
  invokes the sh tool.
  
  Note: we use use AT_EXECPATH instead of the KERN_PROC_PATHNAME sysctl to get
  the crunchgen binary name since it seems like KERN_PROC_PATHNAME just
  returns the last cached path for a given hardlink.
  When using `su`, instead of invoking /bin/csh this would invoke the last
  used hardlink to cheribsdbox. This caused weird test failures when running
  tests due to `id` being executed instead of `echo`:
  
  $ id  # id is a hardlink to /bin/cheribsdbox
  $ su postgres -c 'echo 1' # su is also a hardlink
  uid=1001(postgres) gid=1001(postgres) groups=1001(postgres)
  
  Obtained from: CheriBSD
  
  Reviewed By:  emaste, brooks
  Differential Revision: https://reviews.freebsd.org/D25998

Modified:
  head/usr.sbin/crunch/crunchgen/crunched_main.c

Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c
==
--- head/usr.sbin/crunch/crunchgen/crunched_main.c  Mon Aug 24 09:20:18 
2020(r364646)
+++ head/usr.sbin/crunch/crunchgen/crunched_main.c  Mon Aug 24 09:20:23 
2020(r364647)
@@ -23,6 +23,38 @@
  *Computer Science Department
  *University of Maryland at College Park
  */
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2020 Alex Richardson 
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory (Department of Computer Science and
+ * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the
+ * DARPA SSITH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
 /*
  * crunched_main.c - main program for crunched binaries, it branches to a
  * particular subprogram based on the value of argv[0].  Also included
@@ -35,6 +67,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
+#include 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -44,30 +81,88 @@ struct stub {
int (*f)();
 };
 
-extern char *__progname;
+extern const char *__progname;
 extern struct stub entry_points[];
 
 static void crunched_usage(void);
 
+static struct stub *
+find_entry_point(const char *basename)
+{
+   struct stub *ep = NULL;
+
+   for (ep = entry_points; ep->name != NULL; ep++)
+   if (!strcmp(basename, ep->name))
+   break;
+
+   return (ep);
+}
+
+static const char *
+get_basename(const char *exe_path)
+{
+   const char *slash = strrchr(exe_path, '/');
+   return (slash ? slash + 1 : exe_path);
+}
+
 int
 main(int argc, char **argv, char **envp)
 {
-   char *slash, *basename;
-   struct stub *ep;
+   struct stub *ep = NULL;
+   const char *basename = NULL;
 
-   if (argv[0] == NULL || *argv[0] == '\0')
-   crunched_usage();
+   /*
+* Look at __progname first (this will be set if the crunched binary is
+* invoked directly).
+*/
+   if (__progname) {
+   basename = get_basename(__progname);
+   ep = find_entry_point(basename);
+   }
 
-   slash = strrchr(argv[0], '/');
-   basename = slash ? s

svn commit: r364645 - head

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:13 2020
New Revision: 364645
URL: https://svnweb.freebsd.org/changeset/base/364645

Log:
  Pass the installworld install(1) flags to make buildenv
  
  This ensure that running make install inside buildenv correctly includes
  the METALOG flags when building with -DNO_ROOT.
  
  Reviewed By:  brooks
  Differential Revision: https://reviews.freebsd.org/D26038

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Aug 24 09:19:05 2020(r364644)
+++ head/Makefile.inc1  Mon Aug 24 09:20:13 2020(r364645)
@@ -1178,7 +1178,9 @@ buildenv: .PHONY
 .if ${BUILDENV_SHELL:M*zsh*}
@echo For ZSH you must run: export CPUTYPE=${TARGET_CPUTYPE}
 .endif
-   @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL}
+   @cd ${BUILDENV_DIR} && env ${WMAKEENV} \
+   INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}" \
+   MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" BUILDENV=1 ${BUILDENV_SHELL}
 
 TOOLCHAIN_TGTS=${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
 toolchain: ${TOOLCHAIN_TGTS} .PHONY
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364646 - head/usr.sbin/crunch/crunchgen

2020-08-24 Thread Alex Richardson
Author: arichardson
Date: Mon Aug 24 09:20:18 2020
New Revision: 364646
URL: https://svnweb.freebsd.org/changeset/base/364646

Log:
  Re-indent crunched_main.c in preparation for D25998

Modified:
  head/usr.sbin/crunch/crunchgen/crunched_main.c

Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c
==
--- head/usr.sbin/crunch/crunchgen/crunched_main.c  Mon Aug 24 09:20:13 
2020(r364645)
+++ head/usr.sbin/crunch/crunchgen/crunched_main.c  Mon Aug 24 09:20:18 
2020(r364646)
@@ -40,8 +40,8 @@ __FBSDID("$FreeBSD$");
 #include 
 
 struct stub {
-char *name;
-int (*f)();
+   char *name;
+   int (*f)();
 };
 
 extern char *__progname;
@@ -52,65 +52,64 @@ static void crunched_usage(void);
 int
 main(int argc, char **argv, char **envp)
 {
-char *slash, *basename;
-struct stub *ep;
+   char *slash, *basename;
+   struct stub *ep;
 
-if(argv[0] == NULL || *argv[0] == '\0')
-   crunched_usage();
+   if (argv[0] == NULL || *argv[0] == '\0')
+   crunched_usage();
 
-slash = strrchr(argv[0], '/');
-basename = slash? slash+1 : argv[0];
+   slash = strrchr(argv[0], '/');
+   basename = slash ? slash + 1 : argv[0];
 
-for(ep=entry_points; ep->name != NULL; ep++)
-   if(!strcmp(basename, ep->name)) break;
+   for (ep = entry_points; ep->name != NULL; ep++)
+   if (!strcmp(basename, ep->name))
+   break;
 
-if(ep->name)
-   return ep->f(argc, argv, envp);
-else {
-   fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename);
-   crunched_usage();
-}
+   if (ep->name)
+   return ep->f(argc, argv, envp);
+   else {
+   fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename);
+   crunched_usage();
+   }
 }
 
-
 int
 crunched_main(int argc, char **argv, char **envp)
 {
-char *slash;
-struct stub *ep;
-int columns, len;
+   char *slash;
+   struct stub *ep;
+   int columns, len;
 
-if(argc <= 1)
-   crunched_usage();
+   if (argc <= 1)
+   crunched_usage();
 
-slash = strrchr(argv[1], '/');
-__progname = slash? slash+1 : argv[1];
+   slash = strrchr(argv[1], '/');
+   __progname = slash ? slash + 1 : argv[1];
 
-return main(--argc, ++argv, envp);
+   return main(--argc, ++argv, envp);
 }
 
-
 static void
 crunched_usage()
 {
-int columns, len;
-struct stub *ep;
+   int columns, len;
+   struct stub *ep;
 
-fprintf(stderr, "usage: %s   ..., where  is one of:\n",
-   EXECNAME);
-columns = 0;
-for(ep=entry_points; ep->name != NULL; ep++) {
-   len = strlen(ep->name) + 1;
-   if(columns+len < 80)
-   columns += len;
-   else {
-   fprintf(stderr, "\n");
-   columns = len;
+   fprintf(stderr,
+   "usage: %s   ..., where  is one of:\n", EXECNAME);
+   columns = 0;
+   for (ep = entry_points; ep->name != NULL; ep++) {
+   len = strlen(ep->name) + 1;
+   if (columns + len < 80)
+   columns += len;
+   else {
+   fprintf(stderr, "\n");
+   columns = len;
+   }
+   fprintf(stderr, " %s", ep->name);
}
-   fprintf(stderr, " %s", ep->name);
-}
-fprintf(stderr, "\n");
-exit(1);
+   fprintf(stderr, "\n");
+   exit(1);
 }
 
 /* end of crunched_main.c */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364637 - head/sys/kern

2020-08-24 Thread Mateusz Guzik
Author: mjg
Date: Mon Aug 24 09:00:57 2020
New Revision: 364637
URL: https://svnweb.freebsd.org/changeset/base/364637

Log:
  cache: lockless reverse lookup
  
  This enables fully scalable operation for getcwd and significantly improves
  realpath.
  
  For example:
  PATH_CUSTOM=/usr/src ./getcwd_processes -t 104
  before:  1550851
  after: 380135380
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Mon Aug 24 09:00:07 2020(r364636)
+++ head/sys/kern/vfs_cache.c   Mon Aug 24 09:00:57 2020(r364637)
@@ -85,6 +85,10 @@ SDT_PROBE_DEFINE3(vfs, namecache, enter, done, "struct
 "struct vnode *");
 SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, "struct vnode *",
 "char *");
+SDT_PROBE_DEFINE2(vfs, namecache, fullpath_smr, hit, "struct vnode *",
+"const char *");
+SDT_PROBE_DEFINE4(vfs, namecache, fullpath_smr, miss, "struct vnode *",
+"struct namecache *", "int", "int");
 SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, "struct vnode *");
 SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, "struct vnode *",
 "char *", "struct vnode *");
@@ -298,6 +302,10 @@ static u_int __read_mostly ncsize; /* the size as comp
 
 struct nchstatsnchstats;   /* cache effectiveness 
statistics */
 
+static bool __read_frequently cache_fast_revlookup = true;
+SYSCTL_BOOL(_vfs, OID_AUTO, cache_fast_revlookup, CTLFLAG_RW,
+&cache_fast_revlookup, 0, "");
+
 static struct mtx __exclusive_cache_line   ncneg_shrink_lock;
 
 struct neglist {
@@ -477,6 +485,8 @@ STATNODE_COUNTER(shrinking_skipped,
 static void cache_zap_locked(struct namecache *ncp);
 static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf,
 char **freebuf, size_t *buflen);
+static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf,
+char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend);
 static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf,
 char **retbuf, size_t *buflen);
 static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf,
@@ -2476,9 +2486,17 @@ vn_getcwd(char *buf, char **retbuf, size_t *buflen)
struct pwd *pwd;
int error;
 
-   pwd = pwd_hold(curthread);
-   error = vn_fullpath_any(pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, 
buflen);
-   pwd_drop(pwd);
+   vfs_smr_enter();
+   pwd = pwd_get_smr();
+   error = vn_fullpath_any_smr(pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf,
+   buflen, false, 0);
+   VFS_SMR_ASSERT_NOT_ENTERED();
+   if (error < 0) {
+   pwd = pwd_hold(curthread);
+   error = vn_fullpath_any(pwd->pwd_cdir, pwd->pwd_rdir, buf,
+   retbuf, buflen);
+   pwd_drop(pwd);
+   }
 
 #ifdef KTRACE
if (KTRPOINT(curthread, KTR_NAMEI) && error == 0)
@@ -2535,9 +2553,15 @@ vn_fullpath(struct vnode *vp, char **retbuf, char **fr
 
buflen = MAXPATHLEN;
buf = malloc(buflen, M_TEMP, M_WAITOK);
-   pwd = pwd_hold(curthread);
-   error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, &buflen);
-   pwd_drop(pwd);
+   vfs_smr_enter();
+   pwd = pwd_get_smr();
+   error = vn_fullpath_any_smr(vp, pwd->pwd_rdir, buf, retbuf, &buflen, 
false, 0);
+   VFS_SMR_ASSERT_NOT_ENTERED();
+   if (error < 0) {
+   pwd = pwd_hold(curthread);
+   error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, 
&buflen);
+   pwd_drop(pwd);
+   }
if (error == 0)
*freebuf = buf;
else
@@ -2562,7 +2586,12 @@ vn_fullpath_global(struct vnode *vp, char **retbuf, ch
return (EINVAL);
buflen = MAXPATHLEN;
buf = malloc(buflen, M_TEMP, M_WAITOK);
-   error = vn_fullpath_any(vp, rootvnode, buf, retbuf, &buflen);
+   vfs_smr_enter();
+   error = vn_fullpath_any_smr(vp, rootvnode, buf, retbuf, &buflen, false, 
0);
+   VFS_SMR_ASSERT_NOT_ENTERED();
+   if (error < 0) {
+   error = vn_fullpath_any(vp, rootvnode, buf, retbuf, &buflen);
+   }
if (error == 0)
*freebuf = buf;
else
@@ -2769,7 +2798,145 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, 
  * - namecache is not mandatory, meaning names are not guaranteed to be added
  *   (in which case resolving fails)
  */
+static void __inline
+cache_rev_failed_impl(int *reason, int line)
+{
+
+   *reason = line;
+}
+#define cache_rev_failed(var)  cache_rev_failed_impl((var), __LINE__)
+
 static int
+vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf,
+char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend)
+{
+#ifdef KDTRACE_HOOKS
+   struct vnode *startvp = vp;
+#endif
+   struct vnode *tvp;
+   struct mount *mp;
+   struct namecache *ncp;
+  

svn commit: r364633 - in head/sys: compat/linprocfs compat/linux dev/filemon dev/hwpmc fs/fdescfs fs/procfs kern security/audit sys vm

2020-08-24 Thread Mateusz Guzik
Author: mjg
Date: Mon Aug 24 08:57:02 2020
New Revision: 364633
URL: https://svnweb.freebsd.org/changeset/base/364633

Log:
  cache: drop the always curthread argument from reverse lookup routines
  
  Note VOP_VPTOCNP keeps getting it as temporary compatibility for zfs.
  
  Tested by:pho

Modified:
  head/sys/compat/linprocfs/linprocfs.c
  head/sys/compat/linux/linux_getcwd.c
  head/sys/dev/filemon/filemon_wrapper.c
  head/sys/dev/hwpmc/hwpmc_mod.c
  head/sys/fs/fdescfs/fdesc_vnops.c
  head/sys/fs/procfs/procfs.c
  head/sys/fs/procfs/procfs_map.c
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_proc.c
  head/sys/kern/kern_sig.c
  head/sys/kern/sys_process.c
  head/sys/kern/vfs_cache.c
  head/sys/kern/vfs_vnops.c
  head/sys/security/audit/audit_bsm_klib.c
  head/sys/sys/vnode.h
  head/sys/vm/vm_object.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==
--- head/sys/compat/linprocfs/linprocfs.c   Mon Aug 24 08:55:55 2020
(r364632)
+++ head/sys/compat/linprocfs/linprocfs.c   Mon Aug 24 08:57:02 2020
(r364633)
@@ -426,7 +426,7 @@ linprocfs_domtab(PFS_FILL_ARGS)
error = namei(&nd);
lep = linux_emul_path;
if (error == 0) {
-   if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0)
+   if (vn_fullpath(nd.ni_vp, &dlep, &flep) == 0)
lep = dlep;
vrele(nd.ni_vp);
}
@@ -1053,7 +1053,7 @@ linprocfs_doproccwd(PFS_FILL_ARGS)
char *freepath = NULL;
 
pwd = pwd_hold(td);
-   vn_fullpath(td, pwd->pwd_cdir, &fullpath, &freepath);
+   vn_fullpath(pwd->pwd_cdir, &fullpath, &freepath);
sbuf_printf(sb, "%s", fullpath);
if (freepath)
free(freepath, M_TEMP);
@@ -1074,7 +1074,7 @@ linprocfs_doprocroot(PFS_FILL_ARGS)
 
pwd = pwd_hold(td);
vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir;
-   vn_fullpath(td, vp, &fullpath, &freepath);
+   vn_fullpath(vp, &fullpath, &freepath);
sbuf_printf(sb, "%s", fullpath);
if (freepath)
free(freepath, M_TEMP);
@@ -1219,7 +1219,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
shadow_count = obj->shadow_count;
VM_OBJECT_RUNLOCK(obj);
if (vp != NULL) {
-   vn_fullpath(td, vp, &name, &freename);
+   vn_fullpath(vp, &name, &freename);
vn_lock(vp, LK_SHARED | LK_RETRY);
VOP_GETATTR(vp, &vat, td->td_ucred);
ino = vat.va_fileid;

Modified: head/sys/compat/linux/linux_getcwd.c
==
--- head/sys/compat/linux/linux_getcwd.cMon Aug 24 08:55:55 2020
(r364632)
+++ head/sys/compat/linux/linux_getcwd.cMon Aug 24 08:57:02 2020
(r364633)
@@ -73,7 +73,7 @@ linux_getcwd(struct thread *td, struct linux_getcwd_ar
buflen = LINUX_PATH_MAX;
 
buf = malloc(buflen, M_TEMP, M_WAITOK);
-   error = vn_getcwd(td, buf, &retbuf, &buflen);
+   error = vn_getcwd(buf, &retbuf, &buflen);
if (error == 0) {
error = copyout(retbuf, uap->buf, buflen);
if (error == 0)

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Mon Aug 24 08:55:55 2020
(r364632)
+++ head/sys/dev/filemon/filemon_wrapper.c  Mon Aug 24 08:57:02 2020
(r364633)
@@ -186,8 +186,7 @@ _filemon_wrapper_openat(struct thread *td, const char 
 */
if (getvnode(td, fd,
cap_rights_init(&rights, CAP_LOOKUP), &fp) == 0) {
-   vn_fullpath(td, fp->f_vnode, &atpath,
-   &freepath);
+   vn_fullpath(fp->f_vnode, &atpath, &freepath);
}
}
if (flags & O_RDWR) {

Modified: head/sys/dev/hwpmc/hwpmc_mod.c
==
--- head/sys/dev/hwpmc/hwpmc_mod.c  Mon Aug 24 08:55:55 2020
(r364632)
+++ head/sys/dev/hwpmc/hwpmc_mod.c  Mon Aug 24 08:57:02 2020
(r364633)
@@ -832,7 +832,7 @@ pmc_getfilename(struct vnode *v, char **fullpath, char
 
*fullpath = "unknown";
*freepath = NULL;
-   vn_fullpath(curthread, v, fullpath, freepath);
+   vn_fullpath(v, fullpath, freepath);
 }
 
 /*

Modified: head/sys/fs/fdescfs/fdesc_vnops.c
==
--- head/sys/fs/fdescfs/fdesc_vnops.c   Mon Aug 24 08:55:55 2020
(r364632)
+++ head/sys/fs/fdescfs/fdesc_vnops.c   Mon Aug 24 

svn commit: r364632 - head/sys/kern

2020-08-24 Thread Mateusz Guzik
Author: mjg
Date: Mon Aug 24 08:55:55 2020
New Revision: 364632
URL: https://svnweb.freebsd.org/changeset/base/364632

Log:
  cache: perform reverse lookup using v_cache_dd if possible
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Mon Aug 24 08:55:04 2020(r364631)
+++ head/sys/kern/vfs_cache.c   Mon Aug 24 08:55:55 2020(r364632)
@@ -2572,6 +2572,19 @@ vn_fullpath_global(struct thread *td, struct vnode *vn
return (error);
 }
 
+static struct namecache *
+vn_dd_from_dst(struct vnode *vp)
+{
+   struct namecache *ncp;
+
+   cache_assert_vnode_locked(vp);
+   TAILQ_FOREACH(ncp, &vp->v_cache_dst, nc_dst) {
+   if ((ncp->nc_flag & NCF_ISDOTDOT) == 0)
+   return (ncp);
+   }
+   return (NULL);
+}
+
 int
 vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf, size_t *buflen)
 {
@@ -2582,9 +2595,13 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char
 
vlp = VP2VNODELOCK(*vp);
mtx_lock(vlp);
-   TAILQ_FOREACH(ncp, &((*vp)->v_cache_dst), nc_dst) {
-   if ((ncp->nc_flag & NCF_ISDOTDOT) == 0)
-   break;
+   ncp = (*vp)->v_cache_dd;
+   if (ncp != NULL && (ncp->nc_flag & NCF_ISDOTDOT) == 0) {
+   KASSERT(ncp == vn_dd_from_dst(*vp),
+   ("%s: mismatch for dd entry (%p != %p)", __func__,
+   ncp, vn_dd_from_dst(*vp)));
+   } else {
+   ncp = vn_dd_from_dst(*vp);
}
if (ncp != NULL) {
if (*buflen < ncp->nc_nlen) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364631 - head/sys/kern

2020-08-24 Thread Mateusz Guzik
Author: mjg
Date: Mon Aug 24 08:55:04 2020
New Revision: 364631
URL: https://svnweb.freebsd.org/changeset/base/364631

Log:
  cache: populate v_cache_dd for non-VDIR entries
  
  It makes v_cache_dd into a little bit of a misnomer and it may be addressed 
later.
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Mon Aug 24 08:41:22 2020(r364630)
+++ head/sys/kern/vfs_cache.c   Mon Aug 24 08:55:04 2020(r364631)
@@ -2003,24 +2003,22 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, 
}
 
if (vp != NULL) {
-   if (vp->v_type == VDIR) {
-   if (flag != NCF_ISDOTDOT) {
-   /*
-* For this case, the cache entry maps both the
-* directory name in it and the name ".." for 
the
-* directory's parent.
-*/
-   vn_seqc_write_begin(vp);
-   if ((ndd = vp->v_cache_dd) != NULL) {
-   if ((ndd->nc_flag & NCF_ISDOTDOT) != 0)
-   cache_zap_locked(ndd);
-   else
-   ndd = NULL;
-   }
-   vp->v_cache_dd = ncp;
-   vn_seqc_write_end(vp);
+   if (flag != NCF_ISDOTDOT) {
+   /*
+* For this case, the cache entry maps both the
+* directory name in it and the name ".." for the
+* directory's parent.
+*/
+   vn_seqc_write_begin(vp);
+   if ((ndd = vp->v_cache_dd) != NULL) {
+   if ((ndd->nc_flag & NCF_ISDOTDOT) != 0)
+   cache_zap_locked(ndd);
+   else
+   ndd = NULL;
}
-   } else {
+   vp->v_cache_dd = ncp;
+   vn_seqc_write_end(vp);
+   } else if (vp->v_type != VDIR) {
if (vp->v_cache_dd != NULL) {
vn_seqc_write_begin(vp);
vp->v_cache_dd = NULL;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r364449 - head/bin/ls

2020-08-24 Thread Gordon Bergling
Hi Hiroki,

On Sat, Aug 22, 2020 at 07:44:38PM +0900, Hiroki Sato wrote:
> Hi,
> 
> Gordon Bergling  wrote
>   in <202008210620.07l6kc6m091...@repo.freebsd.org>:
> 
> gb> Author: gbe (doc committer)
> gb> Date: Fri Aug 21 06:20:11 2020
> gb> New Revision: 364449
> gb> URL: https://svnweb.freebsd.org/changeset/base/364449
> gb>
> gb> Log:
> gb>   ls(1): Update POSIX conformance from 2001 to 2008
> gb>
> gb>   - Update the options that are non-existing in POSIX from 2001 to 2008
> gb>   - Update POSIX conformance in the STANDARDS section from 2001 to 2008
> 
>  Generally speaking, conformance with POSIX.1-2001 (SUSv3) and
>  POSIX.1-2008 (SUSv4) are independent, so a simple replacement by
>  s/2001/2008/ removes the former information.  If we want to describe
>  -2008, please add it instead of replacing the prior version numbers.
> 
> -- Hiroki

thanks for your feedback. I can only define POSIX.1-200{1,8} or -susv4. So what
do you think about the following STANDARDS section?

For the options that are non-existing I could correct them to -2001 and mention
also -susv4.

STANDARDS
 With the exception of options -g, -n and -o, the ls utility conforms to
 IEEE Std 1003.1-2001 (“POSIX.1”) and Version 4 of the Single UNIX
 Specification (“SUSv4”).  The options -B, -D, -G, -I, -T, -U, -W, -Z, -b,
 -h, -w, -y and -, are compatible extensions not defined in IEEE Std
 1003.1-2001 (“POSIX.1”).

--Gordon


signature.asc
Description: PGP signature