Commit Graph

252816 Commits

Author SHA1 Message Date
mmacy
90401d64c9 epoch(9): Fix man page typo
Submitted by:	se
Reported by:	se
2018-07-04 17:06:23 +00:00
seanc
103adf4287 Complete my vertex even though edges were in place.
Reported by:	swills
Approved by:	swills (mentor, implicit)
2018-07-04 16:50:51 +00:00
mmacy
1d12a6fcd3 fix 335919 - check "last" not "inp" where appropriate
Submitted by:	ae
Reported by:	cy
2018-07-04 16:34:07 +00:00
gallatin
38fd5ce811 mxge: fix panic at module unload
r333175 (multicast changes) exposed a bug where
mxge was not checking to see if the driver was being
unloaded while handing ioctls that touch hardware.
As a result, now that in6m_disconnect() is run from
an async gtaskq, it was busy-waiting in mxge_send_cmd()
while the mcast list was destroyed.
2018-07-04 14:25:38 +00:00
trasz
fafaf5a282 Add a semaphore ping benchmark.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 14:20:19 +00:00
trasz
47c25991b6 Add a very simple memcpy benchmark.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 14:18:12 +00:00
trasz
13876a8cd2 Sort the benchmarks even more.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 14:15:48 +00:00
trasz
66c318023b Rename "dup" and "fstat_shmfd" to "shmfd_dup" and "shmfd_fstat" for consistency.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 14:14:00 +00:00
trasz
2456108592 Sort the benchmarks; no functional changes intended.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 14:11:49 +00:00
trasz
c6f32f0c3a Disable pipepingtd benchmarks, to make it not depend on libthr.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:52:13 +00:00
trasz
4286b395ad Make the pipeping benchmarks work with larger buffer sizes.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:45:29 +00:00
trasz
277872b727 Add threaded pipe ping benchmark.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:39:48 +00:00
emaste
9e8e32dc27 muge(4): remove DTB MAC addr from TODO list after r335925
Also replace numbered list with - bulleted so the list entries do not
need to be renumbered as tasks are completed.

Sponsored by:	The FreeBSD Foundation
2018-07-04 13:38:02 +00:00
trasz
d5c96360f0 Add a trivial "pipe ping" (two processes) benchmark.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:34:43 +00:00
trasz
127c1e47d5 Make syscall_timing(1) build with WARNS=6.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:31:55 +00:00
kib
81f629c8a2 Add setproctitle_fast(3) for frequent callers.
Some applications, notably PostgreSQL, want to call setproctitle()
very often.  It's slow.  Provide an alternative cheap way of updating
process titles without making any syscalls, instead requiring other
processes (top, ps etc) to do a bit more work to retrieve the data.
This uses a pre-existing code path inherited from ancient BSD, which
always did it that way.

Submitted by:	Thomas Munro
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D16111
2018-07-04 13:31:16 +00:00
trasz
fbbdd10ded Add getprogname(3) (ie null) benchmark.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:28:43 +00:00
kib
3a5cca2657 top: do not fall to the thread name if kernel cache of the process
args is empty.

Instead, use kvm_getargv() unconditionally to obtain the process
arguments.  It means that one additional sysctl(2) is performed there.

Submitted by:	Thomas Munro
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D16111
2018-07-04 13:28:16 +00:00
trasz
d68c5e4624 Use a macro for iteration.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-07-04 13:26:47 +00:00
kib
304dcfc1f8 Add a way for the process to request cleanup of the kernel cache of
the process arguments.  New arguments length zero causes the drop of
the pargs instead of allocation of useless zero-length buffer.

Submitted by:	Thomas Munro
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D16111
2018-07-04 13:22:48 +00:00
avg
da4bc8f61e remove unneeded inclusion of sys/interrupt.h from several files
It's likely that the header was needed in the past for swi(9).
But now that code does not use swi(9) or any other interfaces defined
in sys/interrupt.h.

