Commit Graph

226852 Commits

Author SHA1 Message Date
Warner Losh
404a0a2f40 Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
Sponsored by: Netflix
2017-10-22 22:50:28 +00:00
Warner Losh
b022947e0e Use BOOTSRC here.
sponsored by: Netflix
2017-10-22 22:50:23 +00:00
Warner Losh
45e0c11351 Prefer SRCTOP paths for bits we're grabbing from libc.
Sponsored by: Netflix
2017-10-22 22:50:19 +00:00
Warner Losh
254ba2c985 Make at91 boot loader compile again.
No clue if it actually still works, but it might.
2017-10-22 22:50:15 +00:00
Warner Losh
cb3ee5c694 End source directories with SRC rather than a hodgepodge of names
BOOTDIR->BOOTSRC
FICLDIR->FICLSRC
LDR_MI->LDRSRC

This matches the patterns used in the rest of the system a bit vetter.

Suggested by: rgrimes@
Sponsored by: Netflix
2017-10-22 22:50:08 +00:00
Warner Losh
392c874409 Move fdt and uboot defines into common uboot.mk.
Sponsored by: Netflix
2017-10-22 22:49:51 +00:00
Mateusz Guzik
9e68989764 Make the sleepq chain hash size configurable per-arch and bump on amd64.
While here cache-align chains.

This shortens longest found chain during poudriere -j 80 from 32 to 16.

Pushing this higher up will probably require allocation on boot.
2017-10-22 20:43:50 +00:00
Mateusz Guzik
5a17c5524f sdt: make all sdt probe sites test one variable
This saves on cache misses at the expense of a slight grow of .text.

Note this is a bandaid for lack of hotpatching.

Discussed with:	markj
2017-10-22 20:22:23 +00:00
Mark Johnston
cc1307b67f Delete declarations of struct pfs_bitmap, removed in r143841.
MFC after:	1 week
2017-10-22 20:22:11 +00:00
Mateusz Guzik
4f7663af9f sdt: whack unused SDT_PROBE_ENABLED 2017-10-22 20:14:48 +00:00
Jilles Tjoelker
1f04a45950 libc: Do not refer to _DefaultRuneLocale in ctype inlines
Referring to _DefaultRuneLocale causes this >4KB structure to be copied to
all executables that use <ctype.h> inlines (except PIE executables).

This only affects the case where thread local storage is available.

_CurrentRuneLocale cannot be NULL, so the check can be removed entirely.

_DefaultRuneLocale needs to remain available for now since libc++ uses it.
The __isctype inline in include/_ctype.h also refers to _DefaultRuneLocale
and remains available because it may still be used by third party software.

Reviewed by:	bdrewery, theraven
Differential Revision:	https://reviews.freebsd.org/D10363
2017-10-22 20:01:07 +00:00
Mark Johnston
7421ff0751 Address some miscellaneous issues in the CTF man page.
- Fix a number of typos.
- Replace some illumos-specific references.
- Note that a type definition of kind CTF_K_FUNCTION may be followed by
  a null type identifier in order to provide 4-byte alignment for the
  next type definition.

MFC after:	2 weeks
2017-10-22 19:17:25 +00:00
Mark Johnston
ef36b3f756 MFV r323105 (partial): 8300 fix man page issues found by mandoc 1.14.1
illumos/illumos-gate@72d3dbb9ab
72d3dbb9ab

https://www.illumos.org/issues/8300
  Prior to integrating the mdocml update to 1.14.1, fix issues found by
  new version, especially the "new sentence, new line" style rule.

FreeBSD note: this revision merges only the changes to the CTF manual
page. The changes to the ZFS pages cannot be applied directly.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

Discussed with:	avg
MFC after:	2 weeks
2017-10-22 18:32:28 +00:00
Mateusz Guzik
614e1868d6 Change kdb_active type to u_char.
Fixes warnings from gcc and keeps the small size. Perhaps nesting should be moved
to another variablle.

Reported by:	ngie
2017-10-22 13:42:56 +00:00
Enji Cooper
f2374e0cc5 Clean up trailing whitespace in kdb_thr_ctx(..)
MFC after:	1 week
2017-10-22 12:12:52 +00:00
Bruce M Simpson
ab28146b6c Modernise this man page somewhat.
1. Add a reference to a good 3rd party list of compatible cables, but
provide suggestions for 'known good' vendors.

2. Change IP-based USB host-host example to a modern Ethernet one which
works 'out of box' with current Linux systems.

3. Explain that USB 3.0 is host-host, even though point-to-point soft
Ethernet can be achieved.

MFC after:	3 weeks
2017-10-22 11:40:55 +00:00
Bruce M Simpson
1d4c696a71 Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).
Tested with a Plugable cable in VirtualBox against Linux 4.11.

