Re: svn commit: r315957 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux

2017-03-25 Thread Konstantin Belousov
On Sat, Mar 25, 2017 at 03:47:30PM +, Dmitry Chagin wrote: > Author: dchagin > Date: Sat Mar 25 15:47:29 2017 > New Revision: 315957 > URL: https://svnweb.freebsd.org/changeset/base/315957 > > Log: > Implement Linux mincore() system call. > This is necessary for the upcoming drm-next. > +i

svn commit: r315968 - head/sys/x86/iommu

2017-03-25 Thread Konstantin Belousov
Author: kib Date: Sun Mar 26 00:40:35 2017 New Revision: 315968 URL: https://svnweb.freebsd.org/changeset/base/315968 Log: Provide less laborius way to enable busdma DMAR to only short list of devices. Kernel environment variable hw.busdma.default can take values 'bounce' and 'dmar' and s

svn commit: r316009 - head/sys/sys

2017-03-26 Thread Konstantin Belousov
Author: kib Date: Mon Mar 27 06:37:03 2017 New Revision: 316009 URL: https://svnweb.freebsd.org/changeset/base/316009 Log: Fix TUNABLE_UINT64() on 32bit architectures. The macro is not used in the tree. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/s

svn commit: r316011 - head/sys/x86/iommu

2017-03-27 Thread Konstantin Belousov
Author: kib Date: Mon Mar 27 07:06:45 2017 New Revision: 316011 URL: https://svnweb.freebsd.org/changeset/base/316011 Log: Timeout DMAR commands. Implement timeouts for register-based DMAR commands. Tunable/sysctl hw.dmar.timeout specifies the timeout in nanoseconds, set it to zero to

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

2017-03-29 Thread Konstantin Belousov
On Wed, Mar 29, 2017 at 10:33:57PM +, Robert Watson wrote: > Author: rwatson > Date: Wed Mar 29 22:33:56 2017 > New Revision: 316182 > URL: https://svnweb.freebsd.org/changeset/base/316182 > > Log: > Hook up new audit event identifiers for various non-Orange Book/CAPP > system calls suppor

svn commit: r316211 - head/sys/kern

2017-03-29 Thread Konstantin Belousov
Author: kib Date: Thu Mar 30 04:21:02 2017 New Revision: 316211 URL: https://svnweb.freebsd.org/changeset/base/316211 Log: A followup to r315749, two more places where brand->interp_path was accessed unconditionally. Reported by: se Sponsored by: The FreeBSD Foundation MFC after:

svn commit: r316213 - in head: include lib/libc/include lib/libc/stdlib lib/libc/string lib/libc/tests/stdlib lib/libc/tests/string sys/sys

2017-03-29 Thread Konstantin Belousov
Author: kib Date: Thu Mar 30 04:57:26 2017 New Revision: 316213 URL: https://svnweb.freebsd.org/changeset/base/316213 Log: Implement the memset_s(3) function as specified by the C11 ISO/IEC 9899:2011 Appendix K 3.7.4.1. Other needed supporting types, defines and constraint_handler infra

Re: svn commit: r316213 - in head: include lib/libc/include lib/libc/stdlib lib/libc/string lib/libc/tests/stdlib lib/libc/tests/string sys/sys

2017-03-29 Thread Konstantin Belousov
On Thu, Mar 30, 2017 at 04:57:26AM +, Konstantin Belousov wrote: > Author: kib > Date: Thu Mar 30 04:57:26 2017 > New Revision: 316213 > URL: https://svnweb.freebsd.org/changeset/base/316213 > > Log: > Implement the memset_s(3) function as specified by the C11 ISO/IEC &

svn commit: r316258 - head/sys/sys

2017-03-29 Thread Konstantin Belousov
Author: kib Date: Thu Mar 30 06:24:30 2017 New Revision: 316258 URL: https://svnweb.freebsd.org/changeset/base/316258 Log: Only activate __EXT1_VISIBLE block when using sys/errno.h in userspace. The prerequisite for '#if __EXT1_VISIBLE' functionality is the inclusion of sys/cdefs.h. errn

Re: svn commit: r316213 - in head: include lib/libc/include lib/libc/stdlib lib/libc/string lib/libc/tests/stdlib lib/libc/tests/string sys/sys

2017-03-29 Thread Konstantin Belousov
On Thu, Mar 30, 2017 at 12:51:04AM -0500, Pedro Giffuni wrote: > Thanks! > > On 30/3/2017 00:00, Konstantin Belousov wrote: > > On Thu, Mar 30, 2017 at 04:57:26AM +0000, Konstantin Belousov wrote: > >> Author: kib > >> Date: Thu Mar 30 04:57:26 2017 > >

Re: svn commit: r316176 - in head/sys: conf modules/dtrace modules/dtrace/dtaudit security/audit

