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

2020-08-20 Thread Konstantin Belousov
Author: kib Date: Thu Aug 20 15:19:09 2020 New Revision: 364423 URL: https://svnweb.freebsd.org/changeset/base/364423 Log: dl_iterate_phdr(3): provide exclusive locking for callback when statically linked. Apparently llvm unwinder depends on the external locking for callback. Reviewed

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

2020-08-22 Thread Konstantin Belousov
Author: kib Date: Sat Aug 22 21:32:11 2020 New Revision: 364495 URL: https://svnweb.freebsd.org/changeset/base/364495 Log: Fix several issues with process group orphanage. Attempt of adding assertions that pgrp->pg_jobc counters do not underflow in r361967, reverted in r362910, points out

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

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 19:43:47 2020 New Revision: 364513 URL: https://svnweb.freebsd.org/changeset/base/364513 Log: kern_sharedpage.c: Add exec_sysvec_init_secondary() helper. It allows a sysent to share existing usermode data in shared page with other sysent, assuming ABI differen

svn commit: r364517 - in head: sys/sys usr.bin/elfctl

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 19:47:27 2020 New Revision: 364517 URL: https://svnweb.freebsd.org/changeset/base/364517 Log: Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64. Tested by:pho Sponsored by: The FreeBSD Foundation Differential revision:htt

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

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:05:35 2020 New Revision: 364520 URL: https://svnweb.freebsd.org/changeset/base/364520 Log: Style. Modified: head/sys/arm64/arm64/elf32_machdep.c Modified: head/sys/arm64/arm64/elf32_machdep.c

svn commit: r364521 - in head/sys: arm/arm arm64/arm64 kern powerpc/powerpc sys

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:06:55 2020 New Revision: 364521 URL: https://svnweb.freebsd.org/changeset/base/364521 Log: Pass pointers to info parsed from notes, to brandinfo->header_supported filter. Currently, we parse notes for the values of ELF FreeBSD feature flags and osrel. Kno

svn commit: r364522 - head/sys/x86/include

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:08:05 2020 New Revision: 364522 URL: https://svnweb.freebsd.org/changeset/base/364522 Log: Add definition for CR4.LA57 bit. Tested by:pho Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D25273 Modified:

svn commit: r364527 - in head/sys: amd64/amd64 amd64/include amd64/linux amd64/vmm/amd amd64/vmm/intel cddl/dev/dtrace/amd64

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:19:04 2020 New Revision: 364527 URL: https://svnweb.freebsd.org/changeset/base/364527 Log: amd64 pmap: LA57 AKA 5-level paging Since LA57 was moved to the main SDM document with revision 072, it seems that we should have a support for it, and silicons are c

svn commit: r364530 - in head/sys: amd64/amd64 x86/include

2020-08-23 Thread Konstantin Belousov
20:32:13 2020 (r364530) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2019 The FreeBSD Foundation + * Copyright (c) 2019,2020 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from

svn commit: r364531 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:37:21 2020 New Revision: 364531 URL: https://svnweb.freebsd.org/changeset/base/364531 Log: Add bhyve support for LA57 guest mode. Noted and reviewed by:grehan Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freeb

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

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:40:35 2020 New Revision: 364533 URL: https://svnweb.freebsd.org/changeset/base/364533 Log: amd64: Handle 5-level paging for efirt calls. Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D25273 Modified: head/

svn commit: r364534 - in head/sys: amd64/acpica amd64/amd64 x86/acpica

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:43:23 2020 New Revision: 364534 URL: https://svnweb.freebsd.org/changeset/base/364534 Log: amd64: Handle 5-level paging on wakeup. We can switch into long mode directly with LA57 enabled. Sponsored by: The FreeBSD Foundation Differential revision:

svn commit: r364535 - head/usr.bin/proccontrol

2020-08-23 Thread Konstantin Belousov
Author: kib Date: Sun Aug 23 20:44:15 2020 New Revision: 364535 URL: https://svnweb.freebsd.org/changeset/base/364535 Log: procctl(8): usermode bits to force LA58/LA57 on exec. Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D25273 Modified:

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/s

svn commit: r366711 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/atheros mips/atheros/ar531x mips/beri mips/broadcom mips/cavium mips/ingenic mips/malta mips/mediatek mips/mip...

2020-10-14 Thread Konstantin Belousov
Author: kib Date: Wed Oct 14 22:51:40 2020 New Revision: 366711 URL: https://svnweb.freebsd.org/changeset/base/366711 Log: Avoid dump_avail[] redefinition. Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips. Revi

svn commit: r366712 - in head/sys: amd64/amd64 i386/i386 x86/include x86/x86

