Commit Graph

225037 Commits

Author SHA1 Message Date
Enji Cooper
c119e4a444 Remove bogus bsd.subdir.mk .include
bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

MFC after:	3 days
2017-08-02 08:54:18 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Don Lewis
cd155b5603 Lower the amd64 shared page, which contains the signal trampoline,
from the top of user memory to one page lower on machines with the
Ryzen (AMD Family 17h) CPU.  This pushes ps_strings and the stack
down by one page as well.  On Ryzen there is some sort of interaction
between code running at the top of user memory address space and
interrupts that can cause FreeBSD to either hang or silently reset.
This sounds similar to the problem found with DragonFly BSD that
was fixed with this commit:
  https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b48dd28447fc8ef62fbc963accd301557fd9ac20
but our signal trampoline location was already lower than the address
that DragonFly moved their signal trampoline to.  It also does not
appear to be related to SMT as described here:
  https://www.phoronix.com/forums/forum/hardware/processors-memory/955368-some-ryzen-linux-users-are-facing-issues-with-heavy-compilation-loads?p=955498#post955498

  "Hi, Matt Dillon here. Yes, I did find what I believe to be a
   hardware issue with Ryzen related to concurrent operations. In a
   nutshell, for any given hyperthread pair, if one hyperthread is
   in a cpu-bound loop of any kind (can be in user mode), and the
   other hyperthread is returning from an interrupt via IRETQ, the
   hyperthread issuing the IRETQ can stall indefinitely until the
   other hyperthread with the cpu-bound loop pauses (aka HLT until
   next interrupt). After this situation occurs, the system appears
   to destabilize. The situation does not occur if the cpu-bound
   loop is on a different core than the core doing the IRETQ. The
   %rip the IRETQ returns to (e.g. userland %rip address) matters a
   *LOT*. The problem occurs more often with high %rip addresses
   such as near the top of the user stack, which is where DragonFly's
   signal trampoline traditionally resides. So a user program taking
   a signal on one thread while another thread is cpu-bound can cause
   this behavior. Changing the location of the signal trampoline
   makes it more difficult to reproduce the problem. I have not
   been because the able to completely mitigate it. When a cpu-thread
   stalls in this manner it appears to stall INSIDE the microcode
   for IRETQ. It doesn't make it to the return pc, and the cpu thread
   cannot take any IPIs or other hardware interrupts while in this
   state."
since the system instability has been observed on FreeBSD with SMT
disabled.  Interrupts to appear to play a factor since running a
signal-intensive process on the first CPU core, which handles most
of the interrupts on my machine, is far more likely to trigger the
problem than running such a process on any other core.

Also lower sv_maxuser to prevent a malicious user from using mmap()
to load and execute code in the top page of user memory that was made
available when the shared page was moved down.

Make the same changes to the 64-bit Linux emulator.

