svn commit: r333576 - in head/sys: kern sys ufs/ffs

2018-05-13 Thread Konstantin Belousov
Author: kib Date: Sun May 13 09:47:28 2018 New Revision: 333576 URL: https://svnweb.freebsd.org/changeset/base/333576 Log: Detect and optimize reads from the hole on UFS. - Create getblkx(9) variant of getblk(9) which can return error. - Add GB_NOSPARSE flag for getblk()/getblkx() which r

svn commit: r333577 - in head: include lib/libc/softfloat/bits64 lib/msun lib/msun/man lib/msun/src

2018-05-13 Thread Konstantin Belousov
Author: kib Date: Sun May 13 09:54:34 2018 New Revision: 333577 URL: https://svnweb.freebsd.org/changeset/base/333577 Log: Add implementations for clog(3), clogf(3), and clog(3). PR: 216863 Submitted by: bde, Steven G. Kargl MFC after:2 weeks Added: head/lib/msun/man/clog.3

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

2018-05-13 Thread Konstantin Belousov
Author: kib Date: Sun May 13 20:10:02 2018 New Revision: 333587 URL: https://svnweb.freebsd.org/changeset/base/333587 Log: Fix PMC_IN_TRAP_HANDLER() for i386 after the 4/4 split. Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/include/pmc_mdep.h Modified: head/sys/i386/incl

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

2018-05-14 Thread Konstantin Belousov
On Mon, May 14, 2018 at 12:56:33AM +, Matt Macy wrote: > Author: mmacy > Date: Mon May 14 00:56:33 2018 > New Revision: 333597 > URL: https://svnweb.freebsd.org/changeset/base/333597 > > Log: > pmc: fix buildworld > > hid ck_queue.h from user > > Approved by:sbruno > > Mod

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

2018-05-19 Thread Konstantin Belousov
On Sat, May 19, 2018 at 04:07:00AM +, Matt Macy wrote: > Author: mmacy > Date: Sat May 19 04:07:00 2018 > New Revision: 333840 > URL: https://svnweb.freebsd.org/changeset/base/333840 > > Log: > filt_timerdetach: only assign to old if we're going to check it in > a KASSERT You also removed

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

2018-05-19 Thread Konstantin Belousov
On Sat, May 19, 2018 at 12:22:48PM +0200, Hans Petter Selasky wrote: > On 05/19/18 06:13, Matt Macy wrote: > > va_start(ap, fmt); > > - res = make_dev_credv(0, &dev, devsw, unit, cr, uid, gid, mode, fmt, ap); > > + DBGSET(res, make_dev_credv(0, &dev, devsw, unit, cr, uid, gid, mode, > > fm

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

2018-05-19 Thread Konstantin Belousov
Author: kib Date: Sat May 19 20:26:33 2018 New Revision: 333891 URL: https://svnweb.freebsd.org/changeset/base/333891 Log: Fix IBRS handling around MWAIT. The intent was to disable IBPB and IBRS around MWAIT, and re-enable on the sleep end. Reviewed by: emaste Sponsored by: The Fr

svn commit: r333892 - head/sys/x86/xen

2018-05-19 Thread Konstantin Belousov
Author: kib Date: Sat May 19 20:28:59 2018 New Revision: 333892 URL: https://svnweb.freebsd.org/changeset/base/333892 Log: Fix PCID+PTI pmap operations on Xen/HVM. Install appropriate pti-aware shootdown IPI handlers, otherwise user page tables do not get enough invalidations. The non-pt

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

2018-05-19 Thread Konstantin Belousov
Author: kib Date: Sat May 19 21:36:55 2018 New Revision: 333896 URL: https://svnweb.freebsd.org/changeset/base/333896 Log: Style. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c ===

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

2018-05-21 Thread Konstantin Belousov
Author: kib Date: Mon May 21 18:41:16 2018 New Revision: 333990 URL: https://svnweb.freebsd.org/changeset/base/333990 Log: Add missed barrier for pm_gen/pm_active interaction. When we issue shootdown IPIs, we first assign zero to pm_gens to indicate the need to flush on the next context s

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

2018-05-21 Thread Konstantin Belousov
Author: kib Date: Mon May 21 19:15:05 2018 New Revision: 333992 URL: https://svnweb.freebsd.org/changeset/base/333992 Log: Fix grammar. Submitted by: alc MFC after:1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ==

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

2018-05-21 Thread Konstantin Belousov
Author: kib Date: Mon May 21 21:05:55 2018 New Revision: 334003 URL: https://svnweb.freebsd.org/changeset/base/334003 Log: Preserve other bits in IA32_SPEC_CTL MSR when changing the IBRS and STIBP states. Tested by:emaste (previous version) Sponsored by: The FreeBSD Foundation MFC

svn commit: r334004 - in head/sys/x86: include x86

2018-05-21 Thread Konstantin Belousov
Author: kib Date: Mon May 21 21:07:13 2018 New Revision: 334004 URL: https://svnweb.freebsd.org/changeset/base/334004 Log: Add definition for Intel Speculative Store Bypass Disable MSR bits Security: CVE-2018-3639 Sponsored by: The FreeBSD Foundation MFC after:3 days Modified:

svn commit: r334005 - in head/sys: amd64/amd64 amd64/include dev/cpuctl x86/acpica x86/include x86/x86

2018-05-21 Thread Konstantin Belousov
Author: kib Date: Mon May 21 21:08:19 2018 New Revision: 334005 URL: https://svnweb.freebsd.org/changeset/base/334005 Log: Add Intel Spec Store Bypass Disable control. Speculative Store Bypass (SSB) is a speculative execution side channel vulnerability identified by Jann Horn of Google Pr

svn commit: r334031 - head/lib/libc/stdio

2018-05-22 Thread Konstantin Belousov
Author: kib Date: Tue May 22 11:05:40 2018 New Revision: 334031 URL: https://svnweb.freebsd.org/changeset/base/334031 Log: Implement printf(3) family %m format string extension. Reviewed by: ed, dim (code only) Sponsored by: Mellanox Technologies MFC after:1 week Modified: head/

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

2018-05-22 Thread Konstantin Belousov
Author: kib Date: Tue May 22 13:25:15 2018 New Revision: 334038 URL: https://svnweb.freebsd.org/changeset/base/334038 Log: Enable IBRS when entering an interrupt handler from usermode. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/include/asmacros.h

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

2018-05-22 Thread Konstantin Belousov
Author: kib Date: Tue May 22 13:30:56 2018 New Revision: 334040 URL: https://svnweb.freebsd.org/changeset/base/334040 Log: Fix double-load of %cr3 and double-copy of the stack frame for the kernel entry from userspace vm86. Sponsored by: The FreeBSD Foundation MFC after:1 week Modi

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

2018-05-22 Thread Konstantin Belousov
Author: kib Date: Tue May 22 13:45:40 2018 New Revision: 334042 URL: https://svnweb.freebsd.org/changeset/base/334042 Log: Use local unique labels inside most often used macros. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/i38

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

2018-05-22 Thread Konstantin Belousov
Author: kib Date: Tue May 22 20:50:19 2018 New Revision: 334064 URL: https://svnweb.freebsd.org/changeset/base/334064 Log: Fix UP build. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cp

svn commit: r334103 - in head/sys/i386: i386 include

2018-05-23 Thread Konstantin Belousov
Author: kib Date: Wed May 23 16:31:46 2018 New Revision: 334103 URL: https://svnweb.freebsd.org/changeset/base/334103 Log: Support IBRS for i386. Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D1552

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

2018-05-23 Thread Konstantin Belousov
Author: kib Date: Wed May 23 17:55:30 2018 New Revision: 334111 URL: https://svnweb.freebsd.org/changeset/base/334111 Log: Note that PT_SETSTEP is auto-cleared. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after:3 days Differential revision:ht

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

2018-05-23 Thread Konstantin Belousov
Author: kib Date: Wed May 23 21:25:49 2018 New Revision: 334119 URL: https://svnweb.freebsd.org/changeset/base/334119 Log: Style. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after:3 days Differential revision:https://reviews.freebsd.org/D1505

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

2018-05-23 Thread Konstantin Belousov
Author: kib Date: Wed May 23 21:26:41 2018 New Revision: 334121 URL: https://svnweb.freebsd.org/changeset/base/334121 Log: Stop obliterating actual exception type for emulated traps from vm86. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after:1 week

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

2018-05-23 Thread Konstantin Belousov
Author: kib Date: Wed May 23 21:39:29 2018 New Revision: 334122 URL: https://svnweb.freebsd.org/changeset/base/334122 Log: x86: stop unconditionally clearing PSL_T on the trace trap. We certainly should clear PSL_T when calling the SIGTRAP signal handler, which is already done by all x86

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

2018-05-25 Thread Konstantin Belousov
Author: kib Date: Fri May 25 16:24:20 2018 New Revision: 334210 URL: https://svnweb.freebsd.org/changeset/base/334210 Log: Cleanup. Remove unused instruction and label. Tested by:bde Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/swtch.s Modified: head/sys/i386

svn commit: r334211 - in head/sys/i386: i386 include

2018-05-25 Thread Konstantin Belousov
Author: kib Date: Fri May 25 16:29:22 2018 New Revision: 334211 URL: https://svnweb.freebsd.org/changeset/base/334211 Log: Optimize i386 pmap_extract_and_hold(). In particular, stop using pmap_pte() to read non-promoted pte while walking the page table. pmap_pte() needs to shoot down the

Re: svn commit: r334216 - head/usr.sbin/bhyve

2018-05-25 Thread Konstantin Belousov
On Fri, May 25, 2018 at 06:54:40PM +, Marcelo Araujo wrote: > Author: araujo > Date: Fri May 25 18:54:40 2018 > New Revision: 334216 > URL: https://svnweb.freebsd.org/changeset/base/334216 > > Log: > After a long discussion about assert(3), we gonna use a HardenedBSD > approach to chek str

Re: svn commit: r334361 - head/usr.sbin/pmc

2018-05-30 Thread Konstantin Belousov
On Wed, May 30, 2018 at 12:06:17AM +, Matt Macy wrote: > Author: mmacy > Date: Wed May 30 00:06:17 2018 > New Revision: 334361 > URL: https://svnweb.freebsd.org/changeset/base/334361 > > Log: > pmc: don't break build with format issues > > Modified: > head/usr.sbin/pmc/Makefile > > Modif

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

2018-05-30 Thread Konstantin Belousov
Author: kib Date: Wed May 30 20:24:21 2018 New Revision: 334397 URL: https://svnweb.freebsd.org/changeset/base/334397 Log: Avoid unneccessary TLB shootdowns in pmap_unwire_ptp() for user pmaps, which no longer create recursive page table mappings. Benchmarked by: bde Tested by:

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

2018-05-30 Thread Konstantin Belousov
Author: kib Date: Wed May 30 20:26:47 2018 New Revision: 334398 URL: https://svnweb.freebsd.org/changeset/base/334398 Log: Do use pmap_pte_quick() in pmap_enter_quick_locked(). Benchmarked by: bde Tested by:pho Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i3

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

2018-05-30 Thread Konstantin Belousov
Author: kib Date: Wed May 30 20:39:22 2018 New Revision: 334399 URL: https://svnweb.freebsd.org/changeset/base/334399 Log: Restore pmap_copy() for 4/4 i386 pmap. Create yet another temporal pte mapping routine pmap_pte_quick3(), which is the copy of the pmap_pte_quick() and relies on the

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

2018-05-30 Thread Konstantin Belousov
Author: kib Date: Wed May 30 20:43:48 2018 New Revision: 334400 URL: https://svnweb.freebsd.org/changeset/base/334400 Log: Extract code for fast mapping of pte from pmap_extract_and_hold() into the helper function pmap_pte_ufast(). Benchmarked by: bde Tested by:pho Sponsored

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

2018-05-30 Thread Konstantin Belousov
Author: kib Date: Wed May 30 20:47:20 2018 New Revision: 334401 URL: https://svnweb.freebsd.org/changeset/base/334401 Log: Use pmap_pte_ufast() instead of pmap_pte() in pmap_extract(), pmap_is_prefaultable() and pmap_incore(), pushing the number of shootdown IPIs back to the 3/1 kernel.

svn commit: r334507 - head/sys/vm

2018-06-01 Thread Konstantin Belousov
Author: kib Date: Fri Jun 1 23:50:51 2018 New Revision: 334507 URL: https://svnweb.freebsd.org/changeset/base/334507 Log: Only check for MAP_32BIT when available. Reported by: mmacy Sponsored by: The FreeBSD Foundation MFC after:10 days Modified: head/sys/vm/vm_mmap.c Modified

Re: svn commit: r334515 - head/usr.bin/top

2018-06-02 Thread Konstantin Belousov
On Sat, Jun 02, 2018 at 03:31:14AM +, Eitan Adler wrote: > Author: eadler > Date: Sat Jun 2 03:31:14 2018 > New Revision: 334515 > URL: https://svnweb.freebsd.org/changeset/base/334515 > > Log: > top(1): avoid casting malloc > > Modified: > head/usr.bin/top/display.c > head/usr.bin/top

Re: svn commit: r334595 - in head: sys/dev/hwpmc sys/kern sys/sys usr.sbin/pmcstat

2018-06-04 Thread Konstantin Belousov
On Mon, Jun 04, 2018 at 01:10:23AM +, Matt Macy wrote: > @@ -2214,6 +2236,11 @@ pmc_hook_handler(struct thread *td, int function, void > > pmc_capture_user_callchain(PCPU_GET(cpuid), PMC_HR, > (struct trapframe *) arg); > + > + KASSERT(td->td_pinned

Re: svn commit: r334595 - in head: sys/dev/hwpmc sys/kern sys/sys usr.sbin/pmcstat

2018-06-04 Thread Konstantin Belousov
On Mon, Jun 04, 2018 at 03:08:15PM +0300, Konstantin Belousov wrote: > On Mon, Jun 04, 2018 at 01:10:23AM +, Matt Macy wrote: > > @@ -2214,6 +2236,11 @@ pmc_hook_handler(struct thread *td, int function, > > void > > > > pmc_capture_user_callch

Re: svn commit: r334595 - in head: sys/dev/hwpmc sys/kern sys/sys usr.sbin/pmcstat

2018-06-05 Thread Konstantin Belousov
On Mon, Jun 04, 2018 at 10:27:21AM -0700, Matthew Macy wrote: > On Mon, Jun 4, 2018 at 5:08 AM, Konstantin Belousov > wrote: > > On Mon, Jun 04, 2018 at 01:10:23AM +, Matt Macy wrote: > >> @@ -2214,6 +2236,11 @@ pmc_hook_handler(struct thread *td, int

Re: svn commit: r334617 - in head: . etc

2018-06-05 Thread Konstantin Belousov
On Tue, Jun 05, 2018 at 09:24:02AM -0600, Brad Davis wrote: > On Tue, Jun 5, 2018, at 7:00 AM, Alexander Leidinger wrote: > > > > Quoting Brad Davis (from Mon, 04 Jun 2018 12:55:50 > > -0600): > > > > > On Mon, Jun 4, 2018, at 12:47 PM, Rodney W. Grimes wrote: > > >> [ Charset UTF-8 unsupported

Re: svn commit: r334617 - in head: . etc

2018-06-05 Thread Konstantin Belousov
On Tue, Jun 05, 2018 at 12:13:05PM -0600, Brad Davis wrote: > On Tue, Jun 5, 2018, at 10:46 AM, Konstantin Belousov wrote: > > I find it often very useful to do > > (cd src/etc/rc.d && make install) > > Same for defaults and several other directories which in f

Re: svn commit: r334617 - in head: . etc

2018-06-05 Thread Konstantin Belousov
On Wed, Jun 06, 2018 at 01:39:00AM +0700, Eugene Grosbein wrote: > 06.06.2018 1:26, Konstantin Belousov wrote: > > >>> I find it often very useful to do > >>> (cd src/etc/rc.d && make install) > >>> Same for defaults and several other dir

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

2018-06-06 Thread Konstantin Belousov
On Wed, Jun 06, 2018 at 12:57:12PM +, Justin Hibbits wrote: > Author: jhibbits > Date: Wed Jun 6 12:57:11 2018 > New Revision: 334708 > URL: https://svnweb.freebsd.org/changeset/base/334708 > > Log: > Add a memory barrier after taking a reference on the vnode holdcnt in _vhold > > This

Re: svn commit: r334617 - in head: . etc

2018-06-06 Thread Konstantin Belousov
On Wed, Jun 06, 2018 at 02:06:48PM -0600, Ian Lepore wrote: > On Wed, 2018-06-06 at 11:33 -0700, Rodney W. Grimes wrote: > > > > > > > > > On Tue, Jun 5, 2018, at 1:28 PM, Konstantin Belousov wrote: > > > > > > > > On Wed, J

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

2018-06-07 Thread Konstantin Belousov
Author: kib Date: Thu Jun 7 17:04:34 2018 New Revision: 334799 URL: https://svnweb.freebsd.org/changeset/base/334799 Log: Account for dmap limit when selecting the pages for the bootstrap pagetables. physmap[] can be inconsistent with the physical memory limit due to buggy bios, or to

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

2018-06-07 Thread Konstantin Belousov
On Fri, Jun 08, 2018 at 07:03:04AM +0200, Mateusz Guzik wrote: > Part of the problem is lack of primitives like READ_ONCE/WRITE_ONCE as > seen in the linux kernel, someone should hack up equivalents. Only replying to this statement right now. What is the semantic of the _ONCE operations ? Isn't i

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

2018-06-08 Thread Konstantin Belousov
On Thu, Jun 07, 2018 at 11:02:29PM -0700, Ryan Libby wrote: > On Thu, Jun 7, 2018 at 10:03 PM, Mateusz Guzik wrote: > > On Fri, Jun 8, 2018 at 6:29 AM, Ryan Libby wrote: > >> > >> On Thu, Jun 7, 2018 at 8:32 PM, Mark Johnston wrote: > >> > On Wed, Jun 0

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

2018-06-08 Thread Konstantin Belousov
Author: kib Date: Fri Jun 8 18:32:26 2018 New Revision: 334851 URL: https://svnweb.freebsd.org/changeset/base/334851 Log: Restore release semantic for the old thread unlock on arm64. With the introduction of pmap_switch(), the DSB instruction on the address map switch is not necessary ex

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

2018-06-08 Thread Konstantin Belousov
On Fri, Jun 08, 2018 at 02:30:10PM -0400, Mark Johnston wrote: > On Fri, Jun 08, 2018 at 08:37:55PM +0300, Konstantin Belousov wrote: > > On Thu, Jun 07, 2018 at 11:02:29PM -0700, Ryan Libby wrote: > > > On Thu, Jun 7, 2018 at 10:03 PM, Mateusz Guzik wrote: > > > >

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

2018-06-10 Thread Konstantin Belousov
Author: kib Date: Sun Jun 10 17:54:44 2018 New Revision: 334928 URL: https://svnweb.freebsd.org/changeset/base/334928 Log: libc qsort(3): stop aliasing. Qsort swap code aliases the sorted array elements to ints and longs in order to do swap by machine words. Unfortunately this breaks wit

Re: svn commit: r334928 - head/lib/libc/stdlib

2018-06-11 Thread Konstantin Belousov
On Mon, Jun 11, 2018 at 03:48:52PM +1000, Bruce Evans wrote: > Change TYPE to unsigned char[sizeof(old TYPE)] and use memcpy() to assign > the variables to fix this with small churn and without the pessimizations > in this commit. This gives portable code back to K&R1978 + memcpy(), and > is as ef

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

2018-06-11 Thread Konstantin Belousov
Author: kib Date: Mon Jun 11 15:28:20 2018 New Revision: 334952 URL: https://svnweb.freebsd.org/changeset/base/334952 Log: Fix braino in r334799. Maxmem is in pages. Reported by: ae, pho Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sy

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

2018-06-12 Thread Konstantin Belousov
Author: kib Date: Tue Jun 12 10:41:26 2018 New Revision: 334994 URL: https://svnweb.freebsd.org/changeset/base/334994 Log: Fix typo. Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c =

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

2018-06-12 Thread Konstantin Belousov
Author: kib Date: Tue Jun 12 10:43:20 2018 New Revision: 334995 URL: https://svnweb.freebsd.org/changeset/base/334995 Log: All exceptions IDT descriptors must use interrupt gates on 4/4 kernel. Fix it for #MF. Noted by: rlibby Sponsored by: The FreeBSD Foundation Modified: head/s

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

2018-06-13 Thread Konstantin Belousov
Author: kib Date: Wed Jun 13 17:55:09 2018 New Revision: 335072 URL: https://svnweb.freebsd.org/changeset/base/335072 Log: Enable eager FPU context switch by default on amd64. With compilers making increasing use of vector instructions the performance benefit of lazily switching FPU state

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

2018-06-13 Thread Konstantin Belousov
Author: kib Date: Wed Jun 13 21:10:23 2018 New Revision: 335089 URL: https://svnweb.freebsd.org/changeset/base/335089 Log: Enable eager FPU context switch by default on i386 too, based on amd64 r335072. Security: CVE-2018-3665 Sponsored by: The FreeBSD Foundation Modified: head/s

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

2018-06-14 Thread Konstantin Belousov
Author: kib Date: Thu Jun 14 10:33:26 2018 New Revision: 335131 URL: https://svnweb.freebsd.org/changeset/base/335131 Log: Remove printf() in #NM handler. Give up and remove the almost useless informational message reporting that device not available exception occured while our state trac

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

2018-06-14 Thread Konstantin Belousov
Author: kib Date: Thu Jun 14 11:09:51 2018 New Revision: 335132 URL: https://svnweb.freebsd.org/changeset/base/335132 Log: Reorganize code flow in fpudna()/npxdna() to highlight the critical section scope. Sprinkle __predict_false() for conditions known to never occur or occur only on rare

svn commit: r335135 - head/sys/amd64/linux

2018-06-14 Thread Konstantin Belousov
Author: kib Date: Thu Jun 14 12:35:57 2018 New Revision: 335135 URL: https://svnweb.freebsd.org/changeset/base/335135 Log: linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN. This fixes the %r10 content for rt_sigreturn. Submitted by: Yanko Yankulov MFC afte

svn commit: r335171 - head/sys/vm

2018-06-14 Thread Konstantin Belousov
Author: kib Date: Thu Jun 14 19:41:02 2018 New Revision: 335171 URL: https://svnweb.freebsd.org/changeset/base/335171 Log: Handle the race between fork/vm_object_split() and faults. If fault started before vmspace_fork() locked the map, and then during fork, vm_map_copy_entry()->vm_object

Re: svn commit: r335171 - head/sys/vm

2018-06-14 Thread Konstantin Belousov
On Thu, Jun 14, 2018 at 07:41:02PM +, Konstantin Belousov wrote: > Author: kib > Date: Thu Jun 14 19:41:02 2018 > New Revision: 335171 > URL: https://svnweb.freebsd.org/changeset/base/335171 > > Log: > Handle the race between fork/vm_object_split() and faults. >

Re: svn commit: r335171 - head/sys/vm

2018-06-15 Thread Konstantin Belousov
On Fri, Jun 15, 2018 at 11:03:06AM +0100, Steven Hartland wrote: > On 15/06/2018 00:07, Alan Cox wrote: > > > >> On Jun 14, 2018, at 5:54 PM, Steven Hartland > >> >> > wrote: > >> > >> Out of interest, how would this exhibit itself? > >> > > > > A panic in

svn commit: r335199 - head/sys/compat/linprocfs

2018-06-15 Thread Konstantin Belousov
Author: kib Date: Fri Jun 15 13:56:58 2018 New Revision: 335199 URL: https://svnweb.freebsd.org/changeset/base/335199 Log: linprocfs: add TracerPid to /proc/pid/status. Also fix the value of parent pid if the process is traced. Submitted by: Yanko Yankulov MFC after:1 week Modifie

svn commit: r335253 - in head: . contrib/ofed contrib/ofed/include contrib/ofed/infiniband-diags/build contrib/ofed/libcxgb4 contrib/ofed/libibcm contrib/ofed/libibmad contrib/ofed/libibnetdisc con...

2018-06-16 Thread Konstantin Belousov
Author: kib Date: Sat Jun 16 15:05:05 2018 New Revision: 335253 URL: https://svnweb.freebsd.org/changeset/base/335253 Log: Rework ofed build. Aligns the build with the FreeBSD traditional approach to not build in contrib/, and to track inter-dependencies between libraries. With help

svn commit: r335257 - in head: lib/libthr/arch/common sys/dev/cm sys/dev/pdq sys/modules/arcnet sys/modules/cm sys/modules/libmbpool sys/modules/vxge sys/ofed/drivers/infiniband/debug

2018-06-16 Thread Konstantin Belousov
Author: kib Date: Sat Jun 16 16:16:24 2018 New Revision: 335257 URL: https://svnweb.freebsd.org/changeset/base/335257 Log: Remove some empty directories Deleted: head/lib/libthr/arch/common/ head/sys/dev/cm/ head/sys/dev/pdq/ head/sys/modules/arcnet/ head/sys/modules/cm/ head/sys/mo

svn commit: r335258 - head/lib/libthr/support

2018-06-16 Thread Konstantin Belousov
Author: kib Date: Sat Jun 16 17:11:23 2018 New Revision: 335258 URL: https://svnweb.freebsd.org/changeset/base/335258 Log: Remove unused file. The thr_new(2) syscall is called through libc stub. r154212 stopped generating it for libthr but did not cleaned the unused remnants. Sponso

Re: svn commit: r335276 - in head/stand/i386: gptboot zfsboot

2018-06-20 Thread Konstantin Belousov
On Tue, Jun 19, 2018 at 08:34:18PM -0400, Allan Jude wrote: > On 2018-06-17 07:32, Eugene Grosbein wrote: > > 17.06.2018 10:18, Allan Jude wrote: > > > >> Author: allanjude > >> Date: Sun Jun 17 03:18:56 2018 > >> New Revision: 335276 > >> URL: https://svnweb.freebsd.org/changeset/base/335276 > >>

Re: svn commit: r335276 - in head/stand/i386: gptboot zfsboot

2018-06-20 Thread Konstantin Belousov
On Wed, Jun 20, 2018 at 09:43:31AM -0600, Ian Lepore wrote: > On Wed, 2018-06-20 at 12:22 +0300, Konstantin Belousov wrote: > > On Tue, Jun 19, 2018 at 08:34:18PM -0400, Allan Jude wrote: > > > > > > On 2018-06-17 07:32, Eugene Grosbein wrote: > > > > >

Re: svn commit: r335276 - in head/stand/i386: gptboot zfsboot

2018-06-20 Thread Konstantin Belousov
On Wed, Jun 20, 2018 at 10:05:16AM -0600, Warner Losh wrote: > On Wed, Jun 20, 2018 at 10:03 AM, Konstantin Belousov > wrote: > > > On Wed, Jun 20, 2018 at 09:43:31AM -0600, Ian Lepore wrote: > > > On Wed, 2018-06-20 at 12:22 +0300, Konstantin Belousov wrote: > >

Re: svn commit: r335456 - head/share/man/man7

2018-06-20 Thread Konstantin Belousov
On Wed, Jun 20, 2018 at 07:16:51PM +, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Jun 20 19:16:51 2018 > New Revision: 335456 > URL: https://svnweb.freebsd.org/changeset/base/335456 > > Log: > Improve wording. > > MFC after: 2 weeks > > Modified: > head/share/man/man7

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

2018-06-21 Thread Konstantin Belousov
Author: kib Date: Thu Jun 21 21:07:25 2018 New Revision: 335503 URL: https://svnweb.freebsd.org/changeset/base/335503 Log: Update proc->p_ptevents annotation to reflect the actual locking. Submitted by: Yanko Yankulov Reviewed by: jhb MFC after:1 week Differential revision:

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

2018-06-21 Thread Konstantin Belousov
Author: kib Date: Thu Jun 21 21:12:49 2018 New Revision: 335504 URL: https://svnweb.freebsd.org/changeset/base/335504 Log: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED. An RFSTOPPED thread can't clean TDB_STOPATFORK, which is done in the fork_return() in its context, so parent

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

2018-06-21 Thread Konstantin Belousov
Author: kib Date: Thu Jun 21 21:15:04 2018 New Revision: 335505 URL: https://svnweb.freebsd.org/changeset/base/335505 Log: linux_clone_thread: mark new thread as TDB_BORN. So that the ptrace code will catch it and report it to attached debugger. Enables debugging of threaded Linux binari

svn commit: r326311 - in head/sys: amd64/amd64 arm64/arm64

2017-11-28 Thread Konstantin Belousov
Author: kib Date: Tue Nov 28 09:34:43 2017 New Revision: 326311 URL: https://svnweb.freebsd.org/changeset/base/326311 Log: Fix index calculation for the page table pages for efirt 1:1 map. Stop issuing pre-assigned number to enumerate all page table pages, the assignment is incorrect. In

svn commit: r326363 - in head/sys/dev/mlx5: . mlx5_en

2017-11-29 Thread Konstantin Belousov
Author: kib Date: Wed Nov 29 10:04:11 2017 New Revision: 326363 URL: https://svnweb.freebsd.org/changeset/base/326363 Log: Implement hardware mlx5(4) rx timestamps. Driver support is only provided for ConnectX4/5. System-time timestamp is calculated based on the free-running counter

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

2017-11-29 Thread Konstantin Belousov
On Wed, Nov 29, 2017 at 04:33:50PM +0100, Hans Petter Selasky wrote: > Hi Nathan, > > The chunk below causes sched_pin() to stop working and should be removed > from your commit ??!! > > It probably explains the hangs seen recently reported by various brave > people running 12-current :-) > >

Re: svn commit: r326408 - in head: lib/libfetch sbin/recoverdisk share/examples/BSD_daemon share/examples/libusb20 sys/dev/led sys/dev/md sys/dev/mn sys/dev/ppbus sys/i386/i386 sys/kern sys/sys sys/x8

2017-11-30 Thread Konstantin Belousov
On Thu, Nov 30, 2017 at 08:33:45PM +, Pedro F. Giffuni wrote: > head/usr.sbin/ctm/ctm/ctm.c > head/usr.sbin/ctm/ctm/ctm_ed.c > head/usr.sbin/ctm/ctm/ctm_input.c > head/usr.sbin/ctm/ctm/ctm_pass1.c > head/usr.sbin/ctm/ctm/ctm_pass2.c > head/usr.sbin/ctm/ctm/ctm_pass3.c > head/usr.s

svn commit: r326424 - head/sys/vm

2017-12-01 Thread Konstantin Belousov
Author: kib Date: Fri Dec 1 10:53:08 2017 New Revision: 326424 URL: https://svnweb.freebsd.org/changeset/base/326424 Log: Add comment for vm_map_find_min(). Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after:3 days X-Differential revision: https://reviews.freeb

svn commit: r326429 - head/sys/kern

2017-12-01 Thread Konstantin Belousov
Author: kib Date: Fri Dec 1 11:18:19 2017 New Revision: 326429 URL: https://svnweb.freebsd.org/changeset/base/326429 Log: Destroy seltd st_mtx and st_wait in seltdfini(). A correct destruction is important for WITNESS(4) and LOCK_PROFILING(9). Submitted by: Sebastian Huber MFC afte

svn commit: r326436 - head/usr.bin/vmstat

2017-12-01 Thread Konstantin Belousov
Author: kib Date: Fri Dec 1 22:38:28 2017 New Revision: 326436 URL: https://svnweb.freebsd.org/changeset/base/326436 Log: vmstat: fix style(9) violations and bump WARNS. Based on the patch by:Pawel Biernacki Sponsored by: Mysterious Code Ltd. (Pawel), The FreeBSD Found

Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee

2017-12-05 Thread Konstantin Belousov
On Tue, Dec 05, 2017 at 03:55:10AM +, Eitan Adler wrote: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete,

Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee

2017-12-05 Thread Konstantin Belousov
On Tue, Dec 05, 2017 at 02:00:00PM +0100, Hans Petter Selasky wrote: > On 12/05/17 13:58, Rodney W. Grimes wrote: > > Further more, why does freebsd need this in base? > > Hi, > > I think this is useful. It could replace the "-i " (intermediate) option > for "sed" for example. It avoids creating

svn commit: r326657 - head/sys/ufs/ufs

2017-12-07 Thread Konstantin Belousov
Author: kib Date: Thu Dec 7 09:05:34 2017 New Revision: 326657 URL: https://svnweb.freebsd.org/changeset/base/326657 Log: Fix livelock in ufsdirhash_create(). When more than one thread enters ufsdirhash_create() for the same directory and the inode dirhash is instantiated, but the dirhas

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-11 Thread Konstantin Belousov
On Mon, Dec 11, 2017 at 04:32:37AM +, Conrad Meyer wrote: > Author: cem > Date: Mon Dec 11 04:32:37 2017 > New Revision: 326758 > URL: https://svnweb.freebsd.org/changeset/base/326758 > > Log: > i386: Bump KSTACK_PAGES default to match amd64 i386 is not amd64, the change is wrong. i386 has

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-11 Thread Konstantin Belousov
On Mon, Dec 11, 2017 at 05:26:12PM +0700, Eugene Grosbein wrote: > On 11.12.2017 16:19, Konstantin Belousov wrote: > > On Mon, Dec 11, 2017 at 04:32:37AM +, Conrad Meyer wrote: > >> Author: cem > >> Date: Mon Dec 11 04:32:37 2017 > >> New Revision: 326758

svn commit: r326764 - head/contrib/ofed/librdmacm

2017-12-11 Thread Konstantin Belousov
Author: kib Date: Mon Dec 11 11:57:46 2017 New Revision: 326764 URL: https://svnweb.freebsd.org/changeset/base/326764 Log: ofed: Remove duplicated symbols from the version file. ld.bfd accepts multiple listing of the same symbol in the version script. lld is stricter and errors out. Sinc

svn commit: r326765 - head/contrib/ofed/include

2017-12-11 Thread Konstantin Belousov
Author: kib Date: Mon Dec 11 11:59:45 2017 New Revision: 326765 URL: https://svnweb.freebsd.org/changeset/base/326765 Log: ofed: Define barriers for mips and arm. I used the strongest barriers available on the architectures, so if the future analysis show that it is excessive, the barrier

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-11 Thread Konstantin Belousov
On Mon, Dec 11, 2017 at 06:03:36PM +0700, Eugene Grosbein wrote: > I do not try to contradict other usage patterns. In fact, I'm eager to know > a practical example of such pattern: a task, an application, anything real? Plain workstation use, like X11+browser+editor+some other programs easily allo

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-11 Thread Konstantin Belousov
On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > The current comment about a pcb, I thought that code was changed > so we only put the pointer to a pcb on the stack. pcb is on top of the stack, followed by the userspace FPU registers save area. I do not see any sense in existen

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-11 Thread Konstantin Belousov
On Mon, Dec 11, 2017 at 07:33:08AM -0800, Rodney W. Grimes wrote: > > On Mon, Dec 11, 2017 at 07:09:10AM -0800, Rodney W. Grimes wrote: > > > The current comment about a pcb, I thought that code was changed > > > so we only put the pointer to a pcb on the stack. > > > > pcb is on top of the stack,

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-14 Thread Konstantin Belousov
On Thu, Dec 14, 2017 at 06:34:21PM +0700, Eugene Grosbein wrote: > On 13.12.2017 04:55, John Baldwin wrote: > > On 12/12/17 3:09 PM, Eugene Grosbein wrote: > >> On 13.12.2017 02:32, John Baldwin wrote: > >> > >>> Certainly for MIPS I have found that compiling with clang > >>> instead of gcc for mip

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-14 Thread Konstantin Belousov
On Thu, Dec 14, 2017 at 07:04:57PM +0700, Eugene Grosbein wrote: > On 14.12.2017 18:51, Konstantin Belousov wrote: > > >> I think thats's NFS code who is guilty. You can see example of amd64 > >> (sic!) kstack exhaustion > >> due to 40+ frames

svn commit: r326851 - head/sys/fs/devfs

2017-12-14 Thread Konstantin Belousov
Author: kib Date: Thu Dec 14 13:41:11 2017 New Revision: 326851 URL: https://svnweb.freebsd.org/changeset/base/326851 Log: In devfs_lookupx() dotdot lookup case, avoid dereferencing dvp->v_mount after dvp is unlocked. The vnode might be reclaimed after unlock, so v_mount becomes NULL. C

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-14 Thread Konstantin Belousov
On Thu, Dec 14, 2017 at 07:59:03PM +0700, Eugene Grosbein wrote: > On 14.12.2017 19:26, Konstantin Belousov wrote: > > > Sigh. This would make i386 even less usable for everybody, perhaps > > except you. Because default 3G of UVA is too small for some common tasks > > (th

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-14 Thread Konstantin Belousov
On Thu, Dec 14, 2017 at 10:39:18PM +0700, Eugene Grosbein wrote: > On 14.12.2017 22:23, Konstantin Belousov wrote: > > >>> Sigh. This would make i386 even less usable for everybody, perhaps > >>> except you. Because default 3G of UVA is too small for some common

svn commit: r326971 - in head/sys: amd64/include arm/include arm64/include i386/include mips/include powerpc/include riscv/include sparc64/include sys

2017-12-19 Thread Konstantin Belousov
se-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 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 + *

svn commit: r326973 - head/sys/kern

2017-12-19 Thread Konstantin Belousov
Author: kib Date: Tue Dec 19 10:05:45 2017 New Revision: 326973 URL: https://svnweb.freebsd.org/changeset/base/326973 Log: Use atomic_load(9) to read ppsinfo sequence numbers. In this case volatile qualifiers enusre that a compiler does not optimize the accesses out. Reviewed by: al

svn commit: r326974 - head/sys/vm

2017-12-19 Thread Konstantin Belousov
Author: kib Date: Tue Dec 19 10:06:55 2017 New Revision: 326974 URL: https://svnweb.freebsd.org/changeset/base/326974 Log: Perform all accesses to uma_reclaim_needed using atomic(9) KPI. Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revi

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

2017-12-19 Thread Konstantin Belousov
Author: kib Date: Tue Dec 19 14:11:41 2017 New Revision: 326977 URL: https://svnweb.freebsd.org/changeset/base/326977 Log: mlx5en: Avoid SFENCe on x86 The IA32 memory model guarantees that all writes are seen in the program order. Also, any access to the uncacheable memory flushes the st

Re: svn commit: r327053 - head/sys/sparc64/include

2017-12-21 Thread Konstantin Belousov
On Thu, Dec 21, 2017 at 01:27:33AM +, Marius Strobl wrote: > Author: marius > Date: Thu Dec 21 01:27:32 2017 > New Revision: 327053 > URL: https://svnweb.freebsd.org/changeset/base/327053 > > Log: > Remove MD atomic_load_{32,64,int,long,ptr}(9) obsolete since the addition > of (conflicting

svn commit: r327072 - head/sys/net

2017-12-21 Thread Konstantin Belousov
Author: kib Date: Thu Dec 21 23:05:13 2017 New Revision: 327072 URL: https://svnweb.freebsd.org/changeset/base/327072 Log: Fix build for kernels with SCHED_4BSD. Sponsored by: The FreeBSD Foundation Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ==

  1   2   3   4   5   6   7   8   9   10   >