2017-03-29 Thread Konstantin Belousov
On Wed, Mar 29, 2017 at 07:58:00PM +, Robert Watson wrote: > Author: rwatson > Date: Wed Mar 29 19:58:00 2017 > New Revision: 316176 > URL: https://svnweb.freebsd.org/changeset/base/316176 > > Log: > Add an experimental DTrace audit provider, which allows users of DTrace to > instrument se

Re: svn commit: r316213 - in head: include lib/libc/include lib/libc/stdlib lib/libc/string lib/libc/tests/stdlib lib/libc/tests/string sys/sys

2017-03-30 Thread Konstantin Belousov
On Thu, Mar 30, 2017 at 02:10:55AM -0500, Pedro Giffuni wrote: > The thing about the Annex K is that it is not used by anything AFAICT, > so I guess it would be considered bloat but with Microsoft being such > a good open-source citizen lately perhaps it will find uses in the > near future. If you

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

2017-03-30 Thread Konstantin Belousov
On Thu, Mar 30, 2017 at 09:22:07AM +0100, Robert Watson wrote: > On Thu, 30 Mar 2017, Konstantin Belousov wrote: > > >> Hook up new audit event identifiers for various non-Orange Book/CAPP > >> system calls supported by OpenBSM 1.2-alpha5. > >> > >

Re: svn commit: r316393 - head/sys/compat/linux

2017-04-02 Thread Konstantin Belousov
On Sun, Apr 02, 2017 at 07:46:13AM +, Dmitry Chagin wrote: > Author: dchagin > Date: Sun Apr 2 07:46:13 2017 > New Revision: 316393 > URL: https://svnweb.freebsd.org/changeset/base/316393 > > Log: > As noted by bde@ negative tv_sec values are not checked for overflow, > so overflow can st

Re: svn commit: r316393 - head/sys/compat/linux

2017-04-03 Thread Konstantin Belousov
On Sun, Apr 02, 2017 at 09:23:41PM +0300, Chagin Dmitry wrote: > On Mon, Apr 03, 2017 at 03:57:29AM +1000, Bruce Evans wrote: > > On Sun, 2 Apr 2017, Chagin Dmitry wrote: > > > > > On Sun, Apr 02, 2017 at 04:36:51PM +0300, Konstantin Belousov wrote: > > >> On S

svn commit: r316524 - head/sys/vm

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 16:30:41 2017 New Revision: 316524 URL: https://svnweb.freebsd.org/changeset/base/316524 Log: Use int instead of boolean_t for flags argument type in vnode_pager_generic_putpages() prototype; change the argument name to reflect that it is flags. Reviewed by:

svn commit: r316525 - head/sys/vm

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 16:45:00 2017 New Revision: 316525 URL: https://svnweb.freebsd.org/changeset/base/316525 Log: Some style fixes for vnode_pager_generic_putpages(), in the local declaration block. Reviewed by: markj (as part of the larger patch) Tested by:pho (as part of

svn commit: r316526 - head/sys/vm

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 16:56:04 2017 New Revision: 316526 URL: https://svnweb.freebsd.org/changeset/base/316526 Log: Extract calculation of ioflags from the vm_pager_putpages flags into a helper. Reviewed by: markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC af

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

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 16:57:53 2017 New Revision: 316528 URL: https://svnweb.freebsd.org/changeset/base/316528 Log: Add V_VMIO flag for vinvalbuf(9) to indicate that the flush request was issued during VM-initiated i/o (pageout), so that the function does not try to flush or remove pa

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

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 17:11:39 2017 New Revision: 316529 URL: https://svnweb.freebsd.org/changeset/base/316529 Log: Handle possible vnode reclamation after ncl_vinvalbuf() call. ncl_vinvalbuf() might need to upgrade vnode lock, allowing the vnode to be reclaimed by other thread. H

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

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 17:20:31 2017 New Revision: 316531 URL: https://svnweb.freebsd.org/changeset/base/316531 Log: Handle nfs IO_ASYNC write requests asynchronously. Reviewed by: markj, rmacklem Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:2 weeks X-

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

2017-04-05 Thread Konstantin Belousov
Author: kib Date: Wed Apr 5 17:26:20 2017 New Revision: 316532 URL: https://svnweb.freebsd.org/changeset/base/316532 Log: Make nfs pageout coherent with the dirty state of the buffers. Write out the dirty pages using VOP_WRITE() instead of directly calling ncl_writerpc(). The state of th

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

2017-04-06 Thread Konstantin Belousov
Author: kib Date: Thu Apr 6 12:44:34 2017 New Revision: 316566 URL: https://svnweb.freebsd.org/changeset/base/316566 Log: Remove spl*() calls from the nfsclient code. Style adjustments in the related lines in ncl_writebp(). Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation

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

