Commit Graph

251241 Commits

Author SHA1 Message Date
eadler
832caf6bc2 top(1): remove 'xs' and 'xh' source files
Now that we're our own upstream these files buy us nothing.
2018-05-20 17:58:22 +00:00
jilles
ee6bb75b10 sh: Allow unquoted newlines in word in ${param+word} etc.
POSIX requires accepting unquoted newlines in word in parameter expansions
like ${param+word}, ${param#word}, although the Bourne shell did not support
it, it is not commonly used and might make it harder to find a missing
closing brace.

It was also strange that something like

foo="${bar#
}"

was rejected.

Reported by:	Martijn Dekker via Robert Elz
2018-05-20 17:25:52 +00:00
dumbbell
fa23ca22d3 teken, vt(4): Parse the "Cursor style" escape sequence
The escape sequence (e.g. `^[[2 q`) was unsupported before and the
letter `q` was displayed as a typed character. The sequence is used by
Neovim for instance.

Now, it is properly parsed. However, it is ignored, so it won't change
the cursor style.

Because the escape sequence contains a space character, the
`gensequences` script had to be modified to support that. In the
`sequences` file, a space is represented as the string `SP`.
2018-05-20 14:21:20 +00:00
mmacy
29271e5a0a nfsclient: warnings cleanups 2018-05-20 06:14:12 +00:00
cy
fe71509080 Style fixup:
A non-functional commit to make adjustment to an aesthetically
unpleasing long line.
2018-05-20 05:59:42 +00:00
cy
c31fc52262 Fix build post r333919.
This commit results in an aesthetically unpleasing long line
which will be fixed next commit.
2018-05-20 05:59:35 +00:00
mmacy
8e113981f9 AF_UNIX: fix LOR introduced by the locking rewrite 2018-05-20 05:50:53 +00:00
mmacy
7014a06a90 Add additional preinitialized cap_rights 2018-05-20 05:13:12 +00:00
eadler
ff5cee9324 MFV: file 5.33
Merge the latest file(1) in.

Relevent Changelog:
- extend the support for ${x?:} expansions for magic descriptions
- add support for ${x?:} in mime types to handle pie binaries.
- add support for negative offsets (offsets from the end of file)
- close the file on error when writing magic

Relnotes:	yes
2018-05-20 05:06:42 +00:00
eadler
1c37767822 Vendor import of file 5.33 2018-05-20 04:56:46 +00:00
mjg
1729d1b82a vfs: simplify vop_stdlock/unlock
The interlock pointer is non-NULL by definition and the compiler see through
that and eliminates the NULL checks. Just remove them from the code as they
play no role.

No difference in generated assembly.
2018-05-20 04:45:05 +00:00
mmacy
7110d4d796 inpcb: defer destruction of inpcb until after a grace period has elapsed
in_pcbfree will remove the incpb from the list and release the rtentry
while the vnet is set, but the actual destruction will be deferred
until any threads in a (not yet used) epoch section, no longer potentially
have references.
2018-05-20 04:38:04 +00:00
mmacy
d518618594 AF_UNIX: make unpcb lock name line up with what's in witness 2018-05-20 04:32:48 +00:00
mmacy
b37dccc294 epoch.h: hide proc.h->priority.h from user 2018-05-20 04:15:12 +00:00
jhibbits
4a4c273c7a Add support for the XIVE XICS emulation mode for POWER9 systems
Summary:
POWER9 systems use a new interrupt controller, XIVE, managed through OPAL
firmware calls.  The OPAL firmware includes support for emulating the previous
generation XICS presentation layer in addition to a new "XIVE Exploitation"
mode.  As a stopgap until we have XIVE exploitation mode, enable XICS emulation
mode so that we at least have an interrupt controller.

Since the CPPR is local to the current CPU, it cannot be updated for APs when
initializing on the BSP.  This adds a new function, directly called by the
powernv platform code, to initialize the CPPR on AP bringup.

