svn commit: r313734 - head/sys/sys

2017-02-14 Thread Konstantin Belousov
Author: kib Date: Tue Feb 14 17:44:30 2017 New Revision: 313734 URL: https://svnweb.freebsd.org/changeset/base/313734 Log: Add RLIM_SAVED_MAX and RLIM_SAVED_CUR symbols. Define them as RLIM_INFINITY. This is allowed by POSIX in case all resource limits are representable in an object of

svn commit: r313690 - in head: lib/libc/sys sys/kern sys/vm

2017-02-12 Thread Konstantin Belousov
Author: kib Date: Sun Feb 12 21:05:44 2017 New Revision: 313690 URL: https://svnweb.freebsd.org/changeset/base/313690 Log: Consistently handle negative or wrapping offsets in the mmap(2) syscalls. For regular files and posix shared memory, POSIX requires that [offset, offset + size)

svn commit: r313688 - head/sys/kern

2017-02-12 Thread Konstantin Belousov
Author: kib Date: Sun Feb 12 20:54:31 2017 New Revision: 313688 URL: https://svnweb.freebsd.org/changeset/base/313688 Log: Switch copyout_map() to use vm_mmap_object() instead of vm_mmap(). This is both a microoptimization and a move of the consumer to more commonly used vm function.

svn commit: r313693 - head/sys/vm

2017-02-12 Thread Konstantin Belousov
Author: kib Date: Mon Feb 13 00:40:55 2017 New Revision: 313693 URL: https://svnweb.freebsd.org/changeset/base/313693 Log: Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers. Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after:1 week Modified:

svn commit: r313692 - head/sys/compat/freebsd32

2017-02-12 Thread Konstantin Belousov
Author: kib Date: Mon Feb 13 00:39:43 2017 New Revision: 313692 URL: https://svnweb.freebsd.org/changeset/base/313692 Log: Style: wrap long line. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified:

svn commit: r313696 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys vm

2017-02-13 Thread Konstantin Belousov
Author: kib Date: Mon Feb 13 09:04:38 2017 New Revision: 313696 URL: https://svnweb.freebsd.org/changeset/base/313696 Log: Rework r313352. Rename kern_vm_* functions to kern_*. Move the prototypes to syscallsubr.h. Also change Mach VM types to uintptr_t/size_t as needed, to avoid

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

2017-02-10 Thread Konstantin Belousov
Author: kib Date: Fri Feb 10 14:49:04 2017 New Revision: 313549 URL: https://svnweb.freebsd.org/changeset/base/313549 Log: Fix r313495. The file type DTYPE_VNODE can be assigned as a fallback if VOP_OPEN() did not initialized file type. This is a typical code path used by normal file

Re: svn commit: r312694 - in head: sys/cam/ctl usr.sbin/ctladm

2017-01-24 Thread Konstantin Belousov
On Tue, Jan 24, 2017 at 12:13:41PM +, Alexander Motin wrote: > Author: mav > Date: Tue Jan 24 12:13:41 2017 > New Revision: 312694 > URL: https://svnweb.freebsd.org/changeset/base/312694 > > Log: > Make CTL ramdisk backend a real RAM disk. > > If "capacity" LU option is set, ramdisk

svn commit: r312409 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 14:27:37 2017 New Revision: 312409 URL: https://svnweb.freebsd.org/changeset/base/312409 Log: Style fixes and comment updates. Edit comments which explain no longer relevant details, and add locking annotations to the struct tmpfs_node members. Tested

svn commit: r312410 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 14:49:55 2017 New Revision: 312410 URL: https://svnweb.freebsd.org/changeset/base/312410 Log: Rework some tmpfs lock assertions. Remove TMPFS_ASSERT_ELOCKED(). Its claims are already stated by other asserts nearby and by VFS guarantees. Change

svn commit: r312412 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 15:06:18 2017 New Revision: 312412 URL: https://svnweb.freebsd.org/changeset/base/312412 Log: Protect macro argument. Requested by: hselasky Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/fs/tmpfs/tmpfs.h Modified:

svn commit: r312423 - head/share/man/man5

2017-01-19 Thread Konstantin Belousov
(r312422) +++ head/share/man/man5/tmpfs.5 Thu Jan 19 18:26:06 2017(r312423) @@ -1,7 +1,12 @@ .\"- .\" Copyright (c) 2007 Xin LI +.\" Copyright (c) 2017 The FreeBSD Foundation, Inc. .\" All rights reserved. .\" +.\" Part of this documentation was written

