Commit Graph

255514 Commits

Author SHA1 Message Date
Marius Strobl
5db1ed2f33 ohci(4): remove support for Sun PCIO-2 USB controllers
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:46 +01:00
Marius Strobl
28ca6c20cf gallant12x22(4): remove obsolete font
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Marius Strobl
9cca83b6db mk48txx(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Marius Strobl
d141239c56 mc146818(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Marius Strobl
5731987b71 mips: fix build w/ TICK_USE_MALTA_RTC defined
This was mainly broken by 7e82012aff and
r178192 respectively.
Also, remove unused #include.
2020-12-25 19:47:45 +01:00
Konstantin Belousov
7d7fad7bd9 Add tcgetwinsize(3) and tcsetwinsize(3) to termios
These functions get/set tty winsize respectively, and are trivial wrappers
around corresponding termio ioctls.

The functions are expected to be a part of POSIX.1 issue 8:
https://www.austingroupbugs.net/view.php?id=1151#c3856.
They are currently available in NetBSD and in musl libc.

PR:	251868
Submitted by:	Soumendra Ganguly <soumendraganguly@gmail.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27650
2020-12-25 20:43:09 +02:00
Conrad Meyer
f7cd7fe51c sys/contrib/zstd: Import zstd 1.4.8
Merge commit 'f6ae97673c28bdb9ae795bd235ab6f26f2536a2d' into main

Changes from 1.4.5:
  * https://github.com/facebook/zstd/releases/tag/v1.4.8
  * https://github.com/facebook/zstd/releases/tag/v1.4.7
  (and there was no public v1.4.6)

Conflicts:
	sys/contrib/zstd/lib/common/zstd_internal.h (new ZSTD_NO_INTRINSICS)
2020-12-25 07:42:41 -08:00
Philip Paeps
dc505d53dc contrib/tzdata: import tzdata 2020e
Changes: https://github.com/eggert/tz/blob/2020e/NEWS

MFC after:    insta-MFC
2020-12-25 23:16:38 +08:00
Michal Meloun
aa76f0c397 PMC: remove now orphaned PMC for INTEL XScale processors.
Support for XScale architecture has been deleted in FreeBSD 13.
2020-12-25 15:21:53 +01:00
Alexander V. Chernikov
f5baf8bb12 Add modular fib lookup framework.
This change introduces framework that allows to dynamically
 attach or detach longest prefix match (lpm) lookup algorithms
 to speed up datapath route tables lookups.

Framework takes care of handling initial synchronisation,
 route subscription, nhop/nhop groups reference and indexing,
 dataplane attachments and fib instance algorithm setup/teardown.
Framework features automatic algorithm selection, allowing for
 picking the best matching algorithm on-the-fly based on the
 amount of routes in the routing table.

Currently framework code is guarded under FIB_ALGO config option.
An idea is to enable it by default in the next couple of weeks.

The following algorithms are provided by default:
IPv4:
* bsearch4 (lockless binary search in a special IP array), tailored for
  small-fib (<16 routes)
* radix4_lockless (lockless immutable radix, re-created on every rtable change),
  tailored for small-fib (<1000 routes)
* radix4 (base system radix backend)
* dpdk_lpm4 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized
  for large-fib (D27412)
IPv6:
* radix6_lockless (lockless immutable radix, re-created on every rtable change),
  tailed for small-fib (<1000 routes)
* radix6 (base system radix backend)
* dpdk_lpm6 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized
  for large-fib (D27412)

Performance changes:
Micro benchmarks (I7-7660U, single-core lookups, 2048k dst, code in D27604):
IPv4:
8 routes:
  radix4: ~20mpps
  radix4_lockless: ~24.8mpps
  bsearch4: ~69mpps
  dpdk_lpm4: ~67 mpps
700k routes:
  radix4_lockless: 3.3mpps
  dpdk_lpm4: 46mpps

IPv6:
8 routes:
  radix6_lockless: ~20mpps
  dpdk_lpm6: ~70mpps
100k routes:
  radix6_lockless: 13.9mpps
  dpdk_lpm6: 57mpps

Forwarding benchmarks:
+ 10-15% IPv4 forwarding performance (small-fib, bsearch4)
+ 25% IPv4 forwarding performance (full-view, dpdk_lpm4)
+ 20% IPv6 forwarding performance (full-view, dpdk_lpm6)

Control:
Framwork adds the following runtime sysctls:

List algos
* net.route.algo.inet.algo_list: bsearch4, radix4_lockless, radix4
* net.route.algo.inet6.algo_list: radix6_lockless, radix6, dpdk_lpm6
Debug level (7=LOG_DEBUG, per-route)
net.route.algo.debug_level: 5
Algo selection (currently only for fib 0):
net.route.algo.inet.algo: bsearch4
net.route.algo.inet6.algo: radix6_lockless

Support for manually changing algos in non-default fib will be added
soon. Some sysctl names will be changed in the near future.

Differential Revision: https://reviews.freebsd.org/D27401
2020-12-25 11:33:17 +00:00
Xin LI
760dbe84ab Don't set more_data which is never used.
MFC after:	2 weeks
2020-12-24 18:49:12 -08:00
Conrad Meyer
f6ae97673c Import zstd 1.4.8 2020-12-24 16:21:42 -08:00
Rick Macklem
79302a6304 mount_nfs(8): add a description for the new "tlscertname" option
commit 665b1365fe added a new NFS mount option that is used to set a
non-default X.509 certificate, that can be used for nfs-over-tls NFS
mounts.
This patch adds a description for it to the man page.

Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D27733
2020-12-24 14:20:06 -08:00
Kristof Provost
3b5008b065 Fix amd64 GENERIC-MMCCAM kernel build
c4df8cbfde removed bvmconsole and
bvmdebug, but missed the bvmconsole entry in GENERIC-MMCCAM.
2020-12-24 22:30:52 +01:00
Ryan Libby
322a188d45 wmt: quiet gcc -Wparentheses
Reviewed by:	wulf
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D27767
2020-12-24 12:49:27 -08:00
Ryan Libby
2fb4a03d55 rtsock: quiet -Wunused-variable in LINT-NOIP kernels
Fixup after r368769 / d68fb8d978.

Reported by:	mjg
Reviewed by:	melifaro
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D27730
2020-12-24 12:34:18 -08:00
Ryan Libby
1ee339e257 openzfs: fix gcc in-kernel builds
Fix gcc builds of in-kernel modules using CDDL_CFLAGS (e.g. options
ZFS).

 - Remove nonexistent include dirs for -Wmissing-include-dirs
 - Suppress -Wnested-externs, a useless warning
 - Sort and uniq warning flags while here

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D27684
2020-12-24 12:34:18 -08:00
Vladimir Kondratyev
30f34a5193 ukbd(4): Push LED events in ioctl handler rather than in xfer callback
If LED state is set through evdev interface, than asynchronous nature
of USB transfer callback can lead to change of order of events echoed
back to userland as it causes LED events to be echoed with some lag.

Fix that with echoing of LED events synchronously in ioctl handler.

Reviewed by:	hselasky
Obtained from:	sysutils/iichid
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D27750
2020-12-24 22:08:04 +03:00
Vladimir Kondratyev
769935a4ed ukbd(4): Do not serialize evdev key events
Unlike AT keyboards, HID devices are able to send all pc105 key
states within a single report. Let evdev to transmit all key state
changes within a single report too.

Reviewed by:	hselasky
Obtained from:	sysutils/iichid
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D27749
2020-12-24 21:56:33 +03:00
Guangyuan Yang
a1d7836752 mmap(2): Update .Dd missed in the last commit
PR:		252097
MFC after:	1 week
2020-12-24 14:14:56 +00:00
Guangyuan Yang
81720dbab2 mmap(2): Fix a typo
PR:             252097
MFC after:      1 week
Reported by:    Nick Frampton <nick.frampton@akips.com>
2020-12-24 14:08:34 +00:00
Hans Petter Selasky
a8261b70e6 Add support for USB-C and TB3 Gen2 to if_ure(4).
Add support for LAN found on Thinkpad USB-C and Thunderbolt Gen 2
docking stations.

Submitted by:	ali.abdallah@suse.com
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-12-24 12:59:19 +01:00
Philip Paeps
b239e69795 Import tzdata 2020e 2020-12-24 11:19:15 +08:00
Cy Schubert
7d8ff32452 Sync ippool.8 man page synopsis with reality and the rest of the
man page..

MFC after:	3 days
2020-12-23 17:04:34 -08:00
Rick Macklem
2ed0c8d801 version bump for commit 665b1365fe
The commit changed the internal API between the NFS and kernel RPC
modules.  Bump the version so that all modules get rebuilt from
sources.
2020-12-23 14:41:47 -08:00
Vladimir Kondratyev
c26a348427 wmt(4): Use sys/param.h macroses to work with bit fields
Obtained from:	sysutils/iichid
2020-12-24 01:27:17 +03:00
Vladimir Kondratyev
18a3b77e22 wmt(4): Refactor 'Contact Count Maximum' parsing
That is done mainly to reduce diff with upstream.

Obtained from:	sysutils/iichid
2020-12-24 01:26:06 +03:00
Vladimir Kondratyev
501022d3a0 wmt(4): Add support for hardware timestamp reporting
Hardware timestamp reporting is disabled by default as it produces many
extra events which are not handled by consumers like libinput.
Add hw.usb.wmt.timestamps=1 tunable to loader.conf to enable it.

Obtained from:	sysutils/iichid
2020-12-24 01:24:53 +03:00
Vladimir Kondratyev
8de78df54d wmt(4): Add support for touchpads
Obtained from:	sysutils/iichid
2020-12-24 01:22:56 +03:00
Vladimir Kondratyev
7eae6aab7d wmt(4): Fetch and parse HID report descriptor only one time
Do it at probe stage and reuse results during attach.

Obtained from:	sysutils/iichid
2020-12-24 01:21:53 +03:00
Vladimir Kondratyev
0ba4b5ff4c wmt(4): Add support for hybrid mode
In Hybrid mode, the number of contacts that can be reported in one
report is less than the maximum number of contacts that the device
supports.  For example, a device that supports a maximum of 4
concurrent physical contacts, can set up its top-level collection to
deliver a maximum of two contacts in one report.  If four contact
points are present, the device can break these up into two serial
reports that deliver two contacts each.

Obtained from:	sysutils/iichid
2020-12-24 01:19:41 +03:00
Rick Macklem
665b1365fe Add a new "tlscertname" NFS mount option.
When using NFS-over-TLS, an NFS client can optionally provide an X.509
certificate to the server during the TLS handshake.  For some situations,
such as different NFS servers or different certificates being mapped
to different user credentials on the NFS server, there may be a need
for different mounts to provide different certificates.

This new mount option called "tlscertname" may be used to specify a
non-default certificate be provided.  This alernate certificate will
be stored in /etc/rpc.tlsclntd in a file with a name based on what is
provided by this mount option.
2020-12-23 13:42:55 -08:00
Oleksandr Tymoshenko
e523262107 [if_dwc] add support for multi-descriptor packets in TX path
Original if_dwc driver used m_defrag as an implementation shortcut but on
1000Mb networks it affects performance. Implement multi-descriptor support for
TX path.

Tested on RK3399-Firefly, patch adds ~15% of network throughput.

Reviewed By:	manu
Differential Revision:	https://reviews.freebsd.org/D27520
2020-12-23 12:29:29 -08:00
Mitchell Horne
962c06c5a3 gdb(4) fix x86 signal reporting
The existing values correspond to x86 exception vector numbers, but the
trap numbers used in the kernel do not match these 1-to-1. Prefer the
definitions from x86/trap.h, as they are what actually get passed to
kdb_trap(). This is of little consequence, as gdb_cpu_signal() only
reports the trap reason (signal number) to the gdb client.

This is limited to the subset of trap values for which kdb_trap() is
reachable.

Reviewed by:	kib
Discussed with:	jhb
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27645
2020-12-23 15:40:14 -04:00
Mitchell Horne
3f3cc995a3 gdb(4): allow bulk write of registers
Add support for the remote 'G' packet. This is not widely used by gdb
when 'P' is supported, but is technically required by any remote gdb
stub implementation [1].

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.html

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
NetApp PR:	44
Differential Revision:	https://reviews.freebsd.org/D27644
2020-12-23 14:37:05 -04:00
Mitchell Horne
fd29833d9a gdb(4): handle single register read packets
We support bulk reads of the register set, but not reading specific
registers via the 'p' packet. This is useful at least for the 'call'
command in gdb.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
NetApp PR:	44
Differential Revision:	https://reviews.freebsd.org/D27644
2020-12-23 14:36:08 -04:00
Robert Wing
c4df8cbfde Remove bvmconsole and bvmdebug.
Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed.

This also removes the '-b' and '-g' flag from bhyve(8). These two flags were
marked deprecated in r368519.

Reviewed by:    grehan, kevans
Approved by:    kevans (mentor)
Differential Revision:  https://reviews.freebsd.org/D27490
2020-12-23 17:15:23 -09:00
Ryan Moeller
401f82df48 sbin/sysctl: Style fix
Remove parameter names from function prototype to match other
prototypes in the file.

Sponsored by:	iXsystems, Inc.
2020-12-23 12:45:11 -05:00
Ryan Moeller
a5ec1dd453 sbin/sysctl: Always honor skip in sysctl_all
Fix broken CTLFLAG_SKIP when present on the first child of the requested
node.

We don't need to ignore skip for the first node because in sysctl_all()
we've implicitly visited the first node already when oid is specified.
The first call to show_var() in here is after we have iterated to the
next node. When the command line specifically requests a non-node sysctl
we go straight into show_var() without calling sysctl_all().

Reported by:	jhb
Reviewed by:	jhb
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D27674
2020-12-23 12:42:38 -05:00
Michael Tuexen
0ec2ce0d32 Improve input validation for parameters in ASCONF and ASCONF-ACK chunks
Thanks to Tolya Korniltsev for drawing my attention to this part of the
code by reporting an issue for the userland stack.
2020-12-23 18:03:47 +01:00
Warner Losh
878d53410f UPDATING: Announce git transition
Add an entry for the transition to git.
2020-12-23 09:40:45 -07:00
Mark Johnston
3b216bfb6c qatfw: Fix firmware autoloading for qat_c2xxx devices
r368193 was suppsed to rename the MOF firmware image, but the
qat_c2xxxfw makefile defined the two images in the wrong order so the
MMP image was renamed instead.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2020-12-23 11:36:45 -05:00
Mark Johnston
92be2847e8 rtsock: Avoid copying uninitialized padding bytes
When copying sockaddrs out to userspace, we pad them to a multiple of
the platform alignment (sizeof(long)).  However, some sockaddr sizes,
such as struct sockaddr_dl, are not an integer multiple of the
alignment, so we may end up copying out uninitialized bytes.

Fix this by always bouncing through a pre-zeroed sockaddr_storage.

Reported by:	KASAN
Reviewed by:	melifaro
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27729
2020-12-23 11:16:40 -05:00
Mark Johnston
a7a7c306bf md: Fix a read-after-free in BIO_GETATTR handling
g_handleattr_int() consumes the bio if the attribute matches, so when we
check bp->bio_cmd bp may have been freed.

Move GETATTR handling to a separate function to avoid the problem.  We
do not need to set bio_completed for such bios, g_handleattr_int() will
handle it.  Also remove the setting of bio_resid before the
devstat_end_transaction_bio() call.  All of the md(4) bio handlers set
bio_resid already.

Reported by:	KASAN
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27724
2020-12-23 11:16:40 -05:00
Mark Johnston
ace3d9475c ffs: Avoid out-of-bounds accesses in the fs_active bitmap
We use a bitmap to track which cylinder groups have changed between
snapshot creation and filesystem suspension.  The "legs" of the bitmap
are four bytes wide (see ACTIVESET()) so we must round up the allocation
size to a multiple of four bytes.

I believe this bug is harmless since UMA/kmem_* will both pad the
allocation and zero the full allocation.  Note that malloc() does inline
zeroing when the allocation size is known at compile-time.

Reported by:	pho (using KASAN)
Reviewed by:	kib, mckusick
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27731
2020-12-23 11:16:40 -05:00
Alan Somers
0120603891 AIO: remove the kaiocb->bio linkage
Vectored aio will require each aiocb to be associated with multiple
bios, so we can't store a link to the latter from the former.  But we
don't really need to.  aio_biowakeup already knows the bio it's using,
and the other fields can be stored within the bio and/or buf itself.

Also, remove the unused kaiocb.backend2 field.

Reviewed By:	kib
Differential Revision: https://reviews.freebsd.org/D27682
2020-12-23 16:06:15 +00:00
Andrew Turner
449ebf135b Move the literal pool to the end of asm functions
This keeps the data at the end of a function, near to where it's used.
Sponsored by:	Innovate UK
2020-12-23 13:57:25 +00:00
Andrew Turner
edb48ff6e7 Mark all arm64 locore functions with ENTRY/LENTRY
It is useful to know where these are within the code, and will be
needed by later changes.

Sponsored by:	Innovate UK
2020-12-23 13:57:25 +00:00
Andrew Turner
6f8866af34 Add LENTRY and LEND to arm64
These allow us to mark local asm functions as a function

Sponsored by:	Innovate UK
2020-12-23 13:57:25 +00:00
Ed Maste
a62107ed19 make the git commit message template more compact
git's default commit message includes the list of staged, unstaged, and
untracked files; adding our metadata tags and then their descriptions
made for a very long template.

Move the descriptions to the metadata lines themselves.

Reviewed by:	bcr
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27664
2020-12-23 08:58:17 -05:00