Reviewed by:	nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15492
2018-05-20 03:23:17 +00:00
mmacy
fe7765802e inpcb: consolidate possible deletion in pcblist functions in to epoch
deferred context.
2018-05-20 02:27:58 +00:00
mmacy
99ec59840b in_pcb: add helper for deferring inpcb rele calls from list functions 2018-05-20 02:17:30 +00:00
eadler
8b5d41008d top(1): Quiesce several warnings
This is all warnings at level six (6) that are not
char-subscripts, incompatible-pointer-types,
sign-compare, switch, int-conversion,
missing-variable-declarations, cast-qual, cast-align

Some warnings that are fixed by this commit are:
shadow, strict-prototypes, missing-prototypes, pointer-arith,
unused-parameter, unused-const-variable, and several others
2018-05-20 02:14:27 +00:00
eadler
aac06c5109 top(1): remove use of 'register' keyword
This keyword is meaningless is obscures future diffs that help clear up
warnings in top.
2018-05-20 01:32:27 +00:00
eadler
9a46ed03f2 top(1): be constant in a structure
This silences some warnings that are still hidden since the remainder of
top(1) does not build with higher WARNS yet.
2018-05-20 01:30:19 +00:00
mmacy
516228d5b4 epoch.h: move kernel only bits under _KERNEL 2018-05-20 01:00:56 +00:00
mmacy
ce91e745ec ip(6)_freemoptions: defer imo destruction to epoch callback task
Avoid the ugly unlock / lock of the inpcbinfo where we need to
figure out what kind of lock we hold by simply deferring the
operation to another context. (Also a small dependency for
converting the pcbinfo read lock to epoch)
2018-05-20 00:22:28 +00:00
markj
c893b00af3 Use the canonical check for reservation support. 2018-05-19 23:49:13 +00:00
eadler
1a493866e2 top(1): unconditionally assume we are running on FreeBSD
This allows us to remove a special header and more specifically just the
system headers we want.
2018-05-19 23:19:24 +00:00
eadler
de45bc2bd4 top(1): unconditionally provide 'FreeBSD' as a version 2018-05-19 23:04:42 +00:00
eadler
a11edc0bf3 top(1): assume that we're building on FreeBSD
This allows us to avoid the ifdefs that we set unconditionally.
2018-05-19 22:59:58 +00:00
eadler
360b1a07c6 top(1): bump WARNS to 1
Nothing else builds without errors yet, but 1 is better than 0
2018-05-19 22:45:43 +00:00
eadler
2ddbba1d82 top(1): Migrate top to usr.bin
We've been maintaining top(1) for a long time, and the upstream
hasn't existed/been used in similarly as long. Make it clear that we own
top(1)

Tested with 'make universe'. Everything passed except MIPS which failed
for unrelated reasons. Install also tested for amd64.

Reviewed by:		sbruno
No objections:		imp, mmacy
Differential Revision:	https://reviews.freebsd.org/D15387
2018-05-19 22:40:23 +00:00
nwhitehorn
1c2924af1f Avoid writing to the frame buffer in early boot on PowerPC if the CPU's
MMU is disabled.

This expands some earlier logic and avoids a number of potential problems:
1. The CPU may not be able to access the framebuffer in real mode (real
   mode does not necessarily encompass all available memory, especially
   under a hypervisor).
2. Real mode accesses generally assume cacheability, so it might not
   even have worked.
3. The difference in cacheability between real mode and later (and
   potentially earlier) points in the boot with the MMU on may cause
   ERAT parity problems, resulting in a machine check.

This fixes real-mode (usefdt=1) early boot on the G5 iMac, which was
previously broken as a result of issue #3. Late boot will require some
other fixups.
2018-05-19 22:04:54 +00:00
kib
f49d5cb80d Style.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-05-19 21:36:55 +00:00
cy
578899823c Conform to Berne Convention.
Prompted by:	Recent discussion
MFC after:	3 days
2018-05-19 21:26:07 +00:00
eadler
3c9d88ce65 mtest: build with WARNS=3 2018-05-19 20:57:22 +00:00
eadler
b1495183c8 my copyright: some minor adjustments
- remove "all rights reserved" from my copyright on my extensive
  contributions