svn commit: r312425 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 18:38:58 2017 New Revision: 312425 URL: https://svnweb.freebsd.org/changeset/base/312425 Log: Make tmpfs directory cursor available outside tmpfs_subr.c. Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified:

svn commit: r312432 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 19:46:49 2017 New Revision: 312432 URL: https://svnweb.freebsd.org/changeset/base/312432 Log: Add mount option for tmpfs(5) to not use namecache. The option "nonc" disables using of namecache for the created mount, by default namecache is used. The rationale

svn commit: r312429 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 19:25:42 2017 New Revision: 312429 URL: https://svnweb.freebsd.org/changeset/base/312429 Log: VNON nodes cannot exist. Tested by:pho (as part of larger patch) Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified:

svn commit: r312430 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 19:29:13 2017 New Revision: 312430 URL: https://svnweb.freebsd.org/changeset/base/312430 Log: Implement VOP_VPTOCNP() for tmpfs. For directories, node->tn_spec.tn_dir.tn_parent pointer to the parent is used. For non-directories, the implementation is naive,

svn commit: r312435 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 20:03:26 2017 New Revision: 312435 URL: https://svnweb.freebsd.org/changeset/base/312435 Log: Remove mistakenly merged field. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/fs/tmpfs/tmpfs.h Modified: head/sys/fs/tmpfs/tmpfs.h

svn commit: r312428 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 19:15:21 2017 New Revision: 312428 URL: https://svnweb.freebsd.org/changeset/base/312428 Log: Refcount tmpfs nodes and mount structures. On dotdot lookup and fhtovp operations, it is possible for the file represented by tmpfs node to be removed after the

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

2017-01-20 Thread Konstantin Belousov
Author: kib Date: Fri Jan 20 19:08:44 2017 New Revision: 312555 URL: https://svnweb.freebsd.org/changeset/base/312555 Log: Use SFENCE for ordering CLFLUSHOPT. SDM states that CLFLUSHOPT instructions can be ordered with other writes by SFENCE, heavier MFENCE is not required. Reviewed

svn commit: r312414 - head/sys/fs/tmpfs

2017-01-19 Thread Konstantin Belousov
Author: kib Date: Thu Jan 19 16:01:36 2017 New Revision: 312414 URL: https://svnweb.freebsd.org/changeset/base/312414 Log: Rename tmpfs_mount member allnode_lock to include namespace prefix. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/fs/tmpfs/tmpfs.h

Re: svn commit: r304187 - in head: . share/man/man4 sys/conf sys/dev/mcd sys/modules sys/modules/mcd

2016-08-19 Thread Konstantin Belousov
On Thu, Aug 18, 2016 at 09:28:57PM -0600, Warner Losh wrote: > On Thu, Aug 18, 2016 at 12:50 AM, Julian Elischer wrote: > > On 16/08/2016 4:54 AM, John Baldwin wrote: > >> > >> On Monday, August 15, 2016 08:38:02 PM John Baldwin wrote: > >>> > >>> Author: jhb > >>> Date: Mon

Re: svn commit: r304187 - in head: . share/man/man4 sys/conf sys/dev/mcd sys/modules sys/modules/mcd

2016-08-19 Thread Konstantin Belousov
On Fri, Aug 19, 2016 at 09:12:53PM +1000, Bruce Evans wrote: > On Fri, 19 Aug 2016, Konstantin Belousov wrote: > > > On Thu, Aug 18, 2016 at 09:28:57PM -0600, Warner Losh wrote: > >> On Thu, Aug 18, 2016 at 12:50 AM, Julian Elischer <jul...@freebsd.org> > >>

Re: svn commit: r304187 - in head: . share/man/man4 sys/conf sys/dev/mcd sys/modules sys/modules/mcd

2016-08-19 Thread Konstantin Belousov
On Fri, Aug 19, 2016 at 11:50:35AM +0300, Toomas Soome wrote: > > > On 19. aug 2016, at 10:39, Konstantin Belousov <kostik...@gmail.com> wrote: > > > > On Thu, Aug 18, 2016 at 09:28:57PM -0600, Warner Losh wrote: > >> On Thu, Aug 18, 2016 at 12:50 AM,

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