2020-10-14 Thread Konstantin Belousov
Author: kib Date: Wed Oct 14 22:57:50 2020 New Revision: 366712 URL: https://svnweb.freebsd.org/changeset/base/366712 Log: Limit workaround for errata E400 to appropriate AMD cpus. From Linux sources and several datasheets I looked at, it seems that the workaround is only needed on famili

svn commit: r366713 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include

2020-10-14 Thread Konstantin Belousov
Author: kib Date: Wed Oct 14 23:01:41 2020 New Revision: 366713 URL: https://svnweb.freebsd.org/changeset/base/366713 Log: Fix for mis-interpretation of PCB_KERNFPU. RIght now PCB_KERNFPU is used both as indication that kernel prepared hardware FPU context to use and that the thread is fp

Re: svn commit: r366748 - head/sys/fs/pseudofs

2020-10-16 Thread Konstantin Belousov
On Fri, Oct 16, 2020 at 09:58:11AM +, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Oct 16 09:58:10 2020 > New Revision: 366748 > URL: https://svnweb.freebsd.org/changeset/base/366748 > > Log: > Bump pseudofs size limit from 128kB to 1MB. The old limit could result > in proce

svn commit: r366768 - head/sys/amd64/include

2020-10-16 Thread Konstantin Belousov
Author: kib Date: Fri Oct 16 16:22:32 2020 New Revision: 366768 URL: https://svnweb.freebsd.org/changeset/base/366768 Log: amd64 pmap.h: explicitly provide constants values instead of relying on some more advanced C features. This fixes gcc-toolchain build of exception.S. Reported an

Re: svn commit: r366766 - head

2020-10-16 Thread Konstantin Belousov
On Fri, Oct 16, 2020 at 11:53:06AM -0500, Kyle Evans wrote: > On Fri, Oct 16, 2020 at 11:47 AM John Baldwin wrote: > > > > On 10/16/20 8:16 AM, Kyle Evans wrote: > > > Author: kevans > > > Date: Fri Oct 16 15:16:23 2020 > > > New Revision: 366766 > > > URL: https://svnweb.freebsd.org/changeset/bas

Re: svn commit: r366781 - in head: include lib/libc/stdlib

2020-10-16 Thread Konstantin Belousov
On Sat, Oct 17, 2020 at 04:14:39AM +, Xin LI wrote: > Author: delphij > Date: Sat Oct 17 04:14:38 2020 > New Revision: 366781 > URL: https://svnweb.freebsd.org/changeset/base/366781 > > Log: > Implement ptsname_r. > > MFC after: 2 weeks > PR: 250062 > Reviewed by:ji

Re: svn commit: r366843 - head/sys/i386/i386

2020-10-19 Thread Konstantin Belousov
On Mon, Oct 19, 2020 at 05:35:46PM +, John Baldwin wrote: > Author: jhb > Date: Mon Oct 19 17:35:45 2020 > New Revision: 366843 > URL: https://svnweb.freebsd.org/changeset/base/366843 > > Log: > Properly clear PCB_KERNNPX in fpu_kern_leave(). > > PR: 250423 > Reported by:

svn commit: r366848 - head/sys/kern

2020-10-19 Thread Konstantin Belousov
Author: kib Date: Mon Oct 19 19:20:23 2020 New Revision: 366848 URL: https://svnweb.freebsd.org/changeset/base/366848 Log: vgonel(): avoid recursing into VOP_INACTIVE(). It is a common pattern for filesystems' VOP_INACTIVE() implementation to forcibly reclaim the vnode when its state is f

svn commit: r366849 - head/sys/fs/nullfs

2020-10-19 Thread Konstantin Belousov
Author: kib Date: Mon Oct 19 19:23:22 2020 New Revision: 366849 URL: https://svnweb.freebsd.org/changeset/base/366849 Log: nullfs: ensure correct lock is taken after bypass. If lower VOP relocked the lower vnode, it is possible that nullfs vnode was reclaimed meantime. In this case nullf

Re: svn commit: r366865 - head/sys/dev/ahci

2020-10-20 Thread Konstantin Belousov
On Mon, Oct 19, 2020 at 10:32:36PM +, Ruslan Bukin wrote: > Author: br > Date: Mon Oct 19 22:32:36 2020 > New Revision: 366865 > URL: https://svnweb.freebsd.org/changeset/base/366865 > > Log: > Fix build: only set iommu buswide flag if IOMMU code is included. > > Sponsored by: Inn

svn commit: r366904 - in head/sys: amd64/ia32 i386/i386

2020-10-20 Thread Konstantin Belousov
Author: kib Date: Wed Oct 21 00:15:12 2020 New Revision: 366904 URL: https://svnweb.freebsd.org/changeset/base/366904 Log: Improve FPU Tag Word reconstruction on i386 to indicate register states. Improve the code reconstructing en_tw in struct fpreg32 from FXSAVE results so that all regis

svn commit: r366918 - head/lib/libc/sys