2017-04-10 Thread Konstantin Belousov
Author: kib Date: Mon Apr 10 15:32:26 2017 New Revision: 316679 URL: https://svnweb.freebsd.org/changeset/base/316679 Log: Do not lose dirty bits for removing PROT_WRITE on arm64. Arm64 pmap interprets accessed writable ptes as modified, since ARMv8.0 does not track Dirty Bit Modifier in

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

2017-04-11 Thread Konstantin Belousov
Author: kib Date: Tue Apr 11 08:29:12 2017 New Revision: 316698 URL: https://svnweb.freebsd.org/changeset/base/316698 Log: Remove debugging printf. Instead, issue a diagnostic and return appropriate error if ncl_flush() was unable to clean buffer queue after the specified number or retr

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

2017-04-12 Thread Konstantin Belousov
Author: kib Date: Wed Apr 12 19:27:14 2017 New Revision: 316739 URL: https://svnweb.freebsd.org/changeset/base/316739 Log: Report _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX which show parameters of the current usermode implementation of the POSIX semaphores. For NSEMS_MAX, return -1 without

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

2017-04-13 Thread Konstantin Belousov
Author: kib Date: Thu Apr 13 15:49:55 2017 New Revision: 316767 URL: https://svnweb.freebsd.org/changeset/base/316767 Log: Map DMAP as nx. Demotions preserve PG_NX, so it is enough to set nx bit for initial lowest-level paging entries. Suggested and reviewed by:alc Sponsored by

svn commit: r316851 - head/sys/x86/iommu

2017-04-14 Thread Konstantin Belousov
Author: kib Date: Fri Apr 14 15:16:41 2017 New Revision: 316851 URL: https://svnweb.freebsd.org/changeset/base/316851 Log: Correct calculation of the entry->free_down in the invariants-checking code. Reported by: maxim Found by: PVS studio scan Sponsored by: The FreeBSD Foundatio

svn commit: r316852 - head/sbin/fsck_ffs

2017-04-14 Thread Konstantin Belousov
Author: kib Date: Fri Apr 14 15:22:00 2017 New Revision: 316852 URL: https://svnweb.freebsd.org/changeset/base/316852 Log: In fsck_ffs pass1, prevent the inosused variable from wrapping. The loop that scans the used inode map when soft updates is in use assumes that the inosused variable

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

2017-04-18 Thread Konstantin Belousov
On Tue, Apr 18, 2017 at 12:41:09PM +, Dexuan Cui wrote: > > From: owner-svn-src-h...@freebsd.org [mailto:owner-svn-src- > > h...@freebsd.org] On Behalf Of Konstantin Belousov > > Sent: Thursday, April 13, 2017 23:50 > > > > Author: kib > > Date: Thu A

svn commit: r317196 - head/sys/dev/fb

2017-04-20 Thread Konstantin Belousov
Author: kib Date: Thu Apr 20 15:18:15 2017 New Revision: 317196 URL: https://svnweb.freebsd.org/changeset/base/317196 Log: Write-combine framebuffer writes through user-space mappings, if possible. Note that KVA mapping of the framebuffer already uses write-combining mode, so the change,

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

2017-04-23 Thread Konstantin Belousov
On Sun, Apr 23, 2017 at 03:17:32AM +, Ngie Cooper wrote: > Author: ngie > Date: Sun Apr 23 03:17:32 2017 > New Revision: 317315 > URL: https://svnweb.freebsd.org/changeset/base/317315 > > Log: > Note that getpagesize(3) can return -1 on failure getpagesize() cannot fail. This change only co

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

2017-04-23 Thread Konstantin Belousov
On Sun, Apr 23, 2017 at 03:07:36PM +0200, Jilles Tjoelker wrote: > On Sun, Apr 23, 2017 at 12:53:45PM +0300, Konstantin Belousov wrote: > > On Sun, Apr 23, 2017 at 03:17:32AM +, Ngie Cooper wrote: > > > Author: ngie > > > Date: Sun Apr 23 03:17:32 2017 > >

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

2017-04-26 Thread Konstantin Belousov
Author: kib Date: Wed Apr 26 14:25:01 2017 New Revision: 317436 URL: https://svnweb.freebsd.org/changeset/base/317436 Log: getpagesize(3) cannot fail. The sysctl(HW_PAGESIZE) call cannot fail on FreeBSD kernels at least. And even if it failed for some improbable reason, PAGE_SIZE is a saf

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

2017-04-26 Thread Konstantin Belousov
Author: kib Date: Wed Apr 26 14:28:27 2017 New Revision: 317437 URL: https://svnweb.freebsd.org/changeset/base/317437 Log: getpagesize(3) cannot fail. Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/getpagesize.3 Modified: head/lib/libc/gen/getpagesize.3 ===

svn commit: r317523 - head/sys/kern

2017-04-27 Thread Konstantin Belousov
Author: kib Date: Thu Apr 27 21:24:50 2017 New Revision: 317523 URL: https://svnweb.freebsd.org/changeset/base/317523 Log: Add asserts to verify stability of struct proc and struct thread layouts. Some notes: - Only i386 and amd64 layouts are checked, other Tier-1 (or close to it) arc

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

