svn commit: r332182 - in head/sys: amd64/amd64 vm

2018-04-07 Thread Konstantin Belousov
Author: kib Date: Sat Apr 7 17:06:13 2018 New Revision: 332182 URL: https://svnweb.freebsd.org/changeset/base/332182 Log: Handle Skylake-X errata SKZ63. SKZ63 Processor May Hang When Executing Code In an HLE Transaction Region Problem: Under certain conditions, if the processor acqu

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

2018-04-12 Thread Konstantin Belousov
Author: kib Date: Thu Apr 12 19:59:36 2018 New Revision: 332450 URL: https://svnweb.freebsd.org/changeset/base/332450 Log: Optimize context switch for PTI on PCID pmap. In pti-enabled pmap, the PCID allocation scheme assigns temporal id for the kernel page table, and user page table twin

svn commit: r332454 - in head/sys: amd64/amd64 amd64/ia32 amd64/linux amd64/linux32 i386/i386

2018-04-12 Thread Konstantin Belousov
Author: kib Date: Thu Apr 12 20:43:39 2018 New Revision: 332454 URL: https://svnweb.freebsd.org/changeset/base/332454 Log: Fix PSL_T inheritance on exec for x86. The miscellaneous x86 sysent->sv_setregs() implementations tried to migrate PSL_T from the previous program to the new executed

Re: svn commit: r332454 - in head/sys: amd64/amd64 amd64/ia32 amd64/linux amd64/linux32 i386/i386

2018-04-13 Thread Konstantin Belousov
On Fri, Apr 13, 2018 at 10:30:39AM -0700, John Baldwin wrote: > On Thursday, April 12, 2018 08:43:39 PM Konstantin Belousov wrote: > > Author: kib > > Date: Thu Apr 12 20:43:39 2018 > > New Revision: 332454 > > URL: https://svnweb.freebsd.org/changeset/base/332454 &g

svn commit: r332489 - in head: gnu/usr.bin/gdb/kgdb sys/conf sys/dev/dcons sys/dev/hyperv/vmbus/i386 sys/dev/ppc sys/dev/syscons sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/include/pc sys...