2020-10-21 Thread Konstantin Belousov
Author: kib Date: Wed Oct 21 21:40:33 2020 New Revision: 366918 URL: https://svnweb.freebsd.org/changeset/base/366918 Log: mmap(2): Document guard size for MAP_STACK and related EINVAL. Based on submission by: emaste Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation

svn commit: r366932 - head/sys/kern

2020-10-22 Thread Konstantin Belousov
Author: kib Date: Thu Oct 22 09:28:11 2020 New Revision: 366932 URL: https://svnweb.freebsd.org/changeset/base/366932 Log: sysv_sem: semusz depends on semume. Size of the per-process semaphore undo structure (semusz) depends on the number of the per-process undos. If kern.ipc.semume is a

Re: svn commit: r366936 - head/sys/net

2020-10-22 Thread Konstantin Belousov
On Thu, Oct 22, 2020 at 12:22:08PM +, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Oct 22 12:22:08 2020 > New Revision: 366936 > URL: https://svnweb.freebsd.org/changeset/base/366936 > > Log: > Compile fix for MIPS, MIPS64, POWERPC and POWERPC64. > Add missing include files. >

Re: svn commit: r366936 - head/sys/net

2020-10-23 Thread Konstantin Belousov
On Fri, Oct 23, 2020 at 10:04:12AM +0200, Hans Petter Selasky wrote: > On 2020-10-22 19:54, Hans Petter Selasky wrote: > > On 2020-10-22 18:48, Konstantin Belousov wrote: > > > sys/systm.h already includes sys/param.h.  Also, sys/param.h already > > > includes > >

Re: svn commit: r366936 - head/sys/net

2020-10-23 Thread Konstantin Belousov
On Fri, Oct 23, 2020 at 01:26:04PM +0200, Hans Petter Selasky wrote: > On 2020-10-23 11:46, Konstantin Belousov wrote: > > On Fri, Oct 23, 2020 at 10:04:12AM +0200, Hans Petter Selasky wrote: > > > On 2020-10-22 19:54, Hans Petter Selasky wrote: > > > > On 2020-10

svn commit: r366978 - head/sys/dev/usb/controller

2020-10-23 Thread Konstantin Belousov
Author: kib Date: Fri Oct 23 18:18:45 2020 New Revision: 366978 URL: https://svnweb.freebsd.org/changeset/base/366978 Log: xhci: Handle the case when MSI-X BAR is the same as IO BAR. PCIe allows for MSI-X BAR to be either dedicated, or MSI-X Table may be co-located in some functional BAR.

Re: svn commit: r366993 - head/sys/net

2020-10-24 Thread Konstantin Belousov
On Sat, Oct 24, 2020 at 10:23:22AM +, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat Oct 24 10:23:21 2020 > New Revision: 366993 > URL: https://svnweb.freebsd.org/changeset/base/366993 > > Log: > Run code through "clang-format -style=file" with some additional fixes. > No functi

Re: svn commit: r366997 - head/sys/kern

2020-10-24 Thread Konstantin Belousov
On Sat, Oct 24, 2020 at 01:30:37PM +, Mateusz Guzik wrote: > Author: mjg > Date: Sat Oct 24 13:30:37 2020 > New Revision: 366997 > URL: https://svnweb.freebsd.org/changeset/base/366997 > > Log: > vfs: fix a race where reclaim vholds freed vnodes A description of the race in the commit messag

Re: svn commit: r366993 - head/sys/net

2020-10-27 Thread Konstantin Belousov
On Tue, Oct 27, 2020 at 02:52:38PM -0400, Ed Maste wrote: > On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov wrote: > > > > > -#include > > sys/systm.h should come right after sys/param.h. These two headers are > > exceptions to the normal alphabetical rule.

svn commit: r367120 - head/sys/kern

2020-10-28 Thread Konstantin Belousov
Author: kib Date: Wed Oct 28 22:12:47 2020 New Revision: 367120 URL: https://svnweb.freebsd.org/changeset/base/367120 Log: Check for process group change in tty_wait_background(). The calling process's process group can change between PROC_UNLOCK(p) and PGRP_LOCK(pg) in tty_wait_backgroun

Re: svn commit: r367165 - head/sys/fs/tmpfs

2020-10-30 Thread Konstantin Belousov
On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: > On 10/30/20, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Oct 30 14:07:25 2020 > > New Revision: 367165 > > URL: https://svnweb.freebsd.org/changeset/base/367165 > > > > Log: > > tmpfs: change tmpfs dirent zone into a malloc

Re: svn commit: r367165 - head/sys/fs/tmpfs

2020-10-30 Thread Konstantin Belousov
On Fri, Oct 30, 2020 at 04:42:39PM +0100, Mateusz Guzik wrote: > On 10/30/20, Konstantin Belousov wrote: > > On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: > >> On 10/30/20, Mateusz Guzik wrote: > >> > Author: mjg > >> > Date: Fri Oct 30

