Commit Graph

252054 Commits

Author SHA1 Message Date
Emmanuel Vadot
82087d4b68 pkgbase: Add PKG_NAME_PREFIX, PKG_MAINTAINER and PKG_WWW
This is useful for downstream users to customize the packages.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26019
2020-08-11 08:42:24 +00:00
Hans Petter Selasky
b453d3d239 Use a static initializer for the multicast free tasks.
This makes the SYSINIT() function updated in r364072 superfluous.

Suggested by:	glebius@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-08-11 08:31:40 +00:00
Alexander V. Chernikov
8a0917c35b Do not enter epoch in add_route(), as it is already called in epoch.
Reviewed by:	glebius
2020-08-11 07:23:07 +00:00
Alexander V. Chernikov
136a1f8da8 Make <add|del|change>_route() static to finish the transition to the new kpi.
Discussed with:	glebius
2020-08-11 07:21:32 +00:00
Alexander V. Chernikov
9a00f6d067 Fix rib_subscribe() waitok flag by performing allocation outside epoch.
Make in6_inithead() use rib_subscribe with waitok to achieve reliable
 subscription allocation.

Reviewed by:	glebius
2020-08-11 07:05:30 +00:00
Li-Wen Hsu
fc254a2e4a Fix armv{6,7} build after r364088
Sponsored by:	The FreeBSD Foundation
2020-08-11 05:17:10 +00:00
Rick Macklem
6d56f524a7 Add an UPDATING entry for r364092, since it did a version bump. 2020-08-11 02:05:09 +00:00
Mateusz Guzik
2d0631dd08 vfs: stricter validation for flags passed to namei in cn_flags
namei de facto expects that the naimeidata object is properly initialized,
but at the same time it mixes consumer-passable and internal flags, while
tolerating this part by explicitly clearing some of them.

Tighten the interface instead.

While here renumber the flags and denote the gap between the 2 variants.

Try to piggy back th renumber on the just bumped __FreeBSD_version.
2020-08-11 01:34:40 +00:00
Alan Somers
8d2105da16 fusefs: fix the FUSE_FORGET unit test after r364064
Thanks to r364064, the name cache now returns a hit where previously it
would miss.  Adjust the expectations accordingly.

PR:		248583
Reported by:	lwhsu
MFC with:	r364064
2020-08-11 01:09:06 +00:00
Rick Macklem
02511d2112 Add an argument to newnfs_connect() that indicates use TLS for the connection.
For NFSv4.0, the server creates a server->client TCP connection for callbacks.
If the client mount on the server is using TLS, enable TLS for this callback
TCP connection.
TLS connections from clients will not be supported until the kernel RPC
changes are committed.

Since this changes the internal ABI between the NFS kernel modules that
will require a version bump, delete newnfs_trimtrailing(), which is no
longer used.

Since LCL_TLSCB is not yet set, these changes should not have any semantic
affect at this time.
2020-08-11 00:26:45 +00:00
Konstantin Belousov
cc321ccd75 Export scandir_b from libc.
Apparently it was not exported, because scandir_b.c was not included
into libc SRCS.  Export it with the CURRENT-13 version.

Also, because it was not exported before ino64, clean up
scandir-compat11.c.

PR:	248572
Reported by:	Alex S <iwtcex@gmail.com>
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D26020
2020-08-10 21:41:49 +00:00
Mark Johnston
af32cefd7c Check the UMA zone's full bucket cache before short-circuiting an alloc.
The global "bucketdisable" flag indicates that we are in a low memory
situation and should avoid allocating buckets.  However, in the
allocation path we were checking it before the full bucket cache and
bailing even if the cache is non-empty.  Defer the check so that we have
a shot at allocating from the cache.

This came up because M_NOWAIT allocations from the buf trie node zone
must always succeed.  In one scenario, all of the preallocated trie
nodes were in the bucket list, and a new slab allocation could not
succeed due to a memory shortage.  The short-circuiting caused an
allocation failure which triggered a panic.