2016-08-16 Thread Konstantin Belousov
Author: kib Date: Tue Aug 16 16:50:48 2016 New Revision: 304228 URL: https://svnweb.freebsd.org/changeset/base/304228 Log: When block allocation fails in UFS_BALLOC(), and the volume does not have SU enabled, there is no point in calling softdep_request_cleanup(). The call cannot produce

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

2016-08-16 Thread Konstantin Belousov
Author: kib Date: Tue Aug 16 16:49:56 2016 New Revision: 304227 URL: https://svnweb.freebsd.org/changeset/base/304227 Log: In ffs_balloc_ufs{1,2} routines, assert that unwind records do not overflow local arrays. This is not immediately obvious from the static code inspection, due to retry

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

2016-08-16 Thread Konstantin Belousov
Author: kib Date: Tue Aug 16 17:05:15 2016 New Revision: 304229 URL: https://svnweb.freebsd.org/changeset/base/304229 Log: When looking up dandling buffers for unwing after failing block allocation in UFS_BALLOC(), there is no need to map them. Reviewed by: mckusick Sponsored by: The

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-22 Thread Konstantin Belousov
On Mon, Aug 22, 2016 at 06:55:58PM +1000, Bruce Evans wrote: > No. PSL_AC is ignored in kernel mode. Not quite. On recent processors there is a feature called SMAP. If enabled, user mode pages accesses from kernel mode require eflags.ac set to 1. If EFLAGS.AC == 0, usermode access causes #PF

Re: svn commit: r314087 - head/sys/x86/x86

2017-02-26 Thread Konstantin Belousov
On Sun, Feb 26, 2017 at 04:43:12AM +1100, Bruce Evans wrote: > On Sat, 25 Feb 2017, Konstantin Belousov wrote: > > > On Sat, Feb 25, 2017 at 02:17:23PM +1100, Bruce Evans wrote: > >> On Fri, 24 Feb 2017, Konstantin Belousov wrote: > >> > >>> On Thu, Feb

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

2017-02-28 Thread Konstantin Belousov
Author: kib Date: Tue Feb 28 22:54:52 2017 New Revision: 314429 URL: https://svnweb.freebsd.org/changeset/base/314429 Log: Initialize pcb_save for thread0. Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the thread0 context. Reported by: cem Reviewed by:

Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Konstantin Belousov
On Tue, Feb 28, 2017 at 05:14:43AM +, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Feb 28 05:14:42 2017 > New Revision: 314373 > URL: https://svnweb.freebsd.org/changeset/base/314373 > > Log: > Remove SVR4 (System V Release 4) binary compatibility support. > > UNIX System V

svn commit: r314486 - head/sys/kern

2017-03-01 Thread Konstantin Belousov
Author: kib Date: Wed Mar 1 10:22:07 2017 New Revision: 314486 URL: https://svnweb.freebsd.org/changeset/base/314486 Log: When deallocating the vm object in elf_map_insert() due to vm_map_insert() failure, drop the vnode lock around the call to vm_object_deallocate(). Since the

svn commit: r314487 - head/sys/kern

2017-03-01 Thread Konstantin Belousov
Author: kib Date: Wed Mar 1 10:28:15 2017 New Revision: 314487 URL: https://svnweb.freebsd.org/changeset/base/314487 Log: Use vm_map_insert() instead of vm_map_find() in elf_map_insert(). Elf_map_insert() needs to create mapping at the known fixed address. Usage of vm_map_find()

svn commit: r314489 - head/sys/compat/ia32

2017-03-01 Thread Konstantin Belousov
Author: kib Date: Wed Mar 1 11:39:29 2017 New Revision: 314489 URL: https://svnweb.freebsd.org/changeset/base/314489 Log: With the removal of IA64, the only arch which uses ia32 compat is amd64. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified:

svn commit: r314490 - head/sys/sys