svn commit: r367249 - head/sys/net

2020-11-01 Thread Konstantin Belousov
Author: kib Date: Sun Nov 1 16:25:35 2020 New Revision: 367249 URL: https://svnweb.freebsd.org/changeset/base/367249 Log: Cleanup of net/if_media.c: switch to ANSI C function definitions. Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after:1 week

svn commit: r367250 - head/sys/net

2020-11-01 Thread Konstantin Belousov
Author: kib Date: Sun Nov 1 16:30:17 2020 New Revision: 367250 URL: https://svnweb.freebsd.org/changeset/base/367250 Log: Cleanup of net/if_media.c: some style. Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after:1 week Differential revision:

svn commit: r367251 - head/sys/net

2020-11-01 Thread Konstantin Belousov
Author: kib Date: Sun Nov 1 16:36:21 2020 New Revision: 367251 URL: https://svnweb.freebsd.org/changeset/base/367251 Log: Cleanup of net/if_media.c: simplify cleanup loop in ifmedia_removeall(). Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after:

svn commit: r367252 - head/sys/net

2020-11-01 Thread Konstantin Belousov
Author: kib Date: Sun Nov 1 16:38:30 2020 New Revision: 367252 URL: https://svnweb.freebsd.org/changeset/base/367252 Log: net/if_media.c: improve IFMEDIA_DEBUG output. Use consistent output format for hex. Print both media and mask where relevant. Reviewed by: hselasky Sponsored

svn commit: r367285 - head/sbin/ifconfig

2020-11-02 Thread Konstantin Belousov
Author: kib Date: Mon Nov 2 21:47:34 2020 New Revision: 367285 URL: https://svnweb.freebsd.org/changeset/base/367285 Log: ifconfig: properly detect invalid mediaopt keywords. When invalid keyword is specified, ifconfig(8) is silent about it, instead random request is sent to the driver.

Re: svn commit: r367280 - head/lib/libc/gen

2020-11-02 Thread Konstantin Belousov
On Mon, Nov 02, 2020 at 10:49:07PM +0100, Emmanuel Vadot wrote: > I think that the first question we want to ask is : Do we want to > support LOCALBASE being different than /usr/local > I honestly don't see any advantages of making it !=/usr/local/ and > before we start putting a lot of new/usele

Re: svn commit: r367280 - head/lib/libc/gen

2020-11-02 Thread Konstantin Belousov
On Mon, Nov 02, 2020 at 11:22:15PM +0100, Emmanuel Vadot wrote: > On Tue, 3 Nov 2020 00:10:39 +0200 > Konstantin Belousov wrote: > > > On Mon, Nov 02, 2020 at 10:49:07PM +0100, Emmanuel Vadot wrote: > > > I think that the first question we want to ask is : Do we want to

svn commit: r367296 - head/sys/net

2020-11-03 Thread Konstantin Belousov
Author: kib Date: Tue Nov 3 14:33:04 2020 New Revision: 367296 URL: https://svnweb.freebsd.org/changeset/base/367296 Log: if_media.c SIOCGMEDIAX handler: improve loop Stop advancing counter past the current iteration number at the start of iteration. This removes the need of subtracting

Re: svn commit: r367280 - head/lib/libc/gen

2020-11-04 Thread Konstantin Belousov
On Mon, Nov 02, 2020 at 11:51:12PM +0100, Stefan Esser wrote: > Am 02.11.20 um 23:10 schrieb Konstantin Belousov: > > On Mon, Nov 02, 2020 at 10:49:07PM +0100, Emmanuel Vadot wrote: > > > I think that the first question we want to ask is : Do we want to > > > suppor

svn commit: r367398 - in head/sys: dev/acpica dev/xen/control kern sys

2020-11-05 Thread Konstantin Belousov
Author: kib Date: Thu Nov 5 20:52:49 2020 New Revision: 367398 URL: https://svnweb.freebsd.org/changeset/base/367398 Log: Suspend all writeable local filesystems on power suspend. This ensures that no writes are pending in memory, either metadata or user data, but not including dirty pag

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

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 00:46:53 2020 New Revision: 367606 URL: https://svnweb.freebsd.org/changeset/base/367606 Log: bhyve: avoid allocating BARs above the end of supported physical addresses. Read CPUID leaf 0x808 to determine max supported phys address and create BAR region ri

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

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 00:51:53 2020 New Revision: 367607 URL: https://svnweb.freebsd.org/changeset/base/367607 Log: bhyve: increase allowed size for 64bit BAR allocation below 4G from 32 to 128 MB. Reviewed by: grehan Sponsored by: The FreeBSD Foundation MFC after:2 weeks