2017-04-30 Thread Konstantin Belousov
Author: kib Date: Sun Apr 30 10:47:59 2017 New Revision: 317606 URL: https://svnweb.freebsd.org/changeset/base/317606 Log: Style. - Use ANSI C function definitions. - Remove redundand cast. - Minor style compliance tweaks. Sponsored by: The FreeBSD Foundation MFC after:1 week M

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

2017-04-30 Thread Konstantin Belousov
Author: kib Date: Sun Apr 30 19:32:51 2017 New Revision: 317610 URL: https://svnweb.freebsd.org/changeset/base/317610 Log: Restructure normal (non-error) control flow in sem_close(). Do not retest for the found semaphore after the loop to look it up. Instead, handle both cases of last and

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

2017-04-30 Thread Konstantin Belousov
Author: kib Date: Sun Apr 30 19:37:45 2017 New Revision: 317611 URL: https://svnweb.freebsd.org/changeset/base/317611 Log: Make semaphore names list mutex non-recursive. The mutex is used in sem_open() and sem_close(), which cannot recurse. The atfork handlers cannot collide with the open

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-04-30 Thread Konstantin Belousov
On Wed, Apr 19, 2017 at 02:09:58PM +1000, Bruce Evans wrote: > On Tue, 18 Apr 2017, Alan Somers wrote: > > > On Mon, Apr 17, 2017 at 11:34 AM, Gleb Smirnoff wrote: > > >> head/usr.bin/top/machine.c > >> head/usr.bin/vmstat/vmstat.c > > The previous 2 lines turn out to be relevant. I missed

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-05-02 Thread Konstantin Belousov
On Mon, May 01, 2017 at 06:25:11PM +1000, Bruce Evans wrote: > XX Index: subr_counter.c > XX === > XX --- subr_counter.c (revision 317604) > XX +++ subr_counter.c (working copy) > XX @@ -78,11 +78,15 @@ > XX sysctl_handle_counter_u64(

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-05-02 Thread Konstantin Belousov
On Tue, May 02, 2017 at 12:02:32PM +0200, Hans Petter Selasky wrote: > On 05/02/17 11:55, Konstantin Belousov wrote: > > + out1 = 0x; > > Nitpicking: > > Should this be written: 0xU ?? Compiler must do it on its own. The constant is not represen

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-05-02 Thread Konstantin Belousov
On Tue, May 02, 2017 at 09:25:40PM +1000, Bruce Evans wrote: > On Tue, 2 May 2017, Konstantin Belousov wrote: > > > On Mon, May 01, 2017 at 06:25:11PM +1000, Bruce Evans wrote: > >> XX Index: subr_counter.c > >> XX =

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-05-02 Thread Konstantin Belousov
On Tue, May 02, 2017 at 11:31:21PM +1000, Bruce Evans wrote: > On Tue, 2 May 2017, Konstantin Belousov wrote: > > ENOMEM is, of course, the situation which I want to avoid. > > Then you have to return no error, but truncate the value instead of > clamping. Anything else is inco

svn commit: r317681 - head/share/man/man7

2017-05-02 Thread Konstantin Belousov
Author: kib Date: Tue May 2 14:52:35 2017 New Revision: 317681 URL: https://svnweb.freebsd.org/changeset/base/317681 Log: Document time_t size. Reviewed by: emaste, imp, vangyzen Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.

Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocf

2017-05-02 Thread Konstantin Belousov
On Wed, May 03, 2017 at 01:31:10AM +1000, Bruce Evans wrote: > > > On Tue, 2 May 2017, Konstantin Belousov wrote: > I also thought of changing the scale when the values get high. The values > would increase slower above about 2G instead of stabilizing at 4G-1. > This is basica

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

2017-05-02 Thread Konstantin Belousov
On Wed, May 03, 2017 at 02:35:17AM +1000, Bruce Evans wrote: > On Tue, 2 May 2017, Konstantin Belousov wrote: > > > Log: > > Document time_t size. > > > > Modified: head/share/man/man7/arch.7 > > =

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

2017-05-02 Thread Konstantin Belousov
On Tue, May 02, 2017 at 02:04:09PM -0400, Ed Maste wrote: > > +Machine-depended type's sizes: > > Probably "Machine-dependent type sizes" Sure. diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 1ce397a303e..f30dfbb8145 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7

svn commit: r317695 - head/sys/vm

2017-05-02 Thread Konstantin Belousov
Author: kib Date: Tue May 2 18:40:41 2017 New Revision: 317695 URL: https://svnweb.freebsd.org/changeset/base/317695 Log: Emulate pre-r317061 ABI. This restores 32bit-sized accesses to vmcnt sysctls, making old binaries like top(1), systat(8) and reboot(8) mostly functional on newer ke

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

2017-05-02 Thread Konstantin Belousov
On Wed, May 03, 2017 at 04:41:52AM +1000, Bruce Evans wrote: > It would be good to mention that the type of time_t is signed somewhere. > There is a whole column for the signedess of char in another table. > Signedness can be given consisely using some markup like -8 or 8- for > signed. The scale

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

2017-05-02 Thread Konstantin Belousov
On Tue, May 02, 2017 at 02:36:24PM -0600, Ian Lepore wrote: > On Tue, 2017-05-02 at 22:45 +0300, Konstantin Belousov wrote: > > +is always signed, it is 64-bits everywere except on i386 and 32-bit > > powerpc. > > s/everywere/everywhere/ Fixed, thank you. diff --git a/sh

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

2017-05-03 Thread Konstantin Belousov
On Wed, May 03, 2017 at 04:19:08PM +1000, Bruce Evans wrote: > On Tue, 2 May 2017, Konstantin Belousov wrote: > OK. > > Including corrections by ngie: > > > diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 > > index 1ce397a303e..ad1abccc2e5 100644 >

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

2017-05-03 Thread Konstantin Belousov
On Wed, May 03, 2017 at 08:57:10PM +1000, Bruce Evans wrote: > On Wed, 3 May 2017, Konstantin Belousov wrote: > > > On Wed, May 03, 2017 at 04:19:08PM +1000, Bruce Evans wrote: > >> On Tue, 2 May 2017, Konstantin Belousov wrote: > >>> +.Pp > >>> +.Sy

svn commit: r317790 - head/share/man/man7

2017-05-04 Thread Konstantin Belousov
Author: kib Date: Thu May 4 11:57:52 2017 New Revision: 317790 URL: https://svnweb.freebsd.org/changeset/base/317790 Log: Avoid wrapping of the machine-dependent type sizes table, by removing non-informational sizeof() expressions. Add some explanatory and summary sentences. Noted by:

svn commit: r317809 - head/share/man/man7

2017-05-04 Thread Konstantin Belousov
Author: kib Date: Thu May 4 21:31:50 2017 New Revision: 317809 URL: https://svnweb.freebsd.org/changeset/base/317809 Log: Provide introduction for the arch(7) manpage. Start with some words about linear address space and its layout, then explain pointers models and ABIs, providing explan

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

2017-05-05 Thread Konstantin Belousov
On Fri, May 05, 2017 at 07:13:04PM +1000, Bruce Evans wrote: > On Thu, 4 May 2017, Konstantin Belousov wrote: > uintptr_t and size_t are are not synonyms for unsigned long on all arches. > They only have the same respresentation on 32-bit arches. On 32-bit arches, > they are synonyms

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

2017-05-05 Thread Konstantin Belousov
On Fri, May 05, 2017 at 11:39:23PM +1000, Bruce Evans wrote: > On Fri, 5 May 2017, Konstantin Belousov wrote: > > > On Fri, May 05, 2017 at 07:13:04PM +1000, Bruce Evans wrote: > > AFAIU, cheri is somewhat like Intel MPX, but more. I do not know fine > > details. > >

svn commit: r317840 - head/share/man/man7

2017-05-05 Thread Konstantin Belousov
Author: kib Date: Fri May 5 17:23:57 2017 New Revision: 317840 URL: https://svnweb.freebsd.org/changeset/base/317840 Log: Fix some grammar, fix some markup, bump copyright year, provide more exact claims in some cases. Discussed with: bde (most parts) Sponsored by: The FreeBSD Fo

svn commit: r317843 - head/share/man/man7

2017-05-05 Thread Konstantin Belousov
Author: kib Date: Fri May 5 18:21:33 2017 New Revision: 317843 URL: https://svnweb.freebsd.org/changeset/base/317843 Log: Define the scope and purpose of the page. Submitted by: emaste Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/share/man/man7/arch.7 M

svn commit: r317844 - head/share/man/man7

2017-05-05 Thread Konstantin Belousov
Author: kib Date: Fri May 5 18:36:41 2017 New Revision: 317844 URL: https://svnweb.freebsd.org/changeset/base/317844 Log: Grammar fixes. Noted by: bde Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/a

Re: svn commit: r317884 - head/sys/compat/linprocfs

2017-05-06 Thread Konstantin Belousov
On Sat, May 06, 2017 at 05:37:01PM +, Mahdi Mokhtari wrote: > + do_cpuid(0x8006, cache_size); Executing CPUID instruction on i386 without checking for CPUID support panics the kernel. Also, it is worth ensuring that the requested leaf is supported, otherwise nonsensical data would be p

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

2017-05-07 Thread Konstantin Belousov
Author: kib Date: Sun May 7 14:59:45 2017 New Revision: 317908 URL: https://svnweb.freebsd.org/changeset/base/317908 Log: Remove spl() calls from UFS code. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/ufs/ffs/ffs_rawread.c Modified: head/sys/ufs/ffs/ff

Re: svn commit: r317909 - head/usr.bin/resizewin

2017-05-07 Thread Konstantin Belousov
On Sun, May 07, 2017 at 05:21:23PM +, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun May 7 17:21:22 2017 > New Revision: 317909 > URL: https://svnweb.freebsd.org/changeset/base/317909 > > Log: > Make resizewin(1) discard the terminal queues, to lower the chance > for "unable t

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

2017-05-08 Thread Konstantin Belousov
On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > Author: kib > > Date: Thu May 4 21:31:50 2017 > > New Revision: 317809 > > URL: https://svnweb.freebsd.org/changeset/base/317809

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

2017-05-08 Thread Konstantin Belousov
On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote: > On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > > Author: kib > > > Date: Thu May 4 21:31:50 2017 > >

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

2018-08-14 Thread Konstantin Belousov
Author: kib Date: Tue Aug 14 16:27:17 2018 New Revision: 337770 URL: https://svnweb.freebsd.org/changeset/base/337770 Log: Fix typo. Noted by: alc MFC after:3 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c =

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

2018-08-14 Thread Konstantin Belousov
Author: kib Date: Tue Aug 14 16:37:14 2018 New Revision: 337773 URL: https://svnweb.freebsd.org/changeset/base/337773 Log: amd64: ensure that curproc->p_vmspace pmap always matches PCPU curpmap. When performing context switch on a machine without PCID, if current %cr3 equals to the new

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

2018-08-14 Thread Konstantin Belousov
Author: kib Date: Tue Aug 14 17:14:33 2018 New Revision: 337774 URL: https://svnweb.freebsd.org/changeset/base/337774 Log: Reserve page at the physical address zero on amd64. We always zero the invalidated PTE/PDE for superpage, which means that L1TF CPU vulnerability (CVE-2018-3620) can

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

2018-08-14 Thread Konstantin Belousov
Author: kib Date: Tue Aug 14 17:19:11 2018 New Revision: 33 URL: https://svnweb.freebsd.org/changeset/base/33 Log: Add definitions related to the L1D flush operation capability and MSR. Sponsored by: The FreeBSD Foundation Modified: head/sys/x86/include/specialreg.h Modified: he

svn commit: r337785 - head/sys/amd64/vmm/intel

2018-08-14 Thread Konstantin Belousov
Author: kib Date: Tue Aug 14 17:29:41 2018 New Revision: 337785 URL: https://svnweb.freebsd.org/changeset/base/337785 Log: Provide part of the mitigation for L1TF-VMM. On the guest entry in bhyve, flush L1 data cache, using either L1D flush command MSR if available, or by reading enough u

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

2018-08-15 Thread Konstantin Belousov
Author: kib Date: Wed Aug 15 12:48:49 2018 New Revision: 337838 URL: https://svnweb.freebsd.org/changeset/base/337838 Log: Fix early EFIRT on PCID machines after r337773. Ensure that the valid PCID state is created for proc0 pmap, since it might be used by efirt enter() before first conte

svn commit: r337981 - head/include

2018-08-17 Thread Konstantin Belousov
Author: kib Date: Fri Aug 17 18:24:11 2018 New Revision: 337981 URL: https://svnweb.freebsd.org/changeset/base/337981 Log: Reorder alphabetically. Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D16702 Modified: head

svn commit: r337983 - in head: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3

2018-08-17 Thread Konstantin Belousov
yright (c) 2018 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, are permitted provided

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

2018-08-18 Thread Konstantin Belousov
Author: kib Date: Sat Aug 18 12:17:05 2018 New Revision: 338016 URL: https://svnweb.freebsd.org/changeset/base/338016 Log: Print L1D FLUSH feature. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ===

svn commit: r338024 - head/sys/dev/pci

2018-08-18 Thread Konstantin Belousov
Author: kib Date: Sat Aug 18 20:35:19 2018 New Revision: 338024 URL: https://svnweb.freebsd.org/changeset/base/338024 Log: Rudimentary AER reading code for ddb(4). This is very primitive code to inspect the PCI error state and AER error state, dump the log and clear errors, from ddb. pc

svn commit: r338044 - head/share/man/man3

2018-08-19 Thread Konstantin Belousov
Author: kib Date: Sun Aug 19 13:23:46 2018 New Revision: 338044 URL: https://svnweb.freebsd.org/changeset/base/338044 Log: Fix typo. Noted by: Yuri Pankov MFC after:12 days Modified: head/share/man/man3/pthread_set_name_np.3 Modified: head/share/man/man3/pthread_set_name_np.3

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

2018-08-19 Thread Konstantin Belousov
Author: kib Date: Sun Aug 19 14:22:45 2018 New Revision: 338048 URL: https://svnweb.freebsd.org/changeset/base/338048 Log: Use tab for indent. Submitted by: Yuri Pankov MFC after:3 days Modified: head/lib/libc/stdlib/Makefile.inc Modified: head/lib/libc/stdlib/Makefile.inc ==

svn commit: r338049 - head/lib/libc/string

2018-08-19 Thread Konstantin Belousov
Author: kib Date: Sun Aug 19 14:25:28 2018 New Revision: 338049 URL: https://svnweb.freebsd.org/changeset/base/338049 Log: Clarify that memset_s(3) requires __STDC_WANT_LIB_EXT1__ for visibility. Fix typos and other nits. Submitted by: Yuri Pankov MFC after:3 days Differential re

svn commit: r338051 - in head/lib/libc: stdlib string

2018-08-19 Thread Konstantin Belousov
Author: kib Date: Sun Aug 19 14:39:57 2018 New Revision: 338051 URL: https://svnweb.freebsd.org/changeset/base/338051 Log: Provide set_constraint_handler_s(3) man page. Mention abort_handler_s(3) and ignore_handler_s(3), provide cross-reference from memset(3). Submitted by: Yuri Pank

svn commit: r338068 - in head/sys/amd64: amd64 include vmm/intel

2018-08-19 Thread Konstantin Belousov
Author: kib Date: Sun Aug 19 18:47:16 2018 New Revision: 338068 URL: https://svnweb.freebsd.org/changeset/base/338068 Log: Update L1TF workaround to sustain L1D pollution from NMI. Current mitigation for L1TF in bhyve flushes L1D either by an explicit WRMSR command, or by software reading

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

2018-08-20 Thread Konstantin Belousov
Author: kib Date: Mon Aug 20 19:07:57 2018 New Revision: 338112 URL: https://svnweb.freebsd.org/changeset/base/338112 Log: Always initialize PCPU kcr3 for vmspace0 pmap. If an exception or NMI occurs before CPU switched to a pmap different from vmspace0, PCPU kcr3 is left zero for pti con

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

2018-08-20 Thread Konstantin Belousov
Author: kib Date: Mon Aug 20 19:09:39 2018 New Revision: 338113 URL: https://svnweb.freebsd.org/changeset/base/338113 Log: Update comment about ABI of flush_l1s_sw to match the reality. CPUID instruction clobbers %rbx and %rdx. Sponsored by: The FreeBSD Foundation MFC after:13 da

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

2018-08-22 Thread Konstantin Belousov
Author: kib Date: Wed Aug 22 14:58:52 2018 New Revision: 338202 URL: https://svnweb.freebsd.org/changeset/base/338202 Log: Skip PMAP_PCID_KERN + 1 PCPU pcid_next value on APs as well. r337838 did it for BSP. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys

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

2018-08-25 Thread Konstantin Belousov
Author: kib Date: Sat Aug 25 15:21:28 2018 New Revision: 338312 URL: https://svnweb.freebsd.org/changeset/base/338312 Log: Unify amd64 and i386 vmspace0 pmap activation. Add pmap_activate_boot() for i386, move the invocation on APs from MD init_secondary() to x86 init_secondary_tail().

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

2018-08-25 Thread Konstantin Belousov
Author: kib Date: Sat Aug 25 15:31:23 2018 New Revision: 338313 URL: https://svnweb.freebsd.org/changeset/base/338313 Log: Remove dead code in i386 cpu_throw(). Curpmap must be already valid when cpu_throw() is called, even for early AP startup. Suggested by: alc Reviewed by: alc,

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

2018-08-28 Thread Konstantin Belousov
Author: kib Date: Tue Aug 28 18:47:02 2018 New Revision: 338356 URL: https://svnweb.freebsd.org/changeset/base/338356 Log: Several bug fixes and robustness improvements for the AP boot page table allocation. At the time that mp_bootaddress() is called, phys_avail[] array does not reflec

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

2018-08-28 Thread Konstantin Belousov
Author: kib Date: Tue Aug 28 18:49:39 2018 New Revision: 338357 URL: https://svnweb.freebsd.org/changeset/base/338357 Log: Fix compat32 ftruncate cap mode after ino64. Reported by:asomers PR: 230120 Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: hea

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

2018-08-28 Thread Konstantin Belousov
Author: kib Date: Tue Aug 28 18:50:34 2018 New Revision: 338358 URL: https://svnweb.freebsd.org/changeset/base/338358 Log: Regen after r338357. Approved by: re (gjb) Modified: head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ==

svn commit: r338370 - in head/sys: amd64/amd64 arm/arm arm64/arm64 cddl/contrib/opensolaris/uts/common/fs/zfs/sys i386/i386 mips/mips riscv/riscv vm

2018-08-29 Thread Konstantin Belousov
Author: kib Date: Wed Aug 29 12:24:19 2018 New Revision: 338370 URL: https://svnweb.freebsd.org/changeset/base/338370 Log: Remove {max/min}_offset() macros, use vm_map_{max/min}() inlines. Exposing max_offset and min_offset defines in public headers is causing clashes with variable names,

Re: Post r337773 EFIRT-boot-panic still happening with r337838 [Was: Re: svn commit: r337838 - head/sys/amd64/amd64]

2018-09-01 Thread Konstantin Belousov
On Sat, Sep 01, 2018 at 08:16:15PM +0200, Harry Schmalzbauer wrote: > I'm testing ALPHA4 on a Ivy bridge machine, without recent firmware > update, so no PCID. I have no idea what is the connection between firware updates and PCID. Ivy CPUs do have the PCID feature. > This fix doesn't cover that

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

2018-09-02 Thread Konstantin Belousov
Author: kib Date: Sun Sep 2 15:42:37 2018 New Revision: 338428 URL: https://svnweb.freebsd.org/changeset/base/338428 Log: Style cleanup. No functional changes. Sponsored by: The FreeBSD Foundation MFC after:3 days Approved by:re (rgrimes) Modified: head/libexec/rtld-elf/lib

svn commit: r338433 - in head/sys: amd64/include dev/efidev

2018-09-02 Thread Konstantin Belousov
Author: kib Date: Sun Sep 2 19:48:41 2018 New Revision: 338433 URL: https://svnweb.freebsd.org/changeset/base/338433 Log: Normalize use of semicolon with EFI_TIME_LOCK macros. Reviewed by: kevans Sponsored by: The FreeBSD Foundation MFC after:1 week Approved by:re (rgrimes)

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

2018-09-02 Thread Konstantin Belousov
Author: kib Date: Sun Sep 2 20:07:36 2018 New Revision: 338434 URL: https://svnweb.freebsd.org/changeset/base/338434 Log: Swap order of dererencing PCPU curpmap and checking for usermode in trap_pfault() KPTI violation check. EFI RT may set curpmap to NULL for the duration of the call fo

svn commit: r338435 - in head/sys: dev/efidev kern

2018-09-02 Thread Konstantin Belousov
Author: kib Date: Sun Sep 2 20:17:51 2018 New Revision: 338435 URL: https://svnweb.freebsd.org/changeset/base/338435 Log: Improve error messages from clock_if.m method failures. Print error message in verbose mode when CLOCK_SETTIME() clock_if.m method failed. For EFIRT RTC clock, add e

svn commit: r338436 - in head/sys: amd64/include kern

2018-09-02 Thread Konstantin Belousov
Author: kib Date: Sun Sep 2 21:16:43 2018 New Revision: 338436 URL: https://svnweb.freebsd.org/changeset/base/338436 Log: Add amd64 mdthread fields needed for the upcoming EFI RT exception handling. This is split into a separate commit from the main change to make it easier to handle p

svn commit: r338437 - in head/sys: amd64/amd64 amd64/include arm64/arm64 arm64/include conf dev/efidev modules/efirt sys

2018-09-02 Thread Konstantin Belousov
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 conditions + * are met: + * 1. Redist

Re: svn commit: r338437 - in head/sys: amd64/amd64 amd64/include arm64/arm64 arm64/include conf dev/efidev modules/efirt sys

2018-09-04 Thread Konstantin Belousov
On Tue, Sep 04, 2018 at 08:48:15AM -0700, Conrad Meyer wrote: > Hi Konstantin, > > On Sun, Sep 2, 2018 at 2:37 PM, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Sep 2 21:37:05 2018 > > New Revision: 338437 > > URL: https://svnweb.freebsd.org/

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

2018-09-04 Thread Konstantin Belousov
Author: kib Date: Tue Sep 4 19:26:54 2018 New Revision: 338459 URL: https://svnweb.freebsd.org/changeset/base/338459 Log: amd64: For non-PTI mode, do not initialize PCPU kcr3 to KPML4phys. Non-PTI mode does not switch kcr3, which means that kcr3 is almost always stale. This is important

svn commit: r338461 - head/sys/dev/efidev

2018-09-04 Thread Konstantin Belousov
Author: kib Date: Tue Sep 4 19:28:46 2018 New Revision: 338461 URL: https://svnweb.freebsd.org/changeset/base/338461 Log: Assign to correct structure members. Reported by: cem from Coverity Sponsored by: The FreeBSD Foundation MFC after:6 days Approved by: re (gjb) Modified:

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

2018-09-04 Thread Konstantin Belousov
Author: kib Date: Tue Sep 4 19:27:53 2018 New Revision: 338460 URL: https://svnweb.freebsd.org/changeset/base/338460 Log: amd64: Properly re-merge r334537 into SMAP-ified copyin(9) and copyout(9). Also this fixes the eflags.ac leak from copyin_smap() when the copied data length is multip

<    16   17   18   19   20   21   22   23   24   25   >