2017-03-01 Thread Konstantin Belousov
Author: kib Date: Wed Mar 1 12:10:24 2017 New Revision: 314490 URL: https://svnweb.freebsd.org/changeset/base/314490 Log: Add some explanation for SV_TIMEKEEP flag. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/sys/sysent.h Modified:

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:05:13 2016 New Revision: 305594 URL: https://svnweb.freebsd.org/changeset/base/305594 Log: In softdep_prealloc(), return early not only for snapshots, but for the quota files as well. Reported and tested by: pho Reviewed by: mckusick Sponsored

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:04:45 2016 New Revision: 305593 URL: https://svnweb.freebsd.org/changeset/base/305593 Log: There is no need to upgrade the last dvp lock on lookups for modifying operations. Instead of upgrading, assert that the lock is exclusive. Explain the cause in

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:08:08 2016 New Revision: 305598 URL: https://svnweb.freebsd.org/changeset/base/305598 Log: When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(), include error code. Reported and tested by: pho Reviewed by: mckusick Sponsored by: The

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:06:43 2016 New Revision: 305595 URL: https://svnweb.freebsd.org/changeset/base/305595 Log: In dqsync(), when called from quotactl(), um_quotas entry might appear cleared since nothing prevents completion of the parallel quotaoff. There is nothing to sync in

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:08:54 2016 New Revision: 305599 URL: https://svnweb.freebsd.org/changeset/base/305599 Log: Do not leak transient ENOLCK error from flush_newblk_dep() loop. The buffer lock is retried on failed LK_SLEEPFAIL attempt, and error from the failed attempt is

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:09:34 2016 New Revision: 305601 URL: https://svnweb.freebsd.org/changeset/base/305601 Log: On rename, do not perform truncation of dirhash if the vnode truncation failed. Doing so resulted in inconsistent state of the ufs dirhash with regard to the

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:01:28 2016 New Revision: 305592 URL: https://svnweb.freebsd.org/changeset/base/305592 Log: Partially lift suspension when ffs_reload() finished with cgs and going to re-read inodes. Secondary write initiators, e.g. ufs_inactive(), might need to start a

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

2016-09-08 Thread Konstantin Belousov
Author: kib Date: Thu Sep 8 12:07:25 2016 New Revision: 305597 URL: https://svnweb.freebsd.org/changeset/base/305597 Log: When externding directory inode in ufs_direnter(), adjust i_endoff. This change is formally not needed, since i_endoff not used in all code paths after the call to

Re: svn commit: r305382 - in head/lib/msun: amd64 i387

2016-09-04 Thread Konstantin Belousov
On Sun, Sep 04, 2016 at 12:22:14PM +, Bruce Evans wrote: > Author: bde > Date: Sun Sep 4 12:22:14 2016 > New Revision: 305382 > URL: https://svnweb.freebsd.org/changeset/base/305382 > > Log: > Add asm versions of fmod(), fmodf() and fmodl() on amd64. Add asm > versions of fmodf() amd

svn commit: r305012 - in head/lib/libc: amd64/sys arm/sys i386/sys include mips/sys powerpc/sys powerpc64/sys sparc64/sys sys