Reported by:	pho
Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D25980
2020-08-10 20:34:45 +00:00
Michael Tuexen
cf8a49ab6e Fix the following issues related to the TCP SYN-cache:
* Let the accepted TCP/IPv4 socket inherit the configured TTL and
  TOS value.
* Let the accepted TCP/IPv6 socket inherit the configured Hop Limit.
* Use the configured Hop Limit and Traffic Class when sending
  IPv6 packets.

Reviewed by:		rrs, lutz_donnerhacke.de
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D25909
2020-08-10 20:24:48 +00:00
Oleksandr Tymoshenko
824cfb4729 Improve Rockchip's integration of if_dwc
- Do not rely on U-Boot for clocks configuration, enable and set frequencies
    in the driver's attach method.
- Adjust MAC settings according to detected linespeed on RK3399 and RK3328.
- Add support for RMII PHY mode on RK3328.

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D26006
2020-08-10 19:37:06 +00:00
Mateusz Guzik
25e42ee217 vfs: drop the hello world stat probes from the vfs provider
Interested parties can get the same information by hoooking on vop_stat.
2020-08-10 18:11:00 +00:00
Mark Johnston
777c9f5a38 fortune, strfile: Improve validation of command-line arguments.
- Avoid potential overflow when parsing a percentage.
- Avoid truncation when copying file paths.

PR:		246050
Submitted by:	Akos Somfai <akos.somfai@gmail.com> (original)
MFC after:	1 week
2020-08-10 17:01:59 +00:00
Dimitry Andric
a08d04f4e4 Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
subdirectories for compiler-rt's internal fuzzer, profile and xray
headers, but forgot to add installing those headers themselves.

MFC after:	3 days
2020-08-10 16:55:54 +00:00
Mateusz Guzik
5e79447d60 cache: let SAVESTART passthrough
The flag is only passed for non-LOOKUP ops and those fallback to the slowpath.
2020-08-10 12:28:56 +00:00
Mateusz Guzik
bb48255cf5 cache: resize struct namecache to a multiply of alignment
For example struct namecache on amd64 is 100 bytes, but it has to occupies
104. Use the extra bytes to support longer names.
2020-08-10 12:05:55 +00:00
Mateusz Guzik
8b62cebea7 cache: remove unused variables from cache_fplookup_parse 2020-08-10 11:51:56 +00:00
Mateusz Guzik
03337743db vfs: clean MNTK_FPLOOKUP if MNT_UNION is set
Elides checking it during lookup.
2020-08-10 11:51:21 +00:00
Mateusz Guzik
ca423b858b devfs: bool -> int
Fixes buildworld after r364069
2020-08-10 11:46:39 +00:00
Bjoern A. Zeeb
f9461246a2 MC: add a note with reference to the discussion and history as-to why we
are where we are now.  The main thing is to try to get rid of the delayed
freeing to avoid blocking on the taskq when shutting down vnets.

X-Timeout:	if you still see this before 14-RELEASE remove it.
2020-08-10 10:58:43 +00:00
Hans Petter Selasky
3689652c65 Make sure the multicast release tasks are properly drained when
destroying a VNET or a network interface.

Else the inm release tasks, both IPv4 and IPv6 may cause a panic
accessing a freed VNET or network interface.

Reviewed by:		jmg@
Discussed with:		bz@
Differential Revision:	https://reviews.freebsd.org/D24914
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2020-08-10 10:46:08 +00:00
Hans Petter Selasky
a95ef9d38d Use proper prototype for SYSINIT() functions.
Mark the unused argument using the __unused macro.