PR:		219399
Reported by:	nbe@renzel.net
Reviewed by:	kib
Reviewed by:	dchagin (previous version)
Tested by:	nbe@renzel.net (earlier version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11780
2017-08-02 01:43:35 +00:00
Enji Cooper
8fe10e175b Revert accidental character conversion for pfg's entry, done in r321886 2017-08-02 00:51:56 +00:00
Mark Johnston
526b5fe16c Amend r321884 to check the refcount and update the class with w_mtx held.
Reviewed by:	jhb
X-MFC with:	r321884
2017-08-01 23:14:38 +00:00
Emmanuel Vadot
fad5dbf8d5 Allwinner dtb: Add NanoPi M1 to the build
It was tested on NanoPi M1 Plus.
2017-08-01 20:28:11 +00:00
Taras Korenko
05dee37094 + Add myself to calendar.freebsd. 2017-08-01 20:16:00 +00:00
Tobias C. Berner
b7824a0870 Add joneum to the calendar.freebsd
Reported by:	mckusick
Submitted by:	joneum
2017-08-01 19:29:16 +00:00
Emmanuel Vadot
5393952249 Alwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board 2017-08-01 19:22:00 +00:00
Maksim Yevmenkin
02990f3b21 fix sort order 2017-08-01 18:48:09 +00:00
Maksim Yevmenkin
41837538e6 add myself
Requested by:	mckusick
2017-08-01 18:46:24 +00:00
Emmanuel Vadot
3da70cfac3 Allwinner dtb: add link for NanoPi Neo
Reported by:	Richard Puga <richard@puga.net>
Tested by:	Richard Puga <richard@puga.net>, myself
2017-08-01 18:33:27 +00:00
Bryan Drewery
91234af7d8 CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.
- bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first
  in PATH.
- Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it
  overrides the PATH set in bsd.compiler.mk in sub-makes.  The PATH
  set in bsd.compiler.mk is not exported and doing so would cause it to
  then override the BPATH set from environment.  The only sane solution
  is to prepend into BPATH as needed.
CCACHE_PATH could possibly be used for some of this as well.

Sponsored by:	Dell EMC Isilon
2017-08-01 18:26:20 +00:00
Kirk McKusick
550bff8dfc Add Anne Dickison.
Requested by: Anne Dickison
2017-08-01 18:25:04 +00:00
Lev A. Serebryakov
9143211387 Add myself to the calendar.freebsd
Reported by:	mckusick
2017-08-01 18:05:19 +00:00
Mark Johnston
57688b6e4e Fix a witness assertion that fires when a lock type's class changes.
When all instances of a lock type are destroyed (for example, after a
module unload), the corresponding witness entry remains associated with
that lock type. In this case, we shouldn't panic if a new instance of the
lock type is created and its lock class does not match that recorded in the
witness entry.

Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11788
2017-08-01 17:50:28 +00:00
Bryan Drewery
5aa73fa259 NO_CLEAN: No need to run delete-old if the directories don't exist.
X-MFC-With:	r321443
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-08-01 16:41:17 +00:00
Sevan Janiyan
26b5613dfc For the udp-client example, instruct user to add an entry for a udp based
service.
For tcp-client & udp-client, use the same port in configuration snippet as used
in the comment prior to remove any ambiguity on the port number which needs to
be specified.

Reviewed by:	bcr (mentor) wblock (mentor)
Approved by:	gavin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9830
2017-08-01 16:20:33 +00:00
Bryan Drewery
e2a659ea64 CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.
This uses the /usr/local/libexec/ccache/<cc,c++> wrappers rather than
modifying CC to be '/usr/local/bin/ccache cc'.  Some forms of compilation
do not support the 'command' type.

Sponsored by:	Dell EMC Isilon
2017-08-01 16:15:08 +00:00
Glen Barber
6f4c1b61b2 Update doceng, re, security-officer, clusteradm, webmaster and
donations entries.

Requested by:	sevan
Sponsored by:	The FreeBSD Foundation
2017-08-01 16:05:23 +00:00
Ian Lepore
dca576be69 In xdev-links, when installing symlinks to the cross-compiler pieces that
includes the OS version (armv6-freebsd12.0-cc, etc), use the OS version of
the compiler/world source code, not the version of the build host machine.
2017-08-01 14:54:25 +00:00
Michael Zhilin
6630716fa8 [calendar.freebsd] Add myselft into freebsd.calendar 2017-08-01 11:51:35 +00:00
Andriy Gapon
5d1186a4ed zfsboottest: catch up with r316585 and provide ldi_get_size method
This method is required for querying file / disk sizes which is needed
at least for finding all copies of ZFS VDEV labels.

Reported by:	ngie
MFC after:	1 week
2017-08-01 11:09:18 +00:00
Marcin Wojtas
7579dce2c6 Merge ena-com 1.1.4.2
Update ENA HAL after fixing gcc build in r321861.

Submitted by: rlibby
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D11480
2017-08-01 11:00:04 +00:00
Roger Pau Monné
d4ed36cde2 pci: fix write order when sizing BARs
According to the PCI Local Specification rev. 3.0 in case of a 64-bit
BAR both the low and the high parts of the register should be set to
~0 before attempting to read back the size.

So far I have found no single device that has problems with the
previous approach, but I think it's better to stay on the safe size.

This commit should not introduce any functional change.

MFC after:		3 weeks
Sponsored by:		Citrix Systems R&D
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D11750
2017-08-01 10:47:44 +00:00
Marcin Wojtas
945c72c7ae Add myself to calendar
Approved by: cognet (mentor)
2017-08-01 10:11:20 +00:00
Stefan Eßer
eb69150993 Adjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
long ago) in comment. No functional change.
2017-08-01 09:34:15 +00:00
Stefan Eßer
5c4a023c86 Add alternate Turkish keyboard layout F. The layout and menu texts have
been provided by Ufuk Güler, with minor changes for consistency by me.

Submitted by:	Ufuk Güler <ufukguler@yahoo.com>
MFC after:	1 week
2017-08-01 09:30:21 +00:00
Michael Tuexen
4cc853fe94 Add myself to calendar.
Reminded by:	mckusick
2017-08-01 09:26:22 +00:00
Alexander Motin
40715e9ed7 Add explicit check for PCI bus to r321720.
Reported by:	jhb
MFC after:	6 days
2017-08-01 09:22:10 +00:00
Vladimir Kondratyev
388b7f1cc5 Add myself to the calendar
Reminded by:	mckusick
Approved by:	gonzo (mentor)
2017-08-01 07:05:29 +00:00
Enji Cooper
6755788d98 Fix up r321849
pager_output should return 0 if no more output needs to be paged; non-zero
otherwise.

MFC after:	1 week
MFC with:	r321849
Reported by:	avg
2017-08-01 06:51:03 +00:00
Enji Cooper
20cce726e6 Standardize paths on SRCTOP instead of .CURDIR-relative paths
MFC after:	1 week
2017-08-01 05:39:40 +00:00
Enji Cooper
d125609b7a Makefile cleanup
- Standardize on SRCTOP instead of .CURDIR-relative paths
- Use LIBADD instead of a mix of specifying -lgeom via DPADD/LDADD/LDFLAGS.
  Specifying -lgeom via LDFLAGS is an especially unnecessary and odd
  pattern.