2016-08-29 Thread Konstantin Belousov
@@ +/* + * Copyright (c) 2016 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification

svn commit: r305015 - head/lib/libc/aarch64/sys

2016-08-29 Thread Konstantin Belousov
Author: kib Date: Mon Aug 29 18:53:51 2016 New Revision: 305015 URL: https://svnweb.freebsd.org/changeset/base/305015 Log: Remove commented out mention of ptrace.S. After r305012 the asm wrapper is not needed. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified:

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-29 Thread Konstantin Belousov
On Mon, Aug 29, 2016 at 09:51:50AM -0700, John Baldwin wrote: > On Monday, August 29, 2016 09:58:13 AM Konstantin Belousov wrote: > > I dug into the ptrace(2) consumers, I found a lot of things using > > it which I would not expect to use, besides usual suspects of gdb > >

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-29 Thread Konstantin Belousov
On Mon, Aug 29, 2016 at 09:16:29PM +0300, Andrey Chernov wrote: > Previous text is documented everywhere and describing usual good > practice, so it should remains in place, in that means r304928 should be > reverted, because replace proper way of doing things with obsoleted > feature description.

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

2016-08-29 Thread Konstantin Belousov
Author: kib Date: Mon Aug 29 19:33:07 2016 New Revision: 305022 URL: https://svnweb.freebsd.org/changeset/base/305022 Log: Restore the requirement of setting errno to zero before calling ptrace(2). Describe the behaviour of automatically zeroing errno as historical feature. Requested

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

2016-08-29 Thread Konstantin Belousov
Author: kib Date: Mon Aug 29 19:53:13 2016 New Revision: 305024 URL: https://svnweb.freebsd.org/changeset/base/305024 Log: Typesetting fixes. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2

svn commit: r305129 - head/sys/vm

2016-08-31 Thread Konstantin Belousov
Author: kib Date: Wed Aug 31 14:49:58 2016 New Revision: 305129 URL: https://svnweb.freebsd.org/changeset/base/305129 Log: Make swapoff reliable. The swap_pager_swapoff() function uses trylock for the object lock before pagein, which means that either i/o to md(4) over swap, or

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

2016-08-31 Thread Konstantin Belousov
On Thu, Sep 01, 2016 at 01:38:31AM +1000, Bruce Evans wrote: > On Wed, 31 Aug 2016, Konstantin Belousov wrote: > > > Log: > > Make swapoff reliable. > > > > The swap_pager_swapoff() function uses trylock for the object lock > > before pagein, which mean

Re: svn commit: r305722 - head/sys/x86/x86

2016-09-12 Thread Konstantin Belousov
On Mon, Sep 12, 2016 at 04:57:58AM +, Sepherosa Ziehau wrote: > Author: sephe > Date: Mon Sep 12 04:57:58 2016 > New Revision: 305722 > URL: https://svnweb.freebsd.org/changeset/base/305722 > > Log: > x86: Use sx lock for interrupt sources. > > - Certain pic_assign_cpu, e.g.

Re: svn commit: r305722 - head/sys/x86/x86

2016-09-12 Thread Konstantin Belousov
On Mon, Sep 12, 2016 at 04:47:35PM +0800, Sepherosa Ziehau wrote: > On Mon, Sep 12, 2016 at 4:39 PM, Sepherosa Ziehau <se...@freebsd.org> wrote: > > On Mon, Sep 12, 2016 at 4:32 PM, Konstantin Belousov > > <kostik...@gmail.com> wrote: > >> On Mon, Sep 12, 2016 a

svn commit: r305678 - head/sys/kern

2016-09-10 Thread Konstantin Belousov
Author: kib Date: Sat Sep 10 09:00:12 2016 New Revision: 305678 URL: https://svnweb.freebsd.org/changeset/base/305678 Log: Fix build Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ==

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

2016-09-12 Thread Konstantin Belousov
Author: kib Date: Mon Sep 12 16:44:21 2016 New Revision: 305744 URL: https://svnweb.freebsd.org/changeset/base/305744 Log: Fix typo in comment. MFC after:3 days Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c

svn commit: r305692 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/include

2016-09-11 Thread Konstantin Belousov
Author: kib Date: Sun Sep 11 09:14:07 2016 New Revision: 305692 URL: https://svnweb.freebsd.org/changeset/base/305692 Log: Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64. The flag specifies that the block which uses FPU must be executed in critical section, i.e. take

Re: svn commit: r305722 - head/sys/x86/x86

2016-09-13 Thread Konstantin Belousov
On Tue, Sep 13, 2016 at 09:21:25AM +0800, Sepherosa Ziehau wrote: > Still didn't find anything wrong with this tunable set. Hm, did you have DMAR globally enabled ? I.e. did you get messages about dmar attachment, and then reports about dmar routing interrupts, like msi: Assigning MSI-X IRQ 264

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

2016-09-26 Thread Konstantin Belousov
Author: kib Date: Mon Sep 26 17:22:44 2016 New Revision: 306350 URL: https://svnweb.freebsd.org/changeset/base/306350 Log: For machines which support PCID but not have INVPCID instruction, i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() and invltlb_pcid_handler().

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

2016-09-26 Thread Konstantin Belousov
Author: kib Date: Mon Sep 26 17:25:25 2016 New Revision: 306351 URL: https://svnweb.freebsd.org/changeset/base/306351 Log: Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridge and IvyBridge machines, which support PCID but do not have INVPCID instruction. MFC after:

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

2016-10-04 Thread Konstantin Belousov
Author: kib Date: Tue Oct 4 17:01:24 2016 New Revision: 306680 URL: https://svnweb.freebsd.org/changeset/base/306680 Log: Re-apply r306516 (by cem): Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags Reduce contention during TLB invalidation operations by

svn commit: r306807 - head/sbin/init

2016-10-07 Thread Konstantin Belousov
Author: kib Date: Fri Oct 7 13:41:28 2016 New Revision: 306807 URL: https://svnweb.freebsd.org/changeset/base/306807 Log: When making a pause after detecting hard kill of the single-user shell, ensure that we do sleep for at least the specified time, in presence of signals.

svn commit: r306808 - head/sbin/init

2016-10-07 Thread Konstantin Belousov
Author: kib Date: Fri Oct 7 13:43:38 2016 New Revision: 306808 URL: https://svnweb.freebsd.org/changeset/base/306808 Log: Add verbosity around failed reboot(2) call. Sponsored by: The FreeBSD Foundation MFC after:3 weeks Modified: head/sbin/init/init.c Modified:

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

2016-10-07 Thread Konstantin Belousov
Author: kib Date: Fri Oct 7 11:38:28 2016 New Revision: 306803 URL: https://svnweb.freebsd.org/changeset/base/306803 Log: Limit scope of the optimization in r306608 to dounmount() caller only. Other uses of cache_purgevfs() do rely on the cache purge for correct operations, when paths are

svn commit: r306674 - head/sys/kern

2016-10-04 Thread Konstantin Belousov
Author: kib Date: Tue Oct 4 15:23:03 2016 New Revision: 306674 URL: https://svnweb.freebsd.org/changeset/base/306674 Log: Style. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c

svn commit: r306087 - in head/sys/amd64: amd64 include

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 10:05:51 2016 New Revision: 306087 URL: https://svnweb.freebsd.org/changeset/base/306087 Log: Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the amd64 pmap. The new pmap_pinit_pml4() function initializes the level 4 page table with

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

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 10:10:36 2016 New Revision: 306088 URL: https://svnweb.freebsd.org/changeset/base/306088 Log: Add amd64 functions to load/store GDT register, store IDT and TR registers. Note that lgdt() name is already used for function which, besides loading GDT, also

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

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 10:15:08 2016 New Revision: 306089 URL: https://svnweb.freebsd.org/changeset/base/306089 Log: Make resettodr_lock accessible outside subr_rtc.c. Protect CLOCK_GETTIME() with the lock. Now all time-related accesses to the CMOS for RTC should be under the

svn commit: r306097 - in head/sys: amd64/amd64 amd64/conf amd64/include conf modules modules/efirt

2016-09-21 Thread Konstantin Belousov
@@ /*- * Copyright (c) 2004 Marcel Moolenaar * Copyright (c) 2001 Doug Rabson + * Copyright (c) 2016 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use

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

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 08:23:33 2016 New Revision: 306081 URL: https://svnweb.freebsd.org/changeset/base/306081 Log: Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap. Both can be used to cause processes in capability mode to receive SIGTRAP when ENOTCAPABLE

svn commit: r306092 - in head/sys: amd64/amd64 sys

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 10:55:28 2016 New Revision: 306092 URL: https://svnweb.freebsd.org/changeset/base/306092 Log: Rename efi_systbl to efi_systbl_phys, the variable contains the physical address of the EFI System Table. Add _KERNEL guard around its declaration in sys/efi.h.

svn commit: r306090 - head/sys/boot/efi/loader/arch/amd64

2016-09-21 Thread Konstantin Belousov
(empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/exc.S Wed Sep 21 10:22:46 2016 (r306090) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship

svn commit: r306104 - head/sys/modules/efirt

2016-09-21 Thread Konstantin Belousov
Author: kib Date: Wed Sep 21 14:42:23 2016 New Revision: 306104 URL: https://svnweb.freebsd.org/changeset/base/306104 Log: Hopefully, fix build of the module outside the kernel tree. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/modules/efirt/Makefile

svn commit: r305947 - head/sys/boot/efi/include

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 18:40:27 2016 New Revision: 305947 URL: https://svnweb.freebsd.org/changeset/base/305947 Log: Add comment for the closing guard. Requested by: tsoome MFC after:1 week Modified: head/sys/boot/efi/include/efilib.h Modified:

svn commit: r305942 - in head: sbin/sysctl sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/sys

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 17:38:02 2016 New Revision: 305942 URL: https://svnweb.freebsd.org/changeset/base/305942 Log: Consolidate four efi_next_descriptor() definitions. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sbin/sysctl/sysctl.c

svn commit: r305941 - head/sys/boot/efi/include

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 17:35:24 2016 New Revision: 305941 URL: https://svnweb.freebsd.org/changeset/base/305941 Log: Add double-inclusion protection. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/boot/efi/include/efilib.h Modified:

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

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 17:33:49 2016 New Revision: 305939 URL: https://svnweb.freebsd.org/changeset/base/305939 Log: Remove trailing space. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/amd64/amd64/machdep.c Modified:

svn commit: r305943 - head/sys/boot/efi/loader/arch/amd64

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 17:41:16 2016 New Revision: 305943 URL: https://svnweb.freebsd.org/changeset/base/305943 Log: Utilize pmap.h names for constants and types used to construct EFI trampoline page table. Also do some style cleanup. Reviewed by: imp Sponsored by: The FreeBSD

svn commit: r305955 - head/sys/compat/freebsd32

2016-09-18 Thread Konstantin Belousov
Author: kib Date: Sun Sep 18 22:03:26 2016 New Revision: 305955 URL: https://svnweb.freebsd.org/changeset/base/305955 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c

svn commit: r305954 - head/sys/compat/freebsd32

2016-09-18 Thread Konstantin Belousov
+## Copyright (c) 2016 The FreeBSD Foundation ## All rights reserved. ## ## This software was developed at the University of Cambridge Computer ## Laboratory with support from a grant from Google, Inc. ## +## Portions of this software were developed by Konstantin Belousov +## under sponsorship from

svn commit: r305978 - in head/sys/x86: acpica include x86 xen

2016-09-19 Thread Konstantin Belousov
Author: kib Date: Mon Sep 19 15:58:45 2016 New Revision: 305978 URL: https://svnweb.freebsd.org/changeset/base/305978 Log: Detect x2APIC mode on boot and obey it. If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode, system usually consumes such configuration without a

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

2016-09-19 Thread Konstantin Belousov
Author: kib Date: Mon Sep 19 15:58:33 2016 New Revision: 305977 URL: https://svnweb.freebsd.org/changeset/base/305977 Log: Be more strict when selecting between snapshot/regular mount. Reclaimed vnode type is VBAD, so succesful comparision like devvp->v_type != VREG does not imply that

svn commit: r306020 - in head/sys/amd64: amd64 include

2016-09-20 Thread Konstantin Belousov
Author: kib Date: Tue Sep 20 09:38:07 2016 New Revision: 306020 URL: https://svnweb.freebsd.org/changeset/base/306020 Log: Move pmap_p*e_index() inline functions from pmap.c to pmap.h. They are already used in minidump code. Sponsored by: The FreeBSD Foundation MFC after:1 week

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

2016-09-23 Thread Konstantin Belousov
Author: kib Date: Fri Sep 23 09:26:40 2016 New Revision: 306257 URL: https://svnweb.freebsd.org/changeset/base/306257 Log: Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap. Reviewed by: cem Sponsored by: The FreeBSD Foundation MFC after:1 week

svn commit: r306261 - in head/usr.bin: . proccontrol

2016-09-23 Thread Konstantin Belousov
/proccontrol/proccontrol.c Fri Sep 23 12:34:54 2016 (r306261) @@ -0,0 +1,180 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov <k...@freebsd.org> + * under sponsorship from the FreeBSD Foun

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

2016-09-23 Thread Konstantin Belousov
) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2014 John Baldwin - * Copyright (c) 2014 The FreeBSD Foundation + * Copyright (c) 2014, 2016 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. Modified: head/sys

Re: svn commit: r306162 - in head/sys/arm: arm include

2016-09-22 Thread Konstantin Belousov
On Thu, Sep 22, 2016 at 08:15:00AM +, Ed Schouten wrote: > Author: ed > Date: Thu Sep 22 08:14:59 2016 > New Revision: 306162 > URL: https://svnweb.freebsd.org/changeset/base/306162 > > Log: > Make it possible to safely use TPIDRURW from userspace. > > On amd64, arm64 and i386, we have

svn commit: r305903 - in head: lib/libprocstat sys/ufs/ufs

2016-09-17 Thread Konstantin Belousov
Author: kib Date: Sat Sep 17 18:14:31 2016 New Revision: 305903 URL: https://svnweb.freebsd.org/changeset/base/305903 Log: Fix libprocstat build after r305902. - Use _Bool to not require userspace to include stdbool.h. - Make extattr.h usable without vnode_if.h. - Follow i_ump to get cdev

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

2016-09-17 Thread Konstantin Belousov
Author: kib Date: Sat Sep 17 16:47:34 2016 New Revision: 305902 URL: https://svnweb.freebsd.org/changeset/base/305902 Log: Reduce size of ufs inode. Remove redunand i_dev and i_fs pointers, which are available as ip->i_ump->um_dev and ip->i_ump->um_fs, and reorder members by size to

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

2016-08-17 Thread Konstantin Belousov
Author: kib Date: Wed Aug 17 09:20:04 2016 New Revision: 304279 URL: https://svnweb.freebsd.org/changeset/base/304279 Log: By default, allow all to read the HPET registers pages. At the same time, by, by default disallow writes to the mmaped HPET pages. Intent is to allow userspace to

Re: svn commit: r304180 - head/sys/ufs/ffs

2016-08-17 Thread Konstantin Belousov
On Tue, Aug 16, 2016 at 11:53:55PM +0200, Jilles Tjoelker wrote: > Hmm, some people interpret POSIX differently than I do, but I think it > is clear that XBD 3.384 Synchronized I/O Data Integrity Completion > requires the indirect blocks to be written (because "all file system > information

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

2016-08-18 Thread Konstantin Belousov
On Wed, Aug 17, 2016 at 10:20:40PM +0200, Jilles Tjoelker wrote: > On Mon, Aug 15, 2016 at 07:08:51PM +0000, Konstantin Belousov wrote: > > /* ISO/IEC 9945-1: 1996 */ > > #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE > > int fsync(int); > &