MFC after:	1 week
2018-07-04 09:07:18 +00:00
manu
db9fe39110 loader: fdt: Try to load every possible DTB from u-boot
U-Boot setup a few variables :

 - fdt_addr which is the board static dtb (most of the time loaded before
   u-boot or coming from some hardware like a ROM)
 - fdt_addr_r which is a location in RAM that holds the DTB loaded by
   u-boot or before u-boot

In the case of u-boot + rpi firmware the DTB is loaded in RAM but the location
still end up in the fdt_addr variable and the fdt_addr_r variable exist.

Change the behavior so we test that a DTB exists for every possible variable :

 - fdt_addr_r is checked first as if u-boot needed to modify it the
   correct DTB will live there.
 - fdt_addr is checked second as if we run on a hardware with DTB in ROM
   it means that we what/need to run that
 - fdtaddr looks like a FreeBSD-ism but since I'm not sure leave it.

Reviewed by:	gonzo
Differential Revision:	https://reviews.freebsd.org/D16101
2018-07-04 07:37:45 +00:00
hrs
44b953fc1a - Fix a double unlock in inp_block_unblock_source() and
lock leakage in inp_leave_group() which caused a panic.
- Make order of CTR1() and IN_MULTI_LIST_LOCK() consistent
  around inm_merge().
2018-07-04 06:47:34 +00:00
mmacy
45aa8c7b93 epoch(9): update in_epoch() description as well 2018-07-04 03:54:39 +00:00
mmacy
818366ba8f FreeBSD_version: update for epoch(9) r335924 KPI change 2018-07-04 03:46:23 +00:00
mmacy
5b7dcc7bc8 epoch(9): update man page for r335924 2018-07-04 03:44:36 +00:00
will
5ce23703c1 Revert r335833.
Several third-parties use at least some of these ioctls.  While it would be
better for regression testing if they were used in base (or at least in the
test suite), it's currently not worth the trouble to push through removal.

Submitted by:	antoine, markj
2018-07-04 03:36:46 +00:00
gonzo
a9de59acda muge(4): add DTB blob as one more possible source of MAC address
On FDT-enabled platforms check if DTB blob has MAC address configured by
a boot loader. This information passed as a "local-mac-address" or
"mac-address" property of the device node. For USB NICs node
can be found by looking for compatibility string "usbVVV,PPP" where
VVV - vendor id (hex) and PPP - product id (hex)

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D16117
2018-07-04 03:02:53 +00:00
mmacy
14de8a2820 epoch(9): allow preemptible epochs to compose
- Add tracker argument to preemptible epochs
- Inline epoch read path in kernel and tied modules
- Change in_epoch to take an epoch as argument
- Simplify tfb_tcp_do_segment to not take a ti_locked argument,
  there's no longer any benefit to dropping the pcbinfo lock
  and trying to do so just adds an error prone branchfest to
  these functions
- Remove cases of same function recursion on the epoch as
  recursing is no longer free.
- Remove the the TAILQ_ENTRY and epoch_section from struct
  thread as the tracker field is now stack or heap allocated
  as appropriate.

Tested by: pho and Limelight Networks
Reviewed by: kbowling at llnw dot com
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16066
2018-07-04 02:47:16 +00:00
bdrewery
36a93b0c2f META_MODE: Fix wanting a meta file in source tree.
MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-07-04 00:18:40 +00:00
bdrewery
2fa96d6348 Use OBJS_DEPEND_GUESS for forced opt_global.h dependency.
MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-07-04 00:18:36 +00:00
jamie
95deb222cf Allow jail names (not just IDs) to be specified for: cpuset(1), ipfw(8),
sockstat(1), ugidfw(8)
These are the last of the jail-aware userland utilities that didn't work
 with names.