MFC after:	1 week
2017-08-01 05:34:04 +00:00
Enji Cooper
7e299eacab Fix the return type for pager_output(..) in bootparttest and zfsboottest
pager_output(..) has always returned int. For some reason (probably the
clang 5.0 update), this mismatch now results in an error with CC=clang.

MFC after:	1 week
2017-08-01 05:29:36 +00:00
Enji Cooper
d96899bad0 Chase r315408 with the fourth parameter being removed from disk_open(..)
This fixes one part of the build.
2017-08-01 05:26:45 +00:00
Mark Johnston
2375aaa8e9 Batch updates to v_wire_count when freeing page table pages on x86.
The removed release stores are not needed since stores are totally
ordered on i386 and amd64.

Reviewed by:	alc, kib (previous revision)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11790
2017-08-01 05:26:30 +00:00
Marcelo Araujo
4271417a84 Log when we have finished pushing users and groups.
Obtained from:	OpenBSD (rev 1.4)
MFC after:	3 weeks.
2017-08-01 05:26:20 +00:00
Enji Cooper
405873f16d Standardize on SRCTOP instead of .CURDIR-relative paths
MFC after:	3 days
2017-08-01 05:23:49 +00:00
Enji Cooper
88abac8f06 Clean up style in print_state(..) and pager_printf(..)
No functional change intended.

MFC after:	3 days
2017-08-01 05:16:14 +00:00
Mark Johnston
3c9308e82b Remove local variables missed in r321842.
X-MFC with:	r321842
2017-08-01 04:52:03 +00:00
Mark Johnston
90ec6fd4ba Let lockstat use ksyms(4)'s mmap interface.
The workaround described in the deleted comment is no longer needed.

MFC after:	1 week
2017-08-01 04:49:54 +00:00
Ian Lepore
94759a2448 Add a driver for the Intersil ISL12xx family of i2c RTC chips.
Supports ISL1209, ISL1218, ISL1219, ISL1220, ISL1221 (just basic RTC
functionality, not all the other fancy stuff the chips can do).
2017-08-01 04:16:52 +00:00
Alan Cox
2ac0c7c37c The blist_meta_* routines that process a subtree take arguments 'radix' and
'skip', which denote, respectively, the largest number of blocks that can be
managed by a subtree of that height, and one less than the number of nodes
in a subtree of that height.  This change removes the 'skip' argument from
those functions because 'skip' can be trivially computed from 'radius'.
This change also redefines 'skip' so that it denotes the number of nodes in
the subtree, and so changes loop upper bound tests from '<= skip' to '<
skip' to account for the change.

The 'skip' field is also removed from the blist struct.

The self-test program is changed so that the print command includes the
cursor value in the output.

Submitted by:	Doug Moore <dougm@rice.edu>
MFC after:	1 week
2017-08-01 03:51:26 +00:00
Dmitry Chagin
77d3337c9f Implement proper Linux /dev/fd and /proc/self/fd behavior by adding
Linux specific things to the native fdescfs file system.

Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic
links to the actual files, which the process has open.
A readlink(2) call on this file returns a full path in case of regular file
or a string in a special format (type:[inode], anon_inode:<file-type>, etc..).
As well as in a FreeBSD, opening the file in the Linux fdescfs directory is
equivalent to duplicating the corresponding file descriptor.

Here we have mutually exclusive requirements:
- in case of readlink(2) call fdescfs lookup() method should return VLNK
vnode otherwise our kern_readlink() fail with EINVAL error;
- in the other calls fdescfs lookup() method should return non VLNK vnode.

For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed
mounted with linrdlnk option an modified kern_readlinkat() to properly handle it.

For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option:

    mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd

Reviewed by:	kib@
MFC after:	1 week
Relnotes:	yes
2017-08-01 03:40:19 +00:00
Pedro F. Giffuni
d2ffc7af30 sys/net8021: Add missing braces in setcurchan().
Obtained from:	DragonFlyBSD (git c69e37d6)
MFC after:	3 days
2017-08-01 03:13:43 +00:00
Sepherosa Ziehau
f41e0df406 hyperv/hn: Add comment about ether_ifattach event subscription.
MFC after:	3 days
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D11710
2017-08-01 02:55:43 +00:00
Sepherosa Ziehau
962f035786 hyperv/hn: Renaming and minor cleanup
This prepares for the upcoming transparent VF support.

MFC after:	3 days
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D11708
2017-08-01 02:45:54 +00:00
Jason A. Harmening
31fc8bc32a Add myself to FreeBSD calendar
Requested by:	mckusick
2017-08-01 01:39:54 +00:00
Pedro F. Giffuni
b28eb0a74e Bring my aging self to calendar.freebsd.
Requested by: mckusick
2017-08-01 01:35:23 +00:00