svn commit: r304808 - head/sys/kern

2016-08-25 Thread Konstantin Belousov
Author: kib Date: Thu Aug 25 16:35:42 2016 New Revision: 304808 URL: https://svnweb.freebsd.org/changeset/base/304808 Log: Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks. If there was some error, e.g. the sleep was interrupted, as in the referenced PR, do_rw_rdlock() did not

svn commit: r304916 - head/sys/kern

2016-08-27 Thread Konstantin Belousov
Author: kib Date: Sat Aug 27 18:12:42 2016 New Revision: 304916 URL: https://svnweb.freebsd.org/changeset/base/304916 Log: Consistently delimit each vnode description block with two blank lines. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified:

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-27 Thread Konstantin Belousov
On Sun, Aug 28, 2016 at 03:50:04AM +0300, Andrey Chernov wrote: > On 28.08.2016 3:38, Andrey Chernov wrote: > > On 28.08.2016 2:03, Konstantin Belousov wrote: > >> Since ptrace(2) syscall can return -1 for non-error situations, libc > >> wrappers set errno to 0 be

svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-27 Thread Konstantin Belousov
Author: kib Date: Sat Aug 27 23:03:23 2016 New Revision: 304928 URL: https://svnweb.freebsd.org/changeset/base/304928 Log: Do not obliterate errno value in the main thread during ptrace(2) call on x86. Since ptrace(2) syscall can return -1 for non-error situations, libc wrappers set