svn commit: r367609 - head/sys/dev/mlx5/mlx5_en

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 02:21:14 2020 New Revision: 367609 URL: https://svnweb.freebsd.org/changeset/base/367609 Log: mlx5en: Refactor repeated code to register media type to mlx5e_ifm_add(). Sponsored by: Mellanox Technologies/NVidia Networking MFC after:1 week Modified: head

svn commit: r367610 - head/sys/dev/mlx5/mlx5_en

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 02:22:16 2020 New Revision: 367610 URL: https://svnweb.freebsd.org/changeset/base/367610 Log: mlx5en: Register all combinations of FDX/RXPAUSE/TXPAUSE as valid media types. Sponsored by: Mellanox Technologies/NVidia Networking MFC after:1 week Modified:

svn commit: r367611 - head/sys/dev/mlx5/mlx5_en

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 02:23:27 2020 New Revision: 367611 URL: https://svnweb.freebsd.org/changeset/base/367611 Log: mlx5en: stop ignoring pauses and flow in the media reqs. Sponsored by: Mellanox Technologies/NVidia Networking MFC after:1 week Modified: head/sys/dev/mlx5/mlx

svn commit: r367612 - head/sys/dev/mlx5/mlx5_en

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 02:25:10 2020 New Revision: 367612 URL: https://svnweb.freebsd.org/changeset/base/367612 Log: mlx5en: Set ifmr_current same as ifmr_active. This both: - makes ifconfig media line similar to that of other drivers. - fixes ENXIO in case when paradoxical curren

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

2020-11-11 Thread Konstantin Belousov
Author: kib Date: Thu Nov 12 02:52:01 2020 New Revision: 367613 URL: https://svnweb.freebsd.org/changeset/base/367613 Log: bhyve: remove a hack to map all 8G BARs 1:1 Suggested and reviewed by:grehan Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:

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

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Fri Nov 13 09:31:57 2020 New Revision: 367631 URL: https://svnweb.freebsd.org/changeset/base/367631 Log: Implement vn_lock_pair(). In collaboration with:pho Reviewed by: mckusick (previous version), markj (previous version) Tested by:markj (syzkaller), pho

svn commit: r367632 - head/sys/kern

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Fri Nov 13 09:42:32 2020 New Revision: 367632 URL: https://svnweb.freebsd.org/changeset/base/367632 Log: Allow some VOPs to return ERELOOKUP to indicate VFS operation restart at top level. Restart syscalls and some sync operations when filesystem indicated ERELOOKUP con

Re: svn commit: r367631 - in head/sys: kern sys

2020-11-13 Thread Konstantin Belousov
On Fri, Nov 13, 2020 at 09:31:58AM +, Konstantin Belousov wrote: > Author: kib > Date: Fri Nov 13 09:31:57 2020 > New Revision: 367631 > URL: https://svnweb.freebsd.org/changeset/base/367631 > > Log: > Implement vn_lock_pair(). > > In collaboration wit

Re: svn commit: r367631 - in head/sys: kern sys

2020-11-13 Thread Konstantin Belousov
On Fri, Nov 13, 2020 at 08:24:30AM -0800, Conrad Meyer wrote: > Hi Konstantin, > > On Fri, Nov 13, 2020 at 1:32 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Fri Nov 13 09:31:57 2020 > > New Revision: 367631 > > URL: https://svnweb.freebs

Re: svn commit: r367631 - in head/sys: kern sys