PR:		229266
MFC after:	3 days
Differential Revision:	D16047
2018-07-03 23:47:20 +00:00
mmacy
6f2eb073ec opensolaris compat: fix compile error
when opensolaris/sys/types.h is included before stddef.h ptrdiff_t
would be typedef'd twice
2018-07-03 23:45:02 +00:00
mmacy
17a2ff6226 udp6_input: validate inpcb before use
When traversing pcbinfo lists (rather than calling lookup) we need to
explicitly validate an inpcb before use.
2018-07-03 23:30:53 +00:00
mmacy
8ab77ccfc0 document MODULE_TIED behavior change 2018-07-03 23:09:09 +00:00
mmacy
2e62618788 Enable MODULE_TIED by default for modules compiled with the kernel
Requested by: jhb
2018-07-03 23:05:42 +00:00
jhb
27ec4ff5e8 Use 'e' instead of 'i' constraints with 64-bit atomic operations on amd64.
The ADD, AND, OR, and SUB instructions take at most a 32-bit
sign-extended immediate operand.  64-bit constants that do not fit into
that constraint need to be loaded into a register.  The 'i' constraint
tells the compiler it can pass any integer constant to the assembler,
whereas the 'e' constrain only permits constants that fit into a 32-bit
sign-extended value.  This fixes using
atomic_add/clear/set/subtract_long/64 with constants that do not fit into
a 32-bit sign-extended immediate.

Reported by:	several folks
Tested by:	Pete Wright <pete@nomadlogic.org>
MFC after:	2 weeks
2018-07-03 22:03:28 +00:00
bdrewery
32a7806e5a Fix .depend.foo.o tracking for sys/conf/files defined compilations.
Some example files:
  ia32_genassym.o
  acpi_wakecode.o

The old mkdep method also lacked tracking these files.

Objects defined in sys/conf/files with no-obj and no-implicit-rule get their
own targets defined in the kernel Makefile but lack having their objects added
to DEPENDOBJS so never get a .depend file generated.  Normally if an object is
in OBJS it will get a .depend file.

Fix this by looking for .o files in CLEAN and ensuring they are part of
the -MD filtering and .depend loading.  This is a hack.  Other solutions
could exist involving sys/conf/files or config(8) to auto add these to
DEPENDFILES/DEPENDOBJS but this method seems reliable enough without being
intrusive or error-prone for new files.

Reported by:	bde
MFC after:	3 weeks
Sponsored by:	Dell EMC
2018-07-03 21:29:04 +00:00
bdrewery
949d7d5523 Need offset.inc generated early if MODULE_TIED is defined. 2018-07-03 21:15:47 +00:00
bdrewery
0a45722a7e All genassym.sh usage need offset.inc 2018-07-03 21:02:25 +00:00
bdrewery
0d6c3945a9 genoffset.c is not generated 2018-07-03 21:02:21 +00:00
bdrewery
d7ac1268f3 Fix r335906+r335907 to not pass multiple source files to genoffset_test.o target.
This is working around a bug with the FAST_DEPEND logic with custom targets
that use .ALLSRC.

Reported by:	mmacy
2018-07-03 20:03:19 +00:00
bdrewery
f6af5f945f Handle .depend for genoffset_test.o 2018-07-03 19:24:52 +00:00
bdrewery
8d54a405c0 No need to make a copy to build genoffset_test.o 2018-07-03 19:24:44 +00:00
jilles
da3d144a59 rup: Fix -Wcast-align warnings
Fix possible strict aliasing issue (if time_t is the same size as int but
not int but for example long) which also resulted in a false positive
warning on systems with 64-bit time_t. Pointer casts are bad; we can just
copy the time_t.

Elsewhere, avoid casting char * to int * by using memcpy().

Reviewed by:	eadler
Differential Revision:	https://reviews.freebsd.org/D16075
2018-07-03 19:09:46 +00:00
bdrewery
445577ce27 Fix module build when MODULE_TIED=1 is set. 2018-07-03 18:45:04 +00:00
mmacy
32a174a167 explain the purpose of genoffset_test 2018-07-03 18:39:43 +00:00
mmacy
49be03d3b0 ensure that offset.inc is generated first 2018-07-03 18:20:42 +00:00
oshogbo
0f1e196e48 Regen after 335900.
PR:		228671
2018-07-03 18:18:29 +00:00
oshogbo
c34b7cd0a2 capsicum: add getdirentries to the freebsd32 compact
There is a getdirentries syscall in freebsd32 and it's
capability ready so allow calling it in the capability mode.

PR:		228671
2018-07-03 18:17:19 +00:00