2018-04-13 Thread Konstantin Belousov
i386/i386/copyout.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/i386/copyout.cFri Apr 13 20:30:49 2018 (r332489) @@ -0,0 +1,489 @@ +/*- + * SPDX-License

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

2018-04-14 Thread Konstantin Belousov
Author: kib Date: Sat Apr 14 17:33:16 2018 New Revision: 332504 URL: https://svnweb.freebsd.org/changeset/base/332504 Log: Set PG_G global mapping bit on the trampoline ptes. Trampoline mappings are better treated as global since they are valid in all address spaces, even for PTI. pmap_i

Re: svn commit: r332559 - head/usr.sbin/mountd

2018-04-16 Thread Konstantin Belousov
On Mon, Apr 16, 2018 at 09:17:36AM +, Andriy Gapon wrote: > Author: avg > Date: Mon Apr 16 09:17:36 2018 > New Revision: 332559 > URL: https://svnweb.freebsd.org/changeset/base/332559 > > Log: > mountd: fix a crash when getgrouplist reports too many groups > > Previously the code only w

Re: svn commit: r332559 - head/usr.sbin/mountd

2018-04-17 Thread Konstantin Belousov
On Tue, Apr 17, 2018 at 12:02:04AM +, Rick Macklem wrote: > I wrote: > >Julian Elischer wrote: > >>On 16/4/18 6:56 pm, Konstantin Belousov wrote: > >[stuff snipped] > >>>> +ngroups =3D XU_NGROUPS + 1; > >>> Why X

svn commit: r332737 - head/sys/i386/i386

2018-04-18 Thread Konstantin Belousov
Author: kib Date: Wed Apr 18 20:07:47 2018 New Revision: 332737 URL: https://svnweb.freebsd.org/changeset/base/332737 Log: For fatal traps other than pagefaults, print raw fault error codes. For pagefaults, the error is already decoded and printed. Sponsored by: The FreeBSD Foundation

svn commit: r332738 - head/sys/i386/i386

2018-04-18 Thread Konstantin Belousov
Author: kib Date: Wed Apr 18 20:09:26 2018 New Revision: 332738 URL: https://svnweb.freebsd.org/changeset/base/332738 Log: Fix pmap_trm_alloc(M_ZERO). Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ===

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

2018-04-18 Thread Konstantin Belousov
Author: kib Date: Wed Apr 18 21:31:13 2018 New Revision: 332740 URL: https://svnweb.freebsd.org/changeset/base/332740 Log: Add PROC_PDEATHSIG_SET to procctl interface. Allow processes to request the delivery of a signal upon death of their parent process. Supposed consumer of the feature

svn commit: r332786 - head/sys/i386/include

2018-04-19 Thread Konstantin Belousov
Author: kib Date: Thu Apr 19 18:08:46 2018 New Revision: 332786 URL: https://svnweb.freebsd.org/changeset/base/332786 Log: Use symbolic constant, explaining the operation. Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/include/asmacros.h Modified: head/sys/i386/include/asm

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

2018-04-20 Thread Konstantin Belousov
Author: kib Date: Fri Apr 20 15:19:27 2018 New Revision: 332825 URL: https://svnweb.freebsd.org/changeset/base/332825 Log: Rename PROC_PDEATHSIG_SET -> PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_GET -> PROC_PDEATHSIG_STATUS for consistency with other procctl(2) operations names. Requested by

Re: svn commit: r332489 - in head: gnu/usr.bin/gdb/kgdb sys/conf sys/dev/dcons sys/dev/hyperv/vmbus/i386 sys/dev/ppc sys/dev/syscons sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/include/pc sy

2018-04-22 Thread Konstantin Belousov
On Sun, Apr 22, 2018 at 09:06:56PM +0200, Tijl Coosemans wrote: > On Fri, 13 Apr 2018 20:30:49 + (UTC) Konstantin Belousov > wrote: > > Author: kib > > Date: Fri Apr 13 20:30:49 2018 > > New Revision: 332489 > > URL: https://svnweb.freebsd.org/changeset/base/332

Re: svn commit: r332489 - in head: gnu/usr.bin/gdb/kgdb sys/conf sys/dev/dcons sys/dev/hyperv/vmbus/i386 sys/dev/ppc sys/dev/syscons sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/include/pc sy

2018-04-22 Thread Konstantin Belousov
On Sun, Apr 22, 2018 at 10:26:14PM +0300, Konstantin Belousov wrote: > On Sun, Apr 22, 2018 at 09:06:56PM +0200, Tijl Coosemans wrote: > > On Fri, 13 Apr 2018 20:30:49 +0000 (UTC) Konstantin Belousov > > wrote: > > Could this have broken the linux futex syscall? I have a l

svn commit: r332930 - in head/sys: compat/linux conf i386/i386 i386/include i386/linux modules/linux

2018-04-24 Thread Konstantin Belousov
_support.s) == --- head/sys/i386/linux/linux_support.s Tue Apr 24 12:17:28 2018 (r332929, copy source) +++ head/sys/i386/linux/linux_copyout.c Tue Apr 24 12:50:21 2018 (r332930) @@ -1,9 +1,12 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006,2007 Konstanti

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

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 13:44:19 2018 New Revision: 332932 URL: https://svnweb.freebsd.org/changeset/base/332932 Log: Correct undesirable interaction between caching of %cr4 in bhyve and invltlb_glob(). Reviewed by: grehan, jhb Sponsored by: The FreeBSD Foundation MFC after:

svn commit: r332934 - head/sys/x86/x86

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 14:02:46 2018 New Revision: 332934 URL: https://svnweb.freebsd.org/changeset/base/332934 Log: Use relaxed atomics to access the monitor line. We must ensure that accesses occur, they do not have any other compiler-visible effects. Bruce found some situations

svn commit: r332940 - head/lib/libc/secure

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 15:59:39 2018 New Revision: 332940 URL: https://svnweb.freebsd.org/changeset/base/332940 Log: Carefully update stack guard bytes inside __guard_setup(). This is necessary to make sure that functions that can have stack protection are not used to update the sta

svn commit: r332970 - head/sys/x86/x86

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 20:22:30 2018 New Revision: 332970 URL: https://svnweb.freebsd.org/changeset/base/332970 Log: Use IS_BSP() macro. Noted and reviewed by:jhb Sponsored by: The FreeBSD Foundation MFC after:3 days Differential revision:https://reviews.free

svn commit: r332971 - head/sys/x86/x86

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 20:29:40 2018 New Revision: 332971 URL: https://svnweb.freebsd.org/changeset/base/332971 Log: Ensure that cmci_monitor() is not executed in parallel, since shared machine check banks must be only monitored by single CPU. Noted and reviewed by:jhb Spo

svn commit: r332972 - head/sys/x86/x86

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 20:33:08 2018 New Revision: 332972 URL: https://svnweb.freebsd.org/changeset/base/332972 Log: Extend ap_boot_mtx scope to also cover mca_init(). Otherwise, under bootverbose, the lapic_enable_cmc() banner 'lapicX: CMCI unmasked' is printed by several CPUs in p

svn commit: r332973 - head/sys/x86/x86

2018-04-24 Thread Konstantin Belousov
Author: kib Date: Tue Apr 24 20:49:16 2018 New Revision: 332973 URL: https://svnweb.freebsd.org/changeset/base/332973 Log: Make the sysctl machdep.idle also a tunable. It is applied before it is possible for idle threads to execute on any CPU, allowing to work around against some bugs.

svn commit: r333002 - head/sys/x86/x86

2018-04-25 Thread Konstantin Belousov
Author: kib Date: Wed Apr 25 16:43:45 2018 New Revision: 333002 URL: https://svnweb.freebsd.org/changeset/base/333002 Log: Use CPUID leaf 0x15 to get TSC frequency when the calibration is disabled. Intel finally added this information, which allows us to not parse CPU identification str

svn commit: r333025 - head/sys/x86/x86

2018-04-26 Thread Konstantin Belousov
Author: kib Date: Thu Apr 26 18:12:40 2018 New Revision: 333025 URL: https://svnweb.freebsd.org/changeset/base/333025 Log: Some style and minor code improvements for idle selection. Use designated initializers for the idlt_tlb elements. Remove strstr() use, add flag field to detect suppor

svn commit: r333026 - head/sys/x86/x86

2018-04-26 Thread Konstantin Belousov
Author: kib Date: Thu Apr 26 18:24:31 2018 New Revision: 333026 URL: https://svnweb.freebsd.org/changeset/base/333026 Log: Handle Appolo Lake errata APL31. If the workaround is activated, always send IPI for wake up, not rely on the write to the monitor line. This fixes Appolo Lake machi

svn commit: r333034 - head/sys/x86/x86

2018-04-26 Thread Konstantin Belousov
Author: kib Date: Thu Apr 26 19:23:19 2018 New Revision: 333034 URL: https://svnweb.freebsd.org/changeset/base/333034 Log: Fix spelling: Appolo -> Apollo [1]. The APL31 NDA errata is APL30 public errata. Add the reference and provide the description [2]. Noted by: emaste [2], rpoka

svn commit: r333036 - head/sys/i386/include

2018-04-26 Thread Konstantin Belousov
Author: kib Date: Thu Apr 26 21:07:45 2018 New Revision: 333036 URL: https://svnweb.freebsd.org/changeset/base/333036 Log: Fix move of the frame to the normal stack for interrupts occuring from the vm86 mode. Submitted by: jhb Modified: head/sys/i386/include/asmacros.h Modified: head/

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

2018-04-27 Thread Konstantin Belousov
On Fri, Apr 27, 2018 at 03:50:22PM +, Mateusz Guzik wrote: > Author: mjg > Date: Fri Apr 27 15:50:22 2018 > New Revision: 333066 > URL: https://svnweb.freebsd.org/changeset/base/333066 > > Log: > Unbreak world build after r333064 > > Reported by:O. Hartmann > > Modified: > h

svn commit: r333067 - head/tests/sys/kern

2018-04-27 Thread Konstantin Belousov
Author: kib Date: Fri Apr 27 16:34:28 2018 New Revision: 333067 URL: https://svnweb.freebsd.org/changeset/base/333067 Log: Remove redundant pipe from pdeathsig.c test. A pipe was was left over from a development version of pdeathsig.c and is not needed. Process C waits for a signal t

svn commit: r333091 - head/sys/vm

2018-04-29 Thread Konstantin Belousov
Author: kib Date: Sun Apr 29 12:43:08 2018 New Revision: 333091 URL: https://svnweb.freebsd.org/changeset/base/333091 Log: Eliminate some vm object relocks in vm fault. For the vm_fault_prefault() call from vm_fault_soft_fast(), extend the scope of the object rlock to avoid re-taking it i

svn commit: r333125 - in head/sys/x86: acpica include

2018-04-30 Thread Konstantin Belousov
Author: kib Date: Mon Apr 30 20:18:32 2018 New Revision: 333125 URL: https://svnweb.freebsd.org/changeset/base/333125 Log: Turn off IBRS on suspend. Resume starts CPU from the init state, which clears any loaded microcode updates. As result, IBRS MSRs are no longer available, until the

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

2018-05-02 Thread Konstantin Belousov
Author: kib Date: Wed May 2 20:22:03 2018 New Revision: 333182 URL: https://svnweb.freebsd.org/changeset/base/333182 Log: mlx5en: Always allow VLAN id 0. According to the 802.1Q-2014 9.6 VLAN Tag Control Information, VID value 0 means that there is no VLAN tag assigned to the packet, and

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

2018-05-03 Thread Konstantin Belousov
Author: kib Date: Thu May 3 10:17:37 2018 New Revision: 333208 URL: https://svnweb.freebsd.org/changeset/base/333208 Log: Style. Sponsored by: The FreeBSD Foundation MFC after:3 days Differential revision:https://reviews.freebsd.org/D13838 Modified: head/sys/amd64/amd64/

svn commit: r333228 - in head/sys: amd64/amd64 i386/i386 kern sys

2018-05-03 Thread Konstantin Belousov
Author: kib Date: Thu May 3 21:37:46 2018 New Revision: 333228 URL: https://svnweb.freebsd.org/changeset/base/333228 Log: Implement support for ifuncs in the kernel linker. Required MD bits are only provided for x86. Reviewed by: jhb (previous version, as part of the larger patch)

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

2018-05-03 Thread Konstantin Belousov
, 2017 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following

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

2018-05-08 Thread Konstantin Belousov
Author: kib Date: Tue May 8 17:00:34 2018 New Revision: 68 URL: https://svnweb.freebsd.org/changeset/base/68 Log: Prepare DB# handler for deferred trigger of watchpoints. Since pop %ss/mov %ss instructions defer all interrupts and exceptions for the next instruction, it is possib

svn commit: r333397 - in head: lib/libc share/mk

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 10:28:24 2018 New Revision: 97 URL: https://svnweb.freebsd.org/changeset/base/97 Log: Created static libc PIC/no-SSP library to be used by rtld. Rtld is not compatible with SSP, and since we link libc_pic.a to rtld to have the basic support like memory

svn commit: r333398 - head/libexec/rtld-elf

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 10:30:56 2018 New Revision: 98 URL: https://svnweb.freebsd.org/changeset/base/98 Log: Make rtld use libc_nossp_pic.a. Remove SSP shims. Submitted by: Luis Pires Reviewed by: brooks Differential revision:https://reviews.freebsd.org/D15341 M

svn commit: r333399 - head/lib/libc

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 10:33:25 2018 New Revision: 99 URL: https://svnweb.freebsd.org/changeset/base/99 Log: Now that a special no-SSP libc is used for rtld, allow -fstack-protector-all for normal libc builds. Submitted by: Luis Pires Reviewed by: brooks Differential re

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

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 12:03:40 2018 New Revision: 333404 URL: https://svnweb.freebsd.org/changeset/base/333404 Log: Remove PG_U from the recursive pte for kernel pmap' PML4 page. This PML4 page is never used for the userspace process, so there is no security implications. But the

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

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 12:09:08 2018 New Revision: 333405 URL: https://svnweb.freebsd.org/changeset/base/333405 Log: Remove PG_U from the rest of the kernel pmap ptes. Supposedly, they PG_U bits there were set to easier making some kernel page accessible to userspace in-place. Sinc

svn commit: r333411 - in head/sys: amd64/amd64 kern

2018-05-09 Thread Konstantin Belousov
Author: kib Date: Wed May 9 14:39:24 2018 New Revision: 333411 URL: https://svnweb.freebsd.org/changeset/base/333411 Log: Avoid calls to bzero() before ireloc. Evaluate cpu_stdext_feature early to have moved link_elf_ireloc() see correct flags, most important is SMAP. Tested by:

svn commit: r333460 - head/tools/test/popss

2018-05-10 Thread Konstantin Belousov
/popss.c Thu May 10 13:52:52 2018 (r333460) @@ -0,0 +1,183 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the

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

2018-05-10 Thread Konstantin Belousov
Author: kib Date: Thu May 10 15:01:43 2018 New Revision: 333461 URL: https://svnweb.freebsd.org/changeset/base/333461 Log: Make fpusave() and fpurestore() on amd64 ifuncs. From now on, linking amd64 kernel requires either lld or newer ld.bfd. Reviewed by: jhb (as part of the large pat

Re: svn commit: r333461 - head/sys/amd64/amd64

2018-05-10 Thread Konstantin Belousov
On Fri, May 11, 2018 at 03:31:46AM +1000, Bruce Evans wrote: > On Thu, 10 May 2018, Konstantin Belousov wrote: > > > Log: > > Make fpusave() and fpurestore() on amd64 ifuncs. > > > > From now on, linking amd64 kernel requires either lld or newer ld.bfd. >

Re: svn commit: r333461 - head/sys/amd64/amd64

2018-05-11 Thread Konstantin Belousov
On Thu, May 10, 2018 at 07:57:03PM -0700, Conrad Meyer wrote: > On Thu, May 10, 2018 at 8:01 AM, Konstantin Belousov wrote: > > Author: kib > > Date: Thu May 10 15:01:43 2018 > > New Revision: 333461 > > URL: https://svnweb.freebsd.org/changeset/base/333461 > >

Re: svn commit: r333461 - head/sys/amd64/amd64

2018-05-11 Thread Konstantin Belousov
On Thu, May 10, 2018 at 10:17:06PM -0400, Ed Maste wrote: > On 10 May 2018 at 15:38, Konstantin Belousov wrote: > > > > Yes, I already noted and mjg noted that ifuncs are directed through PLT. > > I remember that it was not the case when I did it the first time, but then

Re: svn commit: r333496 - head

2018-05-11 Thread Konstantin Belousov
On Fri, May 11, 2018 at 04:46:52PM +, Bryan Drewery wrote: > Author: bdrewery > Date: Fri May 11 16:46:52 2018 > New Revision: 333496 > URL: https://svnweb.freebsd.org/changeset/base/333496 > > Log: > Add a bunch of orphaned libraries. > > MFC after: 3 days > > Modified: > head/Obso

svn commit: r333504 - head/sys/i386/include

2018-05-11 Thread Konstantin Belousov
Author: kib Date: Fri May 11 20:47:45 2018 New Revision: 333504 URL: https://svnweb.freebsd.org/changeset/base/333504 Log: Remove dead declaration. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/i386/include/pcb_ext.h Modified: head/sys/i386/include/pcb_e

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

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 10:11:33 2018 New Revision: 333521 URL: https://svnweb.freebsd.org/changeset/base/333521 Log: PROC_PDEATHSIG_CTL will appear first in 11.2. Submitted by: Thomas Munro MFC after:3 days Differential revision:https://reviews.freebsd.org/D15399 Modi

svn commit: r333522 - head/sys/i386/i386

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 10:48:53 2018 New Revision: 333522 URL: https://svnweb.freebsd.org/changeset/base/333522 Log: Fix use of the custom TSS on i386 after the 4/4 split. Record common_tssd, the descriptor to be written in GDT to point to the common TSS, before LTR is executed. Th

svn commit: r333523 - head/sys/i386/include

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 10:51:50 2018 New Revision: 333523 URL: https://svnweb.freebsd.org/changeset/base/333523 Log: Create a macro for PIC code which loads %cr3 from tramp_idleptd. Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/include/asmacros.h Modified: head/sys/

svn commit: r333524 - head/sys/i386/i386

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 10:57:34 2018 New Revision: 333524 URL: https://svnweb.freebsd.org/changeset/base/333524 Log: Initialize tramp_idleptd during cold pmap startup, before the exception code is copied to the trampoline. The correct value is then copied to trampoline automatically

svn commit: r333525 - head/sys/i386/i386

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 11:02:39 2018 New Revision: 333525 URL: https://svnweb.freebsd.org/changeset/base/333525 Log: On return from exception or interrupt, returns to vm86 mode with PCB_VM86CALL pcb flag not set should be treated same as return to userspace. Most important, the ad

svn commit: r333526 - head/sys/i386/include

2018-05-12 Thread Konstantin Belousov
Author: kib Date: Sat May 12 11:06:59 2018 New Revision: 333526 URL: https://svnweb.freebsd.org/changeset/base/333526 Log: Kernel entry from vm86 mode, where PCB_VM86CALL pcb flag is not set, is executed on the right stack already. No copy from the entry stack to the kstack must be performe

svn commit: r333534 - head/tools/test/vm86

2018-05-12 Thread Konstantin Belousov
@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary

svn commit: r318243 - head/sys/kern

2017-05-12 Thread Konstantin Belousov
Author: kib Date: Fri May 12 15:34:59 2017 New Revision: 318243 URL: https://svnweb.freebsd.org/changeset/base/318243 Log: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. The reschedule_signals() functio

svn commit: r318256 - head/libexec/rtld-elf

2017-05-13 Thread Konstantin Belousov
Author: kib Date: Sat May 13 18:59:27 2017 New Revision: 318256 URL: https://svnweb.freebsd.org/changeset/base/318256 Log: In _rtld(), reorder local declarations to compact the block and partially sort them by style(9). Move locals declarations from nested blocks into the block at function

svn commit: r318285 - head/sys/kern

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 10:02:45 2017 New Revision: 318285 URL: https://svnweb.freebsd.org/changeset/base/318285 Log: mnt_vnode_next_active: use conventional lock order when trylock fails. Previously, when the VI_TRYLOCK failed, we would spin under the mutex that protects the vnode a

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

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 10:02:45AM +, Konstantin Belousov wrote: > Author: kib > Date: Mon May 15 10:02:45 2017 > New Revision: 318285 > URL: https://svnweb.freebsd.org/changeset/base/318285 > > Log: > mnt_vnode_next_active: use conventional lock ord

svn commit: r318298 - head/lib/libc/stdlib

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 17:14:53 2017 New Revision: 318298 URL: https://svnweb.freebsd.org/changeset/base/318298 Log: Fix several buffer overflows in realpath(3). - The statement "left_len -= s - left;" does not take the slash into account if one was found. This results in the invaria

svn commit: r318299 - head/lib/libc/stdlib

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 17:34:17 2017 New Revision: 318299 URL: https://svnweb.freebsd.org/changeset/base/318299 Log: Simplify cleanup on failure in realpath(3). If realpath() allocated memory for result and failed, the memory is freed in each place where return is performed. More,

svn commit: r318303 - head/lib/libc/stdlib

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 17:54:36 2017 New Revision: 318303 URL: https://svnweb.freebsd.org/changeset/base/318303 Log: Style. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c

svn commit: r318312 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 18:47:25 2017 New Revision: 318312 URL: https://svnweb.freebsd.org/changeset/base/318312 Log: Fix the AT_EXECFD functionality. If the mapped object is linked at specific address, we must obey it. If AT_EXECFD is not used, only in-kernel ELF image activator nee

svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 18:48:58 2017 New Revision: 318313 URL: https://svnweb.freebsd.org/changeset/base/318313 Log: Make ld-elf.so.1 directly executable. Check if passed phdr is actually phdr of the interpreter itself, and decide that this is the case of direct execution. In this

Re: svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 06:52:36PM +, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: > > New Revision: 318313 > > URL: https://svnweb.freebsd.org/changeset/base/318313 > > > > Log: > > Make ld-elf.so.1 direc

Re: svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > Well, for example, it seems like it would allow anyone to execute a > binary even if the sysadmin had set it to -x specifically to prevent > people from running it. The direct mode does not (and cannot) honor set{u,g}id modes of the exe

Re: svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 12:25:20PM -0700, Bryan Drewery wrote: > On 5/15/2017 12:00 PM, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 06:52:36PM +, Alexey Dokuchaev wrote: > >> On Mon, May 15, 2017 at 06:48:58PM +, Konstantin Belousov wrote: > >>>

Re: svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > On Mon, May 15, 2017 at 10:25:29PM +0300, Konstantin Belousov wrote: > >> On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > >>> Well, for e

Re: svn commit: r318313 - head/libexec/rtld-elf

2017-05-15 Thread Konstantin Belousov
On Mon, May 15, 2017 at 07:42:23PM +, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 10:40:49PM +0300, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > > > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > > > ..

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

2017-05-15 Thread Konstantin Belousov
Author: kib Date: Mon May 15 20:52:43 2017 New Revision: 318318 URL: https://svnweb.freebsd.org/changeset/base/318318 Log: Ensure that resume path on amd64 only accesses page tables for normal operation after processor is configured to allow all required features. In particular, NX must

svn commit: r318380 - head/libexec/rtld-elf

2017-05-16 Thread Konstantin Belousov
Author: kib Date: Tue May 16 19:53:38 2017 New Revision: 318380 URL: https://svnweb.freebsd.org/changeset/base/318380 Log: Pretend that there is some security when executing in direct mode. Do not allow direct exec if we the process is suid. Try to follow Unix permission checks for DACs,

svn commit: r318445 - head/libexec/rtld-elf

2017-05-18 Thread Konstantin Belousov
Author: kib Date: Thu May 18 09:31:30 2017 New Revision: 318445 URL: https://svnweb.freebsd.org/changeset/base/318445 Log: Fix style [1], add static keyword before static function definition. Noted by: bapt [1] Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified:

svn commit: r318446 - head/libexec/rtld-elf

2017-05-18 Thread Konstantin Belousov
Thu May 18 09:34:26 2017 (r318446) @@ -1,10 +1,14 @@ /*- * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra. * Copyright 2003 Alexander Kabaev . - * Copyright 2009-2012 Konstantin Belousov . + * Copyright 2009-2013 Konstantin Belousov . * Copyright 2012 John Marino

svn commit: r318450 - head/lib/libc/tests/gen

2017-05-18 Thread Konstantin Belousov
Author: kib Date: Thu May 18 13:49:53 2017 New Revision: 318450 URL: https://svnweb.freebsd.org/changeset/base/318450 Log: Add tests for some cases in r318298. The first test triggers the out of bounds read of the 'left' array. It only fails when realpath.c is compiled with '-fsanitize=ad

Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk

2017-05-21 Thread Konstantin Belousov
On Sun, May 21, 2017 at 05:07:12PM +, Dimitry Andric wrote: > Author: dim > Date: Sun May 21 17:07:12 2017 > New Revision: 318594 > URL: https://svnweb.freebsd.org/changeset/base/318594 > > Log: > Add libc++experimental.a for std::experimental support > > This adds a separate library fo

Re: svn commit: r318594 - in head: lib lib/libc++experimental tools/build/mk

2017-05-21 Thread Konstantin Belousov
On Sun, May 21, 2017 at 08:34:31PM +0200, Dimitry Andric wrote: > On 21 May 2017, at 20:00, Konstantin Belousov wrote: > > > > On Sun, May 21, 2017 at 05:07:12PM +, Dimitry Andric wrote: > >> Author: dim > >> Date: Sun May 21 17:07:12 2017 > >

Re: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi

2017-05-22 Thread Konstantin Belousov
On Wed, May 17, 2017 at 09:33:37PM +, Stephen McConnell wrote: > Author: slm > Date: Wed May 17 21:33:37 2017 > New Revision: 318427 > URL: https://svnweb.freebsd.org/changeset/base/318427 > > Log: > Add tri-mode support (SAS/SATA/PCIe). > > This includes NVMe device support and adds su

Re: svn commit: r318721 - head/lib/libc/sys

2017-05-23 Thread Konstantin Belousov
On Tue, May 23, 2017 at 07:46:11AM +, Ngie Cooper wrote: > Author: ngie > Date: Tue May 23 07:46:10 2017 > New Revision: 318721 > URL: https://svnweb.freebsd.org/changeset/base/318721 > > Log: > kill(2): add missing section for sysctl(9) > > Reported by:make manlint > MFC afte

svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi...

2017-05-23 Thread Konstantin Belousov
(antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision

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

2017-05-23 Thread Konstantin Belousov
Author: kib Date: Tue May 23 09:30:42 2017 New Revision: 318737 URL: https://svnweb.freebsd.org/changeset/base/318737 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/c

svn commit: r318739 - head/libexec/rtld-elf

2017-05-23 Thread Konstantin Belousov
Author: kib Date: Tue May 23 10:00:52 2017 New Revision: 318739 URL: https://svnweb.freebsd.org/changeset/base/318739 Log: For ld.so direct execution mode, implement -p option: search for the binary in $PATH. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revi

svn commit: r318744 - head/sys/arm64/conf

2017-05-23 Thread Konstantin Belousov
Author: kib Date: Tue May 23 13:57:55 2017 New Revision: 318744 URL: https://svnweb.freebsd.org/changeset/base/318744 Log: Add COMPAT_FREEBSD11 on arm64, the arch is almost tier-1. Discussed with: andrew, emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/G

Re: svn commit: r318757 - head

2017-05-24 Thread Konstantin Belousov
On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > My PostgreSQL buildfarm animal BROKE with this change until I force rebuilt > lang/perl5.24 > and all my p5-* ports. So what was the symptoms and the error, exactly ? A lot of efforts were spent to ensure that _consistent_ set of o

svn commit: r318780 - in head: include sys/sys

2017-05-24 Thread Konstantin Belousov
Author: kib Date: Wed May 24 09:25:13 2017 New Revision: 318780 URL: https://svnweb.freebsd.org/changeset/base/318780 Log: Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE. The Termios headers and used sometimes _POSIX_SOURCE directly to determine if a thing should b

svn commit: r318781 - in head: share/man/man9 sys/sys

2017-05-24 Thread Konstantin Belousov
Author: kib Date: Wed May 24 10:09:54 2017 New Revision: 318781 URL: https://svnweb.freebsd.org/changeset/base/318781 Log: Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2(). Submitted by: Sebastian Huber MFC after:2 weeks Modified: head/share/man/man9/bitset.9 hea

Re: svn commit: r318757 - head

2017-05-24 Thread Konstantin Belousov
-Mail: l...@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > > > > On 5/24/17, 4:05 AM, "Konstantin Belousov" wrote: > > On Tue, May 23, 2017 at 04:46:14PM -0500, Larry Rosenman wrote: > > My PostgreSQL buildfarm animal BROKE w

svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys

2017-05-27 Thread Konstantin Belousov
Author: kib Date: Sat May 27 17:00:30 2017 New Revision: 318997 URL: https://svnweb.freebsd.org/changeset/base/318997 Log: Use whole mnt_stat.f_fsid bits for st_dev. Since ino64 expanded dev_t to 64bit, make VOP_GETATTR(9) provide all bits of mnt_stat.f_fsid as va_fsid for vnodes on files

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

2017-05-28 Thread Konstantin Belousov
Author: kib Date: Sun May 28 09:29:53 2017 New Revision: 319064 URL: https://svnweb.freebsd.org/changeset/base/319064 Log: Update getdirentries(2) page for new struct dirent layout. Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/sys/getdirentries.2 Modified: head/lib/libc/

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

2017-05-28 Thread Konstantin Belousov
Author: kib Date: Sun May 28 21:42:47 2017 New Revision: 319086 URL: https://svnweb.freebsd.org/changeset/base/319086 Log: Mention that the basep argument to getdirentries(2) can be NULL. Noted by: dim Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after:3 days

svn commit: r319137 - head/libexec/rtld-elf

2017-05-29 Thread Konstantin Belousov
Author: kib Date: Mon May 29 13:36:32 2017 New Revision: 319137 URL: https://svnweb.freebsd.org/changeset/base/319137 Log: Correct explanation of the dynamic tokens handling. Reviewed by: emaste, jonathan Sponsored by: The FreeBSD Foundation X-Differential Revision: https://review

svn commit: r319138 - head/libexec/rtld-elf

2017-05-29 Thread Konstantin Belousov
Author: kib Date: Mon May 29 13:38:26 2017 New Revision: 319138 URL: https://svnweb.freebsd.org/changeset/base/319138 Log: Document direct execution mode for rtld. Reviewed by: emaste, jonathan (previous version) Sponsored by: The FreeBSD Foundation MFC after:3 days Differential

Re: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys

2017-05-30 Thread Konstantin Belousov
On Sun, May 28, 2017 at 06:48:38AM -0700, John Baldwin wrote: > On Saturday, May 27, 2017 05:00:30 PM Konstantin Belousov wrote: > > */ > > - if (vp->v_mount->mnt_stat.f_fsid.val[0] != > > - (uint32_t)np->n_vattr.na_filesid[0

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

2017-05-30 Thread Konstantin Belousov
Author: kib Date: Tue May 30 21:20:54 2017 New Revision: 319253 URL: https://svnweb.freebsd.org/changeset/base/319253 Log: Fix bug in r318997: remove the line which overrides vn_fsid() calculation. Noted by: jhb Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation Modified

svn commit: r319518 - head/sys/kern

2017-06-03 Thread Konstantin Belousov
Author: kib Date: Sat Jun 3 14:12:17 2017 New Revision: 319518 URL: https://svnweb.freebsd.org/changeset/base/319518 Log: Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. Reported and tested by: pho Sponsored by: The FreeBSD Foundatio

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

2017-06-03 Thread Konstantin Belousov
Author: kib Date: Sat Jun 3 14:15:14 2017 New Revision: 319519 URL: https://svnweb.freebsd.org/changeset/base/319519 Log: Clean possible td_su reference on the struct mount being unmounted as the last step of ffs_unmount(). It is possible that the mount point is recorded for cleanup in A

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

2017-06-03 Thread Konstantin Belousov
Author: kib Date: Sat Jun 3 16:18:50 2017 New Revision: 319539 URL: https://svnweb.freebsd.org/changeset/base/319539 Log: Mitigate several problems with the softdep_request_cleanup() on busy host. Problems start appearing when there are several threads all doing operations on a UFS vol

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

2017-06-05 Thread Konstantin Belousov
Author: kib Date: Mon Jun 5 11:40:30 2017 New Revision: 319600 URL: https://svnweb.freebsd.org/changeset/base/319600 Log: Add sysctl vfs.ino64_trunc_error controlling action on truncating inode number or link count for the ABI compat binaries. Right now, and by default after the change,

Re: svn commit: r316311 - in head: lib/libstand sys/boot/geli sys/boot/i386/gptboot sys/boot/i386/loader sys/boot/i386/zfsboot

2017-06-06 Thread Konstantin Belousov
On Tue, Jun 06, 2017 at 03:51:26PM +0200, Hans Petter Selasky wrote: > On 03/31/17 02:04, Allan Jude wrote: > > Author: allanjude > > Date: Fri Mar 31 00:04:32 2017 > > New Revision: 316311 > > URL: https://svnweb.freebsd.org/changeset/base/316311 > > > > > > > > Modified: head/sys/boot/i386/zf

<    1   2   3   4   5   6   7   8   9   10   >