2020-11-13 Thread Konstantin Belousov
On Fri, Nov 13, 2020 at 07:30:47PM +0100, Mateusz Guzik wrote: > On 11/13/20, Konstantin Belousov wrote: > > +static u_long vn_lock_pair_pause_cnt; > > +SYSCTL_ULONG(_debug, OID_AUTO, vn_lock_pair_pause, CTLFLAG_RD, > > +&vn_lock_pair_pause_cnt, 0, > > +&

svn commit: r367668 - in head/sys/ufs: ffs ufs

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Sat Nov 14 05:10:39 2020 New Revision: 367668 URL: https://svnweb.freebsd.org/changeset/base/367668 Log: Add a framework that tracks exclusive vnode lock generation count for UFS. This count is memoized together with the lookup metadata in directory inode, and we assert

svn commit: r367669 - head/sys/ufs/ffs

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Sat Nov 14 05:17:04 2020 New Revision: 367669 URL: https://svnweb.freebsd.org/changeset/base/367669 Log: Add a framework that tracks exclusive vnode lock generation count for UFS. This count is memoized together with the lookup metadata in directory inode, and we assert

svn commit: r367670 - head/sys/ufs/ffs

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Sat Nov 14 05:19:44 2020 New Revision: 367670 URL: https://svnweb.freebsd.org/changeset/base/367670 Log: Revert r367669 to re-commit with proper message Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ===

svn commit: r367671 - head/sys/ufs/ffs

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Sat Nov 14 05:19:59 2020 New Revision: 367671 URL: https://svnweb.freebsd.org/changeset/base/367671 Log: Add ffs_inode_bwrite() helper. In collaboration with:pho Reviewed by: mckusick (previous version), markj Tested by:markj (syzkaller), pho Sponsored b

svn commit: r367672 - in head/sys/ufs: ffs ufs

2020-11-13 Thread Konstantin Belousov
Author: kib Date: Sat Nov 14 05:30:10 2020 New Revision: 367672 URL: https://svnweb.freebsd.org/changeset/base/367672 Log: Handle LoR in flush_pagedep_deps(). When operating in SU or SU+J mode, ffs_syncvnode() might need to instantiate other vnode by inode number while owning syncing vnod

Re: svn commit: r367713 - head/sys/kern

2020-11-16 Thread Konstantin Belousov
On Mon, Nov 16, 2020 at 03:09:19AM +, Mateusz Guzik wrote: > Author: mjg > Date: Mon Nov 16 03:09:18 2020 > New Revision: 367713 > URL: https://svnweb.freebsd.org/changeset/base/367713 > > Log: > select: replace reference counting with memory barriers in selfd > > Refcounting was added

svn commit: r367741 - head/sys/kern

2020-11-16 Thread Konstantin Belousov
Author: kib Date: Tue Nov 17 02:18:34 2020 New Revision: 367741 URL: https://svnweb.freebsd.org/changeset/base/367741 Log: vmem: trivial warning and style fixes. Add __unused to some args. Change type of the iterator variables to match loop control. Remove excessive {}. Reviewed by

Re: svn commit: r367713 - head/sys/kern

2020-11-16 Thread Konstantin Belousov
On Tue, Nov 17, 2020 at 04:15:12AM +0100, Mateusz Guzik wrote: > On 11/17/20, Konstantin Belousov wrote: > > On Mon, Nov 16, 2020 at 03:09:19AM +, Mateusz Guzik wrote: > >> Author: mjg > >> Date: Mon Nov 16 03:09:18 2020 > >> New Revision: 367713 > >&

Re: svn commit: r367713 - head/sys/kern

2020-11-17 Thread Konstantin Belousov
On Tue, Nov 17, 2020 at 03:36:31PM +0100, Mateusz Guzik wrote: > On 11/17/20, Konstantin Belousov wrote: > > On Tue, Nov 17, 2020 at 04:15:12AM +0100, Mateusz Guzik wrote: > >> On 11/17/20, Konstantin Belousov wrote: > >> > On Mon, Nov 16, 2020 at 03:09:1

svn commit: r367890 - head/sys/fs/msdosfs

2020-11-20 Thread Konstantin Belousov
Author: kib Date: Fri Nov 20 12:31:02 2020 New Revision: 367890 URL: https://svnweb.freebsd.org/changeset/base/367890 Log: msdosfs: Add trivial support for suspension. Tested by:pho (previous version) Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:

svn commit: r367892 - head/sys/dev/sound/pcm

2020-11-20 Thread Konstantin Belousov
Author: kib Date: Fri Nov 20 14:02:43 2020 New Revision: 367892 URL: https://svnweb.freebsd.org/changeset/base/367892 Log: Unlock channels when any of them are locked, when returning for non-busy state. Reported and tested by: "Wall, Stephen" Sponsored by: The FreeBSD Foundation

svn commit: r367895 - head/sys/fs/msdosfs

2020-11-20 Thread Konstantin Belousov
Author: kib Date: Fri Nov 20 15:19:30 2020 New Revision: 367895 URL: https://svnweb.freebsd.org/changeset/base/367895 Log: msdosfs: suspend around unmount or remount rw->ro. This also eliminates unsafe use of VFS_SYNC(MNT_WAIT). Requested by: mckusick Discussed with: imp Test

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

2020-11-21 Thread Konstantin Belousov
Author: kib Date: Sat Nov 21 10:32:40 2020 New Revision: 367918 URL: https://svnweb.freebsd.org/changeset/base/367918 Log: Stop using eventhandler to invoke umtx_exec hook. There is no point in dynamic registration, umtx hook is there always. Reviewed by: mjg Sponsored by: The FreeB

svn commit: r367919 - head/sys/kern

2020-11-21 Thread Konstantin Belousov
Author: kib Date: Sat Nov 21 10:58:19 2020 New Revision: 367919 URL: https://svnweb.freebsd.org/changeset/base/367919 Log: Remove unused prototype. Missed part of r367918. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_umtx.c Modified: head

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

2020-11-21 Thread Konstantin Belousov
Author: kib Date: Sat Nov 21 21:43:36 2020 New Revision: 367923 URL: https://svnweb.freebsd.org/changeset/base/367923 Log: Stop using eventhandlers for itimers subsystem exec and exit hooks. While there, do some minor cleanup for kclocks. They are only registered from kern_time.c, make r

Re: svn commit: r367928 - in head/sys: compat/freebsd32 kern sys

2020-11-21 Thread Konstantin Belousov
On Sun, Nov 22, 2020 at 05:34:51AM +, Kyle Evans wrote: > Author: kevans > Date: Sun Nov 22 05:34:51 2020 > New Revision: 367928 > URL: https://svnweb.freebsd.org/changeset/base/367928 > > Log: > _umtx_op: move compat32 definitions back in > > These are reasonably compact, and a future

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

2020-11-23 Thread Konstantin Belousov
Author: kib Date: Mon Nov 23 17:29:25 2020 New Revision: 367959 URL: https://svnweb.freebsd.org/changeset/base/367959 Log: Provide ABI modules hooks for process exec/exit and thread exit. Exec and exit are same as corresponding eventhandler hooks. Thread exit hook is called somewhat ea

svn commit: r367960 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux

2020-11-23 Thread Konstantin Belousov
Author: kib Date: Mon Nov 23 18:18:16 2020 New Revision: 367960 URL: https://svnweb.freebsd.org/changeset/base/367960 Log: Linuxolator: Replace use of eventhandlers by sysent hooks. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.fr

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

2020-11-25 Thread Konstantin Belousov
Author: kib Date: Wed Nov 25 17:04:26 2020 New Revision: 368023 URL: https://svnweb.freebsd.org/changeset/base/368023 Log: Use designated initializers for libc pthread stubs' jump table. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/lib/libc/gen/_pthread_stub

svn commit: r368024 - head/sys/ufs/ffs

2020-11-25 Thread Konstantin Belousov
Author: kib Date: Wed Nov 25 17:12:21 2020 New Revision: 368024 URL: https://svnweb.freebsd.org/changeset/base/368024 Log: ffs_softdep.c: get_parent_vp(): Fix bp lock leak when inum inode was already freed. Reported by: markj, pho Tested by:pho Sponsored by: The FreeBSD Foundation

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

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 18:00:26 2020 New Revision: 368073 URL: https://svnweb.freebsd.org/changeset/base/368073 Log: Make max ticks for pause in vn_lock_pair() adjustable at runtime. Reduce default value from hz / 10 to hz / 100. Reviewed by: markj Tested by:pho Sponsore

svn commit: r368074 - head/sys/ufs/ffs

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 18:03:24 2020 New Revision: 368074 URL: https://svnweb.freebsd.org/changeset/base/368074 Log: clear_inodedeps: handle ERELOOKUP from ffs_syncvnode(). Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/ufs/ffs/ffs_softd

svn commit: r368075 - head/sys/kern

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 18:08:42 2020 New Revision: 368075 URL: https://svnweb.freebsd.org/changeset/base/368075 Log: More careful handling of the mount failure. - VFS_UNMOUNT() requires vn_start_write() around it [*]. - call VFS_PURGE() before unmount. - do not destroy mp if clean

svn commit: r368076 - head/sys/kern

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 18:13:33 2020 New Revision: 368076 URL: https://svnweb.freebsd.org/changeset/base/368076 Log: vn_read_from_obj(): fix handling of doomed vnodes. There is no reason why vp->v_object cannot be NULL. If it is, it's fine, handle it by delegating to VOP_READ().

svn commit: r368077 - head/sys/fs/nullfs

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 18:16:32 2020 New Revision: 368077 URL: https://svnweb.freebsd.org/changeset/base/368077 Log: nullfs: provide custom bypass for VOP_READ_PGCACHE(). Normal bypass expects locked vnode, which is not true for VOP_READ_PGCACHE(). Ensure liveness of the lower vnod

svn commit: r368082 - head/lib/libthr/thread

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 20:23:17 2020 New Revision: 368082 URL: https://svnweb.freebsd.org/changeset/base/368082 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libthr/thread/thr_attr.c Modified: head/lib/libthr/thread/thr_attr.c

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

2020-11-26 Thread Konstantin Belousov
Author: kib Date: Thu Nov 26 20:27:23 2020 New Revision: 368083 URL: https://svnweb.freebsd.org/changeset/base/368083 Log: Remove stray column. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libc/gen/_pthread_stubs.c Modified: head/lib/libc/gen/_pthread_stub

svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash dev...

2020-11-28 Thread Konstantin Belousov
Author: kib Date: Sat Nov 28 12:12:51 2020 New Revision: 368124 URL: https://svnweb.freebsd.org/changeset/base/368124 Log: Make MAXPHYS tunable. Bump MAXPHYS to 1M. Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the t

svn commit: r368125 - in head/lib: libc/gen libc/include libthr/thread

2020-11-28 Thread Konstantin Belousov
Author: kib Date: Sat Nov 28 12:19:20 2020 New Revision: 368125 URL: https://svnweb.freebsd.org/changeset/base/368125 Log: libc: Add pthread_attr_get_np(3) stub, reporting ESRCH. This seems to be required by recent clang asan. I do not see other way than put the symbol under FBSD_1.0 vers

svn commit: r368142 - head/sys/kern

2020-11-29 Thread Konstantin Belousov
Author: kib Date: Sun Nov 29 10:30:56 2020 New Revision: 368142 URL: https://svnweb.freebsd.org/changeset/base/368142 Log: bio aio: Destroy ephemeral mapping before unwiring page. Apparently some architectures, like ppc in its hashed page tables variants, account mappings by pmap_qenter()

svn commit: r368143 - head/sys/amd64/vmm

2020-11-29 Thread Konstantin Belousov
Author: kib Date: Sun Nov 29 10:32:38 2020 New Revision: 368143 URL: https://svnweb.freebsd.org/changeset/base/368143 Log: bhyve: limit max GPA to VM_MAXUSER_ADDRESS_LA48. We use 4-level EPT pages, correct the upper bound. Reviewed by: grehan Sponsored by: The FreeBSD Foundation D

Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash de

2020-11-29 Thread Konstantin Belousov
On Sun, Nov 29, 2020 at 02:03:57PM +0100, Michal Meloun wrote: > On 28.11.2020 13:12, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Nov 28 12:12:51 2020 > > New Revision: 368124 > > URL: https://svnweb.freebsd.org/changeset/base/368124 > > > >

svn commit: r368162 - head/sys/sys

2020-11-29 Thread Konstantin Belousov
Author: kib Date: Sun Nov 29 19:06:32 2020 New Revision: 368162 URL: https://svnweb.freebsd.org/changeset/base/368162 Log: Reduce MAXPHYS back to 128KB on 32bit architectures. Some of them have limited KVA, like arm, which prevents startup from allocating needed number of large pbufs. Ot

svn commit: r368190 - head/lib/libthr/thread

2020-11-30 Thread Konstantin Belousov
Author: kib Date: Mon Nov 30 17:00:36 2020 New Revision: 368190 URL: https://svnweb.freebsd.org/changeset/base/368190 Log: Ensure that threading library is initialized in pthread_mutex_init(). We need at least thr_malloc ready. The situation is possible e.g. in case of libthr being liste

svn commit: r368191 - head/sys/ufs/ffs

2020-11-30 Thread Konstantin Belousov
Author: kib Date: Mon Nov 30 17:03:26 2020 New Revision: 368191 URL: https://svnweb.freebsd.org/changeset/base/368191 Log: ffs: do not read full direct blocks if they are going to be overwritten. BA_CLRBUF specifies that existing context of the block will be completely overwritten by call

svn commit: r368260 - in head: libexec/rtld-elf sys/sys

2020-12-01 Thread Konstantin Belousov
Author: kib Date: Tue Dec 1 22:28:01 2020 New Revision: 368260 URL: https://svnweb.freebsd.org/changeset/base/368260 Log: rtld: bump r_debug.r_version to 1 from current 0. Add r_ldbase. Requested and reviewed by:emaste Sponsored by: The FreeBSD Foundation MFC after:1 week

svn commit: r368262 - head/sys/kern

2020-12-01 Thread Konstantin Belousov
Author: kib Date: Tue Dec 1 22:30:32 2020 New Revision: 368262 URL: https://svnweb.freebsd.org/changeset/base/368262 Log: vfs_aio.c: correct comment. Reviewed by: asomers Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.

svn commit: r368263 - head/sys/cddl/dev/dtrace/amd64

2020-12-01 Thread Konstantin Belousov
Author: kib Date: Tue Dec 1 22:44:23 2020 New Revision: 368263 URL: https://svnweb.freebsd.org/changeset/base/368263 Log: Fix syntax Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ==

svn commit: r368264 - head/sys/kern

2020-12-01 Thread Konstantin Belousov
Author: kib Date: Tue Dec 1 22:46:51 2020 New Revision: 368264 URL: https://svnweb.freebsd.org/changeset/base/368264 Log: vfs_aio.c: style. Mostly re-wrap conditions to split after binary ops. Reviewed by: asomers Sponsored by: The FreeBSD Foundation MFC after:1 week Differ

svn commit: r368265 - head/sys/kern

2020-12-01 Thread Konstantin Belousov
Author: kib Date: Tue Dec 1 22:53:33 2020 New Revision: 368265 URL: https://svnweb.freebsd.org/changeset/base/368265 Log: lio_listio(2): send signal even if number of jobs is zero. Right now, if lio registered zero jobs, syscall frees lio job structure, cleaning up queued ksi. As result

<    4   5   6   7   8   9   10   11   12   13   >