MFC after:	2 weeks
2017-10-22 11:15:58 +00:00
Edward Tomasz Napierala
be7d4ac586 Add OID for the vm.overcommit sysctl. This makes it possible to remove
one call to sysctl(2) from jemalloc startup code. (That also requires
changes to jemalloc, but I plan to push those to upstream first.)

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12745
2017-10-22 10:35:29 +00:00
Edward Tomasz Napierala
6b61e3e47a Don't call realpath(3) from libmap rtld code. This gets rid of a few calls
to fstatat(2) at binary startup; the difference looks like this:

--- przed       2017-10-14 13:55:49.983528000 +0100
+++ po  2017-10-14 14:10:39.134343000 +0100
@@ -1,15 +1,10 @@
 mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366173184 (0x800623000)
 issetugid()                                     = 0 (0x0)
-fstatat(AT_FDCWD,"/etc",{ mode=drwxr-xr-x ,inode=1364352,size=2560,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=1373288,size=102,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
 openat(AT_FDCWD,"/etc/libmap.conf",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 fstat(3,{ mode=-rw-r--r-- ,inode=1373288,size=102,blksize=32768 }) = 0 (0x0)
 mmap(0x0,102,PROT_READ,MAP_PRIVATE,3,0x0)       = 34366205952 (0x80062b000)
 close(3)                                        = 0 (0x0)
-fstatat(AT_FDCWD,"/usr",{ mode=drwxr-xr-x ,inode=561792,size=512,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local",{ mode=drwxr-xr-x ,inode=561800,size=512,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local/etc",{ mode=drwxr-xr-x ,inode=653279,size=1536,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local/etc/libmap.d",0x7fffffffcf50,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
+open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0165) ERR#2 'No such file or directory'
 munmap(0x80062b000,102)                                 = 0 (0x0)
 openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-2\0\0"...,128) = 128 (0x80)

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12741
2017-10-22 10:32:40 +00:00
Konstantin Belousov
456a73ef01 Remove the support for mknod(S_IFMT), which created dummy vnodes with
VBAD type.

FFS ffs_write() VOP catches such vnodes and panics, other VOPs do not
check for the type and their behaviour is really undefined.  The
comment claims that this support was done for 'badsect' to flag bad
sectors, we do not have such facility in kernel anyway.

Reported by:	Dmitry Vyukov <dvyukov@google.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-10-22 08:11:45 +00:00
Enji Cooper
7c6052349c Regenerate src.conf(5) after r324340 (armv7 addition) 2017-10-22 07:36:28 +00:00
Warner Losh
cced8b11d9 Define LIBSA32 to LIBSA on i386 to fix build.
Sponsored by: Netflix
2017-10-22 07:25:28 +00:00
Warner Losh
0a51cbc9c4 Add note to updating about shifting LOADER_*SUPPORT options.
Sponsored by: Netflix
2017-10-22 03:52:26 +00:00
Warner Losh
4b165a5f12 Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
Sponsored by: Netflix
2017-10-22 03:52:22 +00:00
Warner Losh
4b32ccfd81 When building standalone, don't define errno. Let the definition from
stand.h override. This is similar to what we do in the kernel.

Sponsored by: Netflix
2017-10-22 03:52:17 +00:00
Warner Losh
cee8ef91e3 Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and
LOADER_NO_GELI_SUPPORT. To disable geli support in the loader, define
LOADER_GELI_SUPPORT=no. Proper warnings for for old build options to
follow.

Sponsored by: Netflix
2017-10-22 03:52:12 +00:00
Warner Losh
d1d01d440c Introduce BOOTOBJ: The top level object directory for the boot tree
and use it in preference to spelling out the path.

Sponsored by: Netflix
2017-10-22 03:52:08 +00:00
Warner Losh
913dd6b0fa Use BOOTDIR more consistently in defs.mk rather than repeat sys/boot.
Sponsored By: Netflix
2017-10-22 03:52:03 +00:00
Mateusz Guzik
be49509eea mtx: implement thread lock fastpath
MFC after:	1 week
2017-10-21 22:40:09 +00:00
Brad Davis
bd6bc862e3 Remove a atrun check that is nullified by r318443.
Approved by:	will
2017-10-21 21:58:24 +00:00
Dimitry Andric
738eacb46b Pull in r316035 from upstream llvm trunk (by Tim Northover):
AArch64: account for possible frame index operand in compares.

  If the address of a local is used in a comparison, AArch64 can fold
  the address-calculation into the comparison via "adds".
  Unfortunately, a couple of places (both hit in this one test) are not
  ready to deal with that yet and just assume the first source operand
  is a register.

This should fix an assertion failure while building the test suite of
www/firefox for AArch64.

PR:		223048
MFC after:	3 days
2017-10-21 19:14:45 +00:00
Dimitry Andric
fc203cd43e After the import of libc++ 5.0.0, there is no need to disable building
libc++experimental.a on arm (r318654) and mips (r318859) anymore, since
upstream fixed the static assertions which would occur.

Noticed by:	George Abdelmalik <gabdelmalik@uniridge.com.au>
PR:		223119
MFC after:	3 days
2017-10-21 18:21:44 +00:00
Konstantin Belousov
422fe502b3 Check that the page which is freed as zeroed, indeed has all-zero content.
This catches some rare mysterious failures at the source.  The check
is only performed on architectures which implement direct map, and
only enabled with option DIAGNOSTIC, similar to other costly
consistency checks.

Reviewed by:	alc, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-10-21 17:28:12 +00:00
Stefan Eßer
09fdf1f84c Mention sysrc(8) as scripting interface for the modification of config
files. This is a follow up commit to r324721, which added sysrc(8) to
the SEE ALSO list.

Submitted by:	Kurt Jaeger (lists at opsec.eu)
MFC after:	1 week
2017-10-21 16:55:52 +00:00
Emmanuel Vadot
65854c616e dtb/allwinner: Disconnect sinovoip-bpi-m3.dts from the build
No active commiter have this board and we diverged too much from
the upstream DTS.
2017-10-21 16:12:00 +00:00
Michal Meloun
32c48d07c6 Fix spelling.
Reported by:	lidl
MFC after:	1 month
2017-10-21 15:48:16 +00:00
Emmanuel Vadot
749885aa20 dts: Update our device tree sources file fomr Linux 4.13 2017-10-21 15:47:40 +00:00
Emmanuel Vadot
d5464ff117 dts: Update the Device Tree Sources to Linux 4.13 2017-10-21 15:18:20 +00:00
Michal Meloun
0cbf724ed0 Fullify implementation of AT_HWCAP and AT_HWCAP2 for ARMv6,7.
This makes elf_aux_info(3) useable for ARM ports.

MFC after:	1 month
2017-10-21 12:16:21 +00:00
Michal Meloun
c8759f0996 Add C++ decoration to auxv.v forgotten in r324815.
MFC after:	1 month
2017-10-21 12:15:12 +00:00
Michal Meloun
0b08ae2120 Make elf_aux_info() as public libc function.
- Teach elf aux vector functions about newly added AT_HWCAP and AT_HWCAP2
  vectors.
- Export _elf_aux_info() as new public libc function elf_aux_info(3)

The elf_aux_info(3) should be considered as FreeBSD counterpart of glibc
getauxval() with more robust interface.

Note:
We cannot name this new function as getauxval(), with glibc compatible
interface. Some ports autodetect its existence and then expects that all
Linux specific AT_<*> vectors are defined and implemented.

MFC after:	1 month
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D12743
2017-10-21 12:06:18 +00:00
Michal Meloun
904d8c492f Add AT_HWCAP2 ELF auxiliary vector.
- allocate value for new AT_HWCAP2 auxiliary vector on all platforms.
 - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly
   same way as for AT_HWCAP.

MFC after:	1 month
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D12699
2017-10-21 12:05:01 +00:00
Ryan Libby
2efbd10ade pms/freebsd: fix compiler warnings
- A number of unused variable warnings,
 - a missing prototype warning (actually a dead function),
 - and a potential use of an uninitialized variable.

Reviewed by:	pfg
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12683
2017-10-21 07:23:45 +00:00
Bjoern A. Zeeb
8e94025b41 With r181803 on 2008-08-17 23:27:27Z the first VIMAGE commit went into
HEAD.  Enable VIMAGE in GENERIC kernels and some others (where GENERIC does
not exist) on HEAD.

Disable building LINT-VIMAGE with VIMAGE being default.

This should give it a lot more exposure in the run-up to 12 to help
us evaluate whether to keep it on by default or not.
We are also hoping to get better performance testing.
The feature can be disabled using nooptions.

Requested by:		many
Reviewed by:		kristof, emaste, hiren
X-MFC after:		never
Relnotes:		yes
Differential Revision:	https://reviews.freebsd.org/D12639
2017-10-20 21:40:59 +00:00
Mark Johnston
eadbeae5e7 Free the right address range if kmem_back() fails in memguard_alloc().
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-10-20 21:13:19 +00:00
Mateusz Guzik
e66167764a amd64: plug missed dt_lock in cpu_fork 2017-10-20 18:58:11 +00:00
Konstantin Belousov
b3d4ab6645 Take the vm object lock in read mode in vnode_generic_putpages().
Only upgrade it to write mode if we need to clear dirty bits of the
partially valid page after EOF.

Suggested and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2017-10-20 18:40:29 +00:00
Alan Somers
9e9a610115 Use the .Fx macro consistently.
Sponsored by:	Spectra Logic Corp
2017-10-20 15:29:28 +00:00
Alan Somers
05bc55f222 Fix the mps(4) HISTORY section.
Looks like a copy/paste error from r302673.

MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-10-20 15:24:28 +00:00
Mark Johnston
a3e8a25a52 Avoid the nbp lookup in the final loop iteration in flushbuflist().
The end of the loop must re-lookup the next buf since the bufobj lock
is dropped in the loop body. If the lookup fails, the loop is restarted.
This mechanism non-obviously also terminates the loop when the end of
the buf list is reached. Split up the two loops termination cases to
make the code a bit less fragile. No functional change intended.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12730
2017-10-20 14:56:13 +00:00