Commit Graph

246831 Commits

Author SHA1 Message Date
Xin LI
e87e283ce3 Remove unused includes.
MFC after:	2 weeks
2019-12-22 05:44:29 +00:00
Jeff Roberson
bef91632da Move vm_fault busy logic into its own function for clarity and re-use by
later changes.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D22820
2019-12-22 04:21:16 +00:00
Conrad Meyer
85b4c344c8 fstyp(8): Show exFAT volume labels with -l flag
exfat is fundamentally the same design as fat32.  The superblock differs
marginally, and there are some additional optional features irrelevant to
fstype(8); the structure of dirents has changed slightly to enable, among
other things, larger files; the directory entries are no longer DOS 8.3
ASCII or local 8-bit encoding, but instead explicitly UCS-2-LE.

(As a result, this change uses iconv to convert a found exfat volume label
to the user's locale.)

Locating the volume label is identical to FAT32: locate the root directory
and walk through dirents until you find a volume label.  Like FAT32, follow
the FAT chain between root directory clusters as necessary.

PR:		242225
Reported by:	Victor Sudakov <vas AT sibptus.ru>
2019-12-22 03:19:17 +00:00
Kirk McKusick
b947472d42 Fix typo in hastd.8 manual page.
Reported by: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
MFC after:   3 days
2019-12-22 01:22:51 +00:00
Rick Macklem
e68a89359a Update the nfsstat man page to reflect r355992.
r355992 added listing of NFSv4.2 procedure and operation counts.
This patch updates the nfsstat.1 man page to reflect that change.

This is a content change.
2019-12-22 00:36:22 +00:00
Rick Macklem
309c8f7673 Update nfsstat to list the NFSv4.2 procedures and operations.
r355677 added NFSv4.2 support to the NFS client and server. It also updated
the nfsstats structure to keep counts for the new procedures (client) and
operations (server) added for NFSv4.2.
This patch updates the "-E" option of nfsstat so that it lists counts for
these new procedures and operations.
2019-12-22 00:12:22 +00:00
Alan Cox
50079417a5 Micro-optimize the control flow in _pmap_unwire_ptp(), and eliminate
unnecessary parentheses.

Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22893
2019-12-21 22:32:24 +00:00
Cy Schubert
31bfaf17a7 MFV r355890:
Fix libpcap issue #893: check for invalid IPv4 addresses.

This fixes errors such as:

tcpdump -i lagg0 net 999.999.999.999

This was originally discovered on a Red Hat 7.7 server and verified
to also be a bug on FreeBSD.

Obtained from:	https://github.com/the-tcpdump-group/libpcap/commit/ \
		07070918d5e81a515315b395f334e52589fe0fb
Fixed by:	https://github.com/guyharris
MFC after:	2 weeks
2019-12-21 21:05:53 +00:00
Cy Schubert
39e421e8ce MFV r353143 (phillip):
Update tcpdump from 4.9.2 to 4.9.3.

MFC after:	2 weeks
2019-12-21 21:02:50 +00:00
Cy Schubert
57e22627f9 MFV r353141 (by phillip):
Update libpcap from 1.9.0 to 1.9.1.

MFC after:	2 weeks
2019-12-21 21:01:03 +00:00
Mark Johnston
d07c571806 Fix VPO_UNMANAGED handling in vm_page_reclaim_run() after r353540.
When allocating a replacement page we must clear VPO_UNMANAGED since we
only ever reclaim pages from managed objects.  vm_page_replace() does
not handle this for us.

Sprinkle some assertions to help catch this sort of issue.

Reported by:	pho
Reviewed by:	alc, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D22868
2019-12-21 19:04:05 +00:00
Gleb Popov
3f791e31fd Don't shift 32-bit value by more than 32 bits.
PR:		207854
Approved by:	emaste
2019-12-21 11:38:48 +00:00
Philip Paeps
fc8ae86a8f top: display battery capacity remaining
Submitted by: Antranig Vartanian <antranigv@freebsd.am>
Reviewed by:  imp, philip
Differential Revision:        https://reviews.freebsd.org/D22871
2019-12-21 05:03:21 +00:00
Justin Hibbits
1c8102d850 powerpc: Only build mpc85xx i2c driver for mpc85xx
No need to build it for every other platform.
2019-12-21 04:44:17 +00:00
Ryan Libby
f157ca4696 googletest: pick from upstream: Don't allow signed/unsigned wchar_t in gcc 9 and later
Pick 711fccf8317b4fb7adc21c00fc1e20823c5d875f from upstream googletest:

    Don't allow signed/unsigned wchar_t in gcc 9 and later

Upstream pull request:	https://github.com/google/googletest/pull/2270

Sponsored by:	Dell EMC Isilon
2019-12-21 02:44:50 +00:00
Ryan Libby
79457a8ad1 jemalloc: pick from upstream: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC
Pick 2d6d099fed05b1509e81e54458516528bfbbf38d from upstream jemalloc:

    Fix GCC-9.1 warning with macro GET_ARG_NUMERIC

    GCC-9.1 reports following error when trying to compile file
    src/malloc_io.c and with CFLAGS='-Werror' :

    src/malloc_io.c: In function ‘malloc_vsnprintf’:
    src/malloc_io.c:369:2: error: case label value exceeds maximum value for type [-Werror]
      369 |  case '?' | 0x80:      \
          |  ^~~~
    src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’
      581 |     GET_ARG_NUMERIC(val, 'p');
          |     ^~~~~~~~~~~~~~~
    ...
    <snip>
    cc1: all warnings being treated as errors
    make: *** [Makefile:388: src/malloc_io.sym.o] Error 1

    The warning is reported as by default the type 'char' is 'signed char'
    and or-ing 0x80 will turn the case label char negative which will be
    beyond the printable ascii range (0 - 127).

    The patch fixes this by explicitly casting the 'len' variable as
    unsigned char' inside the 'switch' statement so that value of
    expression " '?' | 0x80 " falls within the legal values of the
    variable 'len'.

Discussed with:	jasone (maintainer)
Sponsored by:	Dell EMC Isilon
2019-12-21 02:44:38 +00:00
Ryan Libby
47ce20aef1 libdevdctl: g++9 avoid Wdeprecated-copy
g++9 now warns about having defined an assignment operator but using the
default copy constructor, or vice versa.  Avoid the issue in libdevdctl
by just using the default assignment operator too.

Reviewed by:	asomers, dim
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22887
2019-12-21 02:44:26 +00:00
Ryan Libby
fa19b250bd dtrace: avoid gcc9 Walloca-larger-than
gcc9 grew a new warning for unbounded allocas, such as the one in
dt_options_load.  Remove both uses of alloca in dt_options.c.

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22880
2019-12-21 02:44:13 +00:00
Ryan Libby
36947e1f4d Declare packed struct ata_params as 2-byte-aligned
This avoids gcc9 warning about unaligned access to the structure when
casting to uint16_t pointer type.

Submitted by:	imp
Reviewed by:	imp
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22888
2019-12-21 02:44:00 +00:00
Ryan Libby
fc41af14c8 gcc9: quiet Waddress-of-packed-member for user build
Disable the warning for WARNS <= 3.  This is lame, but it's what we
already do for the clang build.

Reviewed by:	dim
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22889
2019-12-21 02:43:49 +00:00
Ryan Libby
77acc3cfbc gcc9: quiet Waddress-of-packed-member for kernel build
This is lame, but it's what we already do for the clang build.  We take
misaligned pointers into network header structures in many places.

Reviewed by:	ian
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22876
2019-12-21 02:43:37 +00:00
Ryan Libby
4c235c0083 gcc: quiet Wattribute for no_sanitize("address")
This is an unfortunate instance where the __has_attribute check does
not function usefully.  Gcc does have the attribute, but for gcc it only
applies to functions, not variables, and trying to apply it to a
variable generates Wattribute.  So far we only apply the attribute to
variables.  Only enable the attribute for clang, for now.

Reviewed by:	Anton Rang <rang at acm.org>
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22875
2019-12-21 02:43:20 +00:00
Simon J. Gerraty
0e47020f7f Avoid unused vars when VE_ECDSA_HASH_AGAIN undefined
Reviewed by:	emaste
MFC after:	1 week
2019-12-20 21:56:28 +00:00
Rick Macklem
9449898858 Update the man page to reflect the addition of NFSv4.2 (r355677).
Update all the references to NFSv4.1, so that they apply to NFSv4.1 and
NFSv4.2. Also, change the MDS->DS mounts to use NFSv4.2, so that both
versions of the protocol can be used against the server with pNFS enabled.

This is a content change.
2019-12-20 21:45:20 +00:00
Dimitry Andric
2ec2bb18aa Consolidate FREEBSD-Xlist files of different llvm sub-projects into one. 2019-12-20 21:42:10 +00:00
Rick Macklem
452588d3e5 Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and Flexible File layout, plus clarify
when vfs.nfsd.flexlinuxhack needs to be set for Linux pNFS clients.
Also update the man page to reflect the addition of SpaceUsed to the
attributes stored in the extended attribute on the MDS (r354158).

This is a content change.
2019-12-20 21:41:33 +00:00
Dimitry Andric
1dbedf2828 Merge diff elimination updates from r355953 into vendor/llvm-project. 2019-12-20 21:33:12 +00:00
Rick Macklem
fa40c59d21 Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and associated RFCs and note new features
present in NFSv4.2.

This is a content change.
2019-12-20 21:31:08 +00:00
Rick Macklem
1fd129c9ff Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and associated RFCs.
Also clarify when a Linux client needs to set vfs.nfsd.flexlinuxhack if
a pNFS server is in use.

This is a content change.
2019-12-20 21:25:51 +00:00
Dimitry Andric
c80d8fac37 Eliminate differences between Git version of llvm-project master, and
our vendor import in ^/vendor/llvm-project/master.
2019-12-20 21:21:52 +00:00
Dimitry Andric
2be36b3437 Merge empty dir updates from r355950 in vendor/llvm-project. 2019-12-20 21:18:34 +00:00
Dimitry Andric
39d4256a58 Remove empty dirs under vendor/llvm-project, which are no longer stored
in git.
2019-12-20 21:12:01 +00:00
Conrad Meyer
68b97d40fb random(4): Flip default Fortuna generator over to Chacha20
The implementation was landed in r344913 and has had some bake time (at
least on my personal systems).  There is some discussion of the motivation
for defaulting to this cipher as a PRF in the commit log for r344913.

As documented in that commit, administrators can retain the prior (AES-ICM)
mode of operation by setting the 'kern.random.use_chacha20_cipher' tunable
to 0 in loader.conf(5).

Approved by:	csprng(delphij, markm)
Differential Revision:	https://reviews.freebsd.org/D22878
2019-12-20 21:11:00 +00:00
Alan Cox
7c237b7c3a Correct a mistakenly inverted condition in r355833.
Noticed by:	kib
X-MFC with:	r355833
2019-12-20 20:46:26 +00:00
Dimitry Andric
c940aad3f6 Copy llvm vendor/*/dist to vendor/llvm-project/master
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.
2019-12-20 20:44:58 +00:00
Ed Maste
37516d3b1b add LDNS build knob dependency on OPENSSL
Reported by:	Michael Dexter's run of the Build Options Survey
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-12-20 20:23:59 +00:00
Mark Johnston
3f197b134c Deduplicate code between if_delgroup() and if_delgroups().
Fix some style in if_addgroup().  No functional change intended.

Reviewed by:	hselasky
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D22892
2019-12-20 20:15:34 +00:00
Mark Johnston
fb3a540ba4 mii(4): Fix ivars leak when the bus device or bus children detach.
PR:		242727
Submitted by:	ghuckriede@blackberry.com
MFC after:	1 week
2019-12-20 20:10:26 +00:00
Dimitry Andric
0b57cec536 Move all sources from the llvm project into contrib/llvm-project.
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
2019-12-20 19:53:05 +00:00
Mark Johnston
718ef55ec7 Fix a memory leak in if_delgroups() introduced in r334118.
PR:		242712
Submitted by:	ghuckriede@blackberry.com
MFC after:	3 days
2019-12-20 17:21:57 +00:00
Kyle Evans
eee7706389 vt: store a pointer to the keyboard instead of index
This effectively reverts r355935, but is functionally equivalent. We gain no
benefit from storing the index and repeatedly fetching the keyboard with
`kbd_get_keyboard` when we need it. We'll be notified when it's going away
so we can clean up the pointer.

All existing references were trivially converted. Only once instance
actually needed the index.
2019-12-20 17:15:09 +00:00
Kyle Evans
db41cd0e06 Kill off dummy kbd drivers
As far as I can tell, these are an artifact of times when linker sets
couldn't be empty, otherwise the kernel build would fail due to unresolved
symbols. hselasky fixed this in r268138, and I've audited the kbd portions
to make sure nothing would blow up due to the empty linker set and
successfully compiled+ran a kernel with no keyboard support at all.

Kill them off now since they're no longer required.

MFC after:	1 week
2019-12-20 16:22:14 +00:00
Kyle Evans
4eac76656e vt: fix post-boot keyboard attachment
With absolutely no keyboards attached and no kbdmux in kernel, we descend
down this error path. 0 is a valid keyboard index, so leaving
vd->vd_keyboard at 0 when there's no keyboard found is objectively wrong as
later attachment of a keyboard will fail -- it gets index 0, and vt thinks
it's already using that keyboard.

This is decidedly the corniest of corner cases, but it's easy enough to get
correct that we should do so.

Tested in a kernel without atkbdc, atkbd, psm, kbdmux, ukbd, hyperv then
loading ukbd post-boot and attaching a usb keyboard.
2019-12-20 16:20:38 +00:00
Kyle Evans
2dfc696ef1 VERSATILEPB: Unbreak after r355796
r355796 provided genkbd_get_fkeystr/genkbd_diag private and the default for
get_fkeystr/diag if these members are NULL. Follow suit here.
2019-12-20 15:28:40 +00:00
Michael Tuexen
6088175a18 Improve input validation for some parameters having a too small
reported length.

Thanks to Natalie Silvanovich from Google for finding one of these
issues in the SCTP userland stack and reporting it.

MFC after:		1 week
2019-12-20 15:25:08 +00:00
Conrad Meyer
548dca90ae random(4): Fortuna: Enable concurrent generation by default for 13
Flip the knob added in r349154 to "enabled."  The commit message from that
revision and associated code comment describe the rationale, implementation,
and motivation for the new default in detail.  I have dog-fooded this
configuration on my own systems for six months, for what that's worth.

For end-users: the result is just as secure.  The benefit is a faster, more
responsive system when processes produce significant demand on random(4).

As mentioned in the earlier commit, the prior behavior may be restored by
setting the kern.random.fortuna.concurrent_read="0" knob in loader.conf(5).

This scales the random generation side of random(4) somewhat, although there
is still a global mutex being shared by all cores and rand_harvestq; the
situation is generally much better than it was before on small CPU systems,
but do not expect miracles on 256-core systems running 256-thread full-rate
random(4) read.  Work is ongoing to address both the generation-side (in
more depth) and the harvest-side scaling problems.

Approved by:	csprng(delphij, markm)
Tested by:	markm
Differential Revision:	https://reviews.freebsd.org/D22879
2019-12-20 08:31:23 +00:00
Philip Paeps
15c023175f iicoc: fix the build on PCI machines
Pointy hat to:   philip
2019-12-20 05:15:03 +00:00
Philip Paeps
1b6dd6d772 Print upper 32 bits in devmap table entries
If the devmap entry uses the upper 32 bits they wouldn't be printed in
devmap_dump_table(). This fixes that.

Submitted by:   Nicholas O'Brien <nickisobrien_gmail.com>
Sponsored by:   Axiado
2019-12-20 03:40:53 +00:00
Philip Paeps
6386edbb5a iicoc: add FDT bus attachment
This adds support for OpenCores I2C master controllers on FDT systems.

Reviewed by:    kp
Sponsored by:   Axiado
2019-12-20 03:40:50 +00:00
Philip Paeps
eb95689a82 iicoc: split up common core and PCI bus specifics
The OpenCores I2C IP core can be found on any bus.  Split out the PCI
bus specifics into their own file, only compiled on systems with PCI.

Reviewed by:    kp
Sponsored by:   Axiado
2019-12-20 03:40:46 +00:00