- belatedly add my name to tuning.7 which I was a large contributor to
  several years ago

This commit can also serve as implicit permission for any formatting or
non-substantive changes that FreeBSD wishes to make in the future.
2018-05-19 20:35:15 +00:00
kib
d0801d183b Fix PCID+PTI pmap operations on Xen/HVM.
Install appropriate pti-aware shootdown IPI handlers, otherwise user
page tables do not get enough invalidations.  The non-pti handlers
were used so far.

Reported and tested by:	cperciva
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-05-19 20:28:59 +00:00
kib
bc1837178c Fix IBRS handling around MWAIT.
The intent was to disable IBPB and IBRS around MWAIT, and re-enable on
the sleep end.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-05-19 20:26:33 +00:00
markj
5594f37668 Enable kernel dump features in GENERIC for most platforms.
This turns on support for kernel dump encryption and compression, and
netdump. arm and mips platforms are omitted for now, since they are more
constrained and don't benefit as much from these features.

Reviewed by:	cem, manu, rgrimes
Tested by:	manu (arm64)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D15465
2018-05-19 19:53:23 +00:00
mmacy
e452eba561 ufs: remove cgbno variable where unused 2018-05-19 19:30:42 +00:00
mmacy
da84b7fa5a net: fix uninitialized variable warning 2018-05-19 19:00:04 +00:00
mmacy
3895dd38ec ctf dwarf: don't report "no dwarf entry" as if it were an error 2018-05-19 18:50:58 +00:00
emaste
67606bf14b muge(4): chase r333813 if_addr_lock rwlock to epoch + mutex
muge was committed to the tree in r333713 but not yet connected to the
tree, and it crossed paths with the migration to using ck.

Sponsored by:	The FreeBSD Foundation
2018-05-19 18:44:29 +00:00
mmacy
c86eaf24ce disable printing value of SKEIN_LOOP during standard out,
not useful information
2018-05-19 18:27:14 +00:00
mmacy
4b6b383720 bhnd nvram map: don't write "variable records written" to standard out by default
Add -v (verbose) option for the developers. The rest of us
derive no value from this information.
2018-05-19 18:15:41 +00:00
imp
fe24edb902 Restore the all rights reserved language. Put it on each of the prior
two copyrights. The line originated with the Berkeely Regents, who
we have not approached about removing it (it's honestly too trivial
to be worth that fight). Restore it to rwatson's line as well. He
can decide if he wants it or not on his own. Matt clearly doesn't
want it, per project preference and his own statements on IRC.

Noticed by: rgrimes@
2018-05-19 17:29:57 +00:00
mmacy
d814acfa7c mp_ring: fix i386
Even though 64-bit atomics are supported on i386 there are panics
indicating that the code does not work correctly there. Switch
to mutex based variant (and fix that while we're here).

Reported by:	pho, kib
2018-05-19 16:44:12 +00:00
trasz
b8b0cac823 Fix whitespace; no functional changes.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-19 15:18:15 +00:00
trasz
529f8089e8 Add #defines for vendor/product USB IDs. No functional changes.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-19 15:11:24 +00:00
emaste
4c75e41c26 Remove duplicate cap_no_rights from r333874
Archs using in-tree gcc were broken with `warning: redundant
redeclaration of 'cap_no_rights' [-Wredundant-decls]`.

Sponsored by:	The FreeBSD Foundation
2018-05-19 11:37:02 +00:00
trasz
fa1fe9de3c Permit "(", ")", ":", and "/" in USB string descriptors.
This way we can properly show descriptors with URLs in them.

Reviewed by:	hselasky@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-19 10:49:51 +00:00
mmacy
d365279c38 Unbreak BeagleBone Black boot by collapsing 29 SYSINITs in to 1
Reported by:	ilya at bakulin.de
2018-05-19 07:31:35 +00:00
mmacy
36a5772d1a intr unbreak KTR/LINT build 2018-05-19 07:04:43 +00:00