de1ea2d5 kp Oct. 7, 2022, 11:45 a.m.
The vxlan interface encapsulates the Ethernet frame by prepending IP/UDP
and vxlan headers. For statistics, only the payload, i.e. the
encapsulated (inner) frame should be counted.

Event:		Aberdeen Hackathon 2022
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D36855
cgit
62d42655 hselasky Oct. 7, 2022, 11:41 a.m.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
cgit
8758aabb hselasky Oct. 7, 2022, 11:41 a.m.
Depends on "options USB_DEBUG".

Suggested by:	koobs@
MFC after:	1 week
Sponsored by:	NVIDIA Networking
cgit
1c2be25f bcr Oct. 7, 2022, 11:32 a.m.
The read system call will return EINVAL if the current file offset is
not a multiple of the block size. This also applies to write(2). Add an
entry for EINVAL about this error to both man pages.

PR:			91149
Event:			Aberdeen Hackathon 2022
Differential Revision:	https://reviews.freebsd.org/D24617
cgit
53af6903 glebius Oct. 7, 2022, 2:24 a.m.
Mechanically cleanup INP_TIMEWAIT from the kernel sources.  After
0d7445193ab, this commit shall not cause any functional changes.

Note: this flag was very often checked together with INP_DROPPED.
If we modify in_pcblookup*() not to return INP_DROPPED pcbs, we
will be able to remove most of this checks and turn them to
assertions.  Some of them can be turned into assertions right now,
but that should be carefully done on a case by case basis.

Differential revision:	https://reviews.freebsd.org/D36400
cgit
51c01842 glebius Oct. 7, 2022, 2:24 a.m.
9c3507f9 glebius Oct. 7, 2022, 2:24 a.m.
0d744519 glebius Oct. 7, 2022, 2:22 a.m.
The memory savings the tcptw brought back in 2003 (see 340c35de6a2) no
longer justify the complexity required to maintain it.  For longer
explanation please check out the email [1].

Surpisingly through almost 20 years the TCP stack functionality of
handling the TIME_WAIT state with a normal tcpcb did not bitrot.  The
existing tcp_input() properly handles a tcpcb in TCPS_TIME_WAIT state,
which is confirmed by the packetdrill tcp-testsuite [2].

This change just removes tcptw and leaves INP_TIMEWAIT.  The flag will
be removed in a separate commit.  This makes it easier to review and
possibly debug the changes.

[1] https://lists.freebsd.org/archives/freebsd-net/2022-January/001206.html
[2] https://github.com/freebsd-net/tcp-testsuite

Differential revision:	https://reviews.freebsd.org/D36398
cgit
f48114b6 sjg Oct. 7, 2022, 12:51 a.m.
When mac_veriexec is enforcing, we won't run unverified binaries,
don't let ldd examine them either.

Reviewed by:	stevek emaste
MFC after:	1 week
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D36897
cgit
b05b1ecb mhorne Oct. 6, 2022, 10:04 p.m.
There is no such error code.

Fixes:	1d5ebad06c20b ("pmap: optimize MADV_WILLNEED on existing superpages")
cgit
1f9cc5ff mhorne Oct. 6, 2022, 10:04 p.m.
Page table pages are never freed from the kernel pmap, instead they are
zeroed when a range is unmapped. This allows future mappings to be
constructed more quickly. Detect this scenario in pmap_enter_l2(), so we
don't fail to create a superpage mapping when the 2MB range is actually
available.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36885
cgit
99fe5237 mhorne Oct. 6, 2022, 10:04 p.m.
Similar checks exist for both arm64 and amd64, but note that for amd64
it is a bare panic().

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36564
cgit
9d1aef84 mhorne Oct. 6, 2022, 10:02 p.m.
Previously, if pmap_enter_l2() was asked to re-map an existing superpage
(the result of madvise(MADV_WILLNEED) on a mapped range), it could
'fail' to do so, falling back to trying pmap_enter_quick_locked() for
each 4K virtual page. Because this function does not check if the l2
entry it finds is a superpage, it would proceed, sometimes resulting in
the creation of false PV entries.

If the relevant range was later munmap'ed, the system would panic during
the process' exit in pmap_remove_pages(), while attempting to clean up
the PV entries for mappings which no longer exist.

Instead, we should return early in the presence of an existing
superpage, as is done in other pmaps.

PR:             266108
Reviewed by:	markj, alc
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36563
cgit
95b1c270 mhorne Oct. 6, 2022, 10:02 p.m.
Specifically, avoid pointless calls to pmap_enter_quick_locked() when
madvise(MADV_WILLNEED) is applied to an existing superpage mapping.

1d5ebad06c20 made the change for amd64 and arm64.

Reviewed by:	markj, alc
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36563
cgit
dd18b62c mhorne Oct. 6, 2022, 10:02 p.m.
Disambiguate the failure cases.

Reviewed by:	jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36562
cgit