svn commit: r304931 - head/lib/libc/amd64/sys

2016-08-27 Thread Konstantin Belousov
Author: kib Date: Sun Aug 28 00:26:06 2016 New Revision: 304931 URL: https://svnweb.freebsd.org/changeset/base/304931 Log: Follow ABI when calling __error from the ptrace(2) wrapper. In particular, preserve syscall arguments on stack, since callee is not required to preserve arg-passing

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-27 Thread Konstantin Belousov
On Sun, Aug 28, 2016 at 03:38:10AM +0300, Andrey Chernov wrote: > On 28.08.2016 2:03, Konstantin Belousov wrote: > > Since ptrace(2) syscall can return -1 for non-error situations, libc > > wrappers set errno to 0 before performing the syscall, as the service > > to the

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-27 Thread Konstantin Belousov
On Sun, Aug 28, 2016 at 04:25:46AM +0300, Andrey Chernov wrote: > On 28.08.2016 4:15, Konstantin Belousov wrote: > >> POSIX: "No function in this volume of POSIX.1-2008 shall set errno to > >> zero." > > I am quite curious where ptrace(2) is defined by POSIX.

svn commit: r304959 - head/sys/contrib/ipfilter/netinet

2016-08-28 Thread Konstantin Belousov
Author: kib Date: Sun Aug 28 18:10:29 2016 New Revision: 304959 URL: https://svnweb.freebsd.org/changeset/base/304959 Log: Complete r304953. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/contrib/ipfilter/netinet/ip_log.c Modified:

Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

2016-08-29 Thread Konstantin Belousov
On Sun, Aug 28, 2016 at 04:09:51PM -0700, John Baldwin wrote: > OTOH, given that we explicitly documented it as not being true, I suspect > any applications that are using ptrace() are going off the documentation, not > the implementation artifact. Note that Linux's ptrace() documents the same >

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