Discussed with:		kib@
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2020-08-10 10:40:19 +00:00
Mateusz Guzik
c571b99545 cache: strlcpy -> memcpy 2020-08-10 10:40:14 +00:00
Mateusz Guzik
7416a2d6df vfs: garbage collect unused ISUNICODE namei flag 2020-08-10 10:37:16 +00:00
Mateusz Guzik
7b19bddac8 devfs: save on spurious relocking for devfs_populate
Tested by:	pho
2020-08-10 10:36:43 +00:00
Mateusz Guzik
f8935a96d1 devfs: use cheaper lockmgr entry points
Tested by:	pho
2020-08-10 10:36:10 +00:00
Mateusz Guzik
f9c13ab856 devfs: use vget_prep/vget_finish
Tested by:	pho
2020-08-10 10:35:47 +00:00
Mateusz Guzik
3ba0e51703 vfs: partially support file create/delete/rename in lockless lookup
Perform the lookup until the last 2 elements and fallback to slowpath.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2020-08-10 10:35:18 +00:00
Mateusz Guzik
21d5af2b30 vfs: drop the thread argumemnt from vfs_fplookup_vexec
It is guaranteed curthread.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2020-08-10 10:34:22 +00:00
Mateusz Guzik
7f70080150 vfs: disallow NOCACHE with LOOKUP
This means there is no expectation lookup will purge the terminal entry,
which simplifies lockless lookup.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2020-08-10 10:33:40 +00:00
Mateusz Guzik
fc9fcee01a nullfs: add missing VOP_STAT handling
Tested by:	pho
2020-08-10 10:31:17 +00:00
Alexey Dokuchaev
f8024c3915 Document the order in which the kernel and the user environment versions
are printed when both -K and -U options are passed on the command line.

Approved by:	0mp
Differential Revision:	https://reviews.freebsd.org/D25970
2020-08-10 09:03:29 +00:00
Ryan Moeller
94cba8034b Move ifconfig SFP status functionality into libifconfig
libifconfig_sfp.h provides an API in libifconfig for querying SFP module
properties, operational status, and vendor strings, as well as descriptions
of the various fields, string conversions, and other useful helpers for
implementing user interfaces.

SFP module status is obtained by reading registers via an I2C interface.
Descriptions of these registers and the values therein have been collected
in a Lua table which is used to generate all the boilerplace C headers and
source files for accessing these values, their names, and descriptions.
The generated code is fully commented and readable.

This is the first use of libifconfig in ifconfig itself.  For now, the
scope remains very limited.  Over time, more of ifconfig will be replaced
with libifconfig.

Some minor changes to the formatting of ifconfig output have been made:
- Module memory hex dumps are indented one extra space as a result of using
hexdump(3) instead of a bespoke hex dump function.
- Media descriptions have an added two-character short-name in parenthesis.
- QSFP modules were incorrectly displaying TX bias current as power.  Now
  TX channels display bias current, and this change has been made for both
  SFP and QSFP modules for consistency.

A Lua binding for libifconfig including this functionality is implemented
but has not been included in this commit.  The plan is for it to be
committed after dynamic module loading has been enabled in flua.

Reviewed by:	kp, melifaro
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D25494
2020-08-09 16:27:28 +00:00
Greg Lehey
cbc0517c2b Correct date for Nagasaki bombing. 2020-08-09 00:35:47 +00:00
Greg Lehey
5126cbe91b Remove incorrect duplicate. 2020-08-09 00:34:35 +00:00
Stefan Eßer
e64c6e2181 Mention the new implementation of bc and dc which has become the default
version in FreeBSD-CURRENT.
2020-08-08 19:48:15 +00:00
Michael Tuexen
1bea15e601 Improve the ECN negotiation when the TCP SYN-cache is used by making
sure that
* ECN is disabled if the client sends an non-ECN-setup SYN segment.
* ECN is disabled is the ECN-setup SYN-ACK segment is retransmitted more
  than net.inet.tcp.ecn.maxretries times.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26008
2020-08-08 19:39:38 +00:00
Emmanuel Vadot
d7c8186d67 release: RPI3: Add the RPI2 DTB
The RPI2 v1.2 is using the same SoC as the RPI3 so it can boot this image
but needs the RPI2 dtb.

MFC after:	3 days
2020-08-08 16:56:20 +00:00
Dimitry Andric
967348a966 Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.
This fixes possible link errors, similar to:

ld: error: undefined symbol: iface_setup_addr
>>> referenced by test_rtsock_l3.c:111 (tests/sys/net/routing/test_rtsock_l3.c:111)
>>>               test_rtsock_l3.o:(presetup_ipv4)
>>> referenced by test_rtsock_l3.c:79 (tests/sys/net/routing/test_rtsock_l3.c:79)
>>>               test_rtsock_l3.o:(presetup_ipv6)
>>> referenced by test_rtsock_l3.c:512 (tests/sys/net/routing/test_rtsock_l3.c:512)
>>>               test_rtsock_l3.o:(atfu_rtm_change_v4_gw_success_body)
>>> referenced 10 more times

In C (not C++), 'naked' inline is almost always a mistake. Either use
static inline (this is appropriate for most cases), or extern inline.

MFC after:	3 days
2020-08-08 11:06:27 +00:00
Alex Richardson
dfb98e350c Fix i386 build of chpass after r363992
My change to allow bootstrapping pwd_mkdb (r363992) resulted in i386 build
failures because the bootstrap header was being included in non-bootstrap chpass.
Dropping the no longer required pwd_mkdb include path from chpass fixes
the build, but to be certain that the failure doesn't get re-introduced,
I've also moved the bootstrap pwd.h into a subdirectory so that adding
-I${SRCTOP}/usr.sbin/pwd_mkdb doesn't pull it in.

Reported by:	mjg
2020-08-08 10:05:27 +00:00
Mateusz Guzik
76dc5d3224 ufs: add VOP_STAT handler 2020-08-07 23:08:17 +00:00
Mateusz Guzik
9a14439f2f tmpfs: add VOP_STAT handler 2020-08-07 23:07:47 +00:00
Mateusz Guzik
51ea7bea91 vfs: add VOP_STAT
The current scheme of calling VOP_GETATTR adds avoidable overhead.

An example with tmpfs doing fstat (ops/s):
before: 7488958
after:  7913833

Reviewed by:	kib (previous version)
Differential Revision:	https://reviews.freebsd.org/D25910
2020-08-07 23:06:40 +00:00
Bjoern A. Zeeb
1e5d733503 mmc_da: fix memory leak in sddaregister()
In case we are failing to allocate mmcdata, we are returning with
a softc allocated but not attached to anything and thus leak the
memory.

Reviewed by:	scottl
MFC after:	2 weeks
X-MFC:		only if we also mfc other mmccam changes?
Differential Revision:	https://reviews.freebsd.org/D25987
2020-08-07 19:58:16 +00:00
Mateusz Guzik
1ff80a3400 vfs: release the interlock after failing to set VHOLD_NO_SMR
While here add more comments.

Diagnosed by:	markj
Reported by:	pho
Fixes:	r362827 ("vfs: protect vnodes with smr")
2020-08-07 19:36:08 +00:00
Dimitry Andric
21673cf0bd Fix clang 11 inline asm constraint error when building powerpc GENERIC64
kernels:

sys/powerpc/aim/mmu_radix.c:728:19: error: invalid operand for inline asm constraint 'i'
        __asm __volatile(PPC_TLBIEL(%0, %1, %2, %3, 1)
                         ^
sys/powerpc/aim/mmu_radix.c:149:3: note: expanded from macro 'PPC_TLBIEL'
         __XSTRING(.long PPC_INST_TLBIEL | \
         ^
sys/sys/cdefs.h:161:22: note: expanded from macro '__XSTRING'
#define __XSTRING(x)    __STRING(x)     /* expand x, then stringify */
                        ^
sys/sys/cdefs.h:160:21: note: expanded from macro '__STRING'
#define __STRING(x)     #x              /* stringify without expanding x */
                        ^
<scratch space>:112:1: note: expanded from here
".long 0x7c000224 | (((%0) & 0x1f) << 11) | (((%1) & 0x1f) << 21) | (((%2) & 0x3) << 18) | (((%3) & 0x1) << 17) | (((1) & 0x1) << 16)"
^

This is solved by making the affected inline functions __always_inline.

Suggested by:	jhibbits
MFC after:	3 days
2020-08-07 19:32:54 +00:00
Mark Johnston
69bc4fa916 script: Put the terminal in raw mode when playing back a session.
Otherwise recorded sessions of some interactive programs do not play
back properly.

PR:		248377
Submitted by:	Soumendra Ganguly <0.gangzta@gmail.com>
MFC after:	1 week
2020-08-07 18:48:56 +00:00