Commit Graph

282941 Commits

Author SHA1 Message Date
John Baldwin
f6fd5356b3 smbfs: Use C89 function definition for cf_getopt.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39519
2023-04-18 11:20:43 -07:00
John Baldwin
525438ea71 sendmail: Silence -Wdeprecated-non-prototype warnings.
These will hopefully be fixed upstream eventually, but silence the
warnings until then.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39518
2023-04-18 11:19:48 -07:00
John Baldwin
c7f3674fb0 boot0: Drop the BOOT_BOOT0_ORG option.
This shouldn't be an option (and I added it in the first place back in
4ae4202e70 and
83f4b92050).  However, unlike the other
knobs I added back then, this really shouldn't be a knob since it is
hardcoded in the source.
2023-04-18 11:19:12 -07:00
Mateusz Guzik
5e954b9216 tmpfs: add missing vop_fplookup ops to tmpfs_fifoop_entries
Reported by:	gbe
PR:	270917
2023-04-18 18:06:30 +00:00
John Baldwin
bd5dc94b99 boot0: Expand the description of BOOT_BOOT0_ORG.
This really shouldn't even be an option given it is hardcoded as a
constant named ORIGIN in the assembly.  mbr.S also uses 0x600 and
hardcodes it in both the assembly and the Makefile.
2023-04-18 11:02:50 -07:00
Steve Kiernan
4e8b87afe0 Handle errors if WARNS is not defined.
One conditional outside of ifdef WARNS did not protect against an
unset WARNS. Default WARNS to 0 in conditional if not defined.

Obtained from:	Juniper Networks, Inc.
2023-04-18 13:18:01 -04:00
Marius Strobl
a12d60b99e cas.4: Remove remaining sparc64-specific bit
This was missed in 702547720c.
2023-04-18 19:17:24 +02:00
Marius Strobl
8defc88c13 gem(4): Remove onboard-only Sun ERI and remnants of SBus support
These bits are obsolete since 58aa35d429.
This change reverts part of 9ba2b298df as
well as effectively bd3d9826d7, i. e. the
SBus-related modifications. This also gets rid of a nasty hack required
as bus_{read,write}_N(9) doesn't really fit bus_space_subregion(9).
2023-04-18 19:17:24 +02:00
Marius Strobl
bd15d31cef mmc(4): Don't call bridge driver for timings not requiring tuning
The original idea behind calling into the bridge driver was to have the
logic deciding whether tuning is actually required for a particular bus
timing in a given slot as well as doing the sanity checking only on the
controller layer which also generally is better suited for these due to
say SDHCI_SDR50_NEEDS_TUNING. On another thought, not every such driver
should need to check whether tuning is required at all, though, and not
everything is SDHCI in the first place.
Adjust sdhci{,_fsl_fdt}(4) accordingly, but keep sdhci_generic_tune() a
bit cautious still.
2023-04-18 19:17:24 +02:00
Dag-Erling Smørgrav
1bc6dcc287 renice: Factor out common code in tests.
Furthermore, prefer test -eq (which ignores whitespace) over a strict string equality test when comparing numerical values.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	thj
Differential Revision:	https://reviews.freebsd.org/D39650
2023-04-18 17:14:25 +00:00
Randall Stewart
2ad584c555 tcp: Inconsistent use of hpts_calling flag
Gleb has noticed there were some inconsistency's in the way the inp_hpts_calls flag was being used. One
such inconsistency results in a bug when we can't allocate enough sendmap entries to entertain a call to
rack_output().. basically a timer won't get started like it should. Also in cleaning this up I find that the
"no_output" side of input needs to be adjusted to make sure we don't try to re-pace too quickly outside
the hpts assurance of 250useconds.

Another thing here is we end up with duplicate calls to tcp_output() which we should not. If packets go
from hpts for processing the input side of tcp will call the output side of tcp on the last packet if it is needed.
This means that when that occurs a second call to tcp_output would be made that is not needed and if pacing
is going on may be harmful.

Lets fix all this and explicitly state the contract that hpts is making with transports that care about the
flag.

Reviewed by: tuexen, glebius
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D39653
2023-04-17 17:10:26 -04:00
Steve Kiernan
fb5ff7384c arm64: Use FULLKERNEL instead of .ALLSRC in .bin target
Using .ALLSRC may get additional arguments that we may not want
and could cause the objcopy to fail.

Reviewed by:	emaste
Obtained from:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D39639
2023-04-18 11:41:57 -04:00
Alexander V. Chernikov
04a036601e tests: fix netlink type parsing.
Netlink attribute type field is 2 bytes, not one.

MFC after:	2 weeks
2023-04-18 14:09:47 +00:00
Kristof Provost
af94d8cc17 pf: fix incorrect lock define
PF_TABLE_STATS_ASSERT() should be checking pf_table_stats_lock not
pf_rules_lock.

Fortunately the define is not yet used anywhere so this was harmless.
Fix it anyway, in case it does get used.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-04-18 15:51:05 +02:00
Mateusz Piotrowski
fb49925999 split: Update synopsis and usage; fix examples
- Mark -d as an optional flag
- Add a prompt to one of the examples for consistency
- Add -d to the usage message

Sponsored by:	Klara Inc.
2023-04-18 15:30:00 +02:00
Hans Petter Selasky
1943c40cd6 mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels.
Failure to get mbufs may be transient.
Don't permanently fail to open the channels due to lack of mbufs.
This also makes modifying channel parameters faster.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:07 +02:00
Hans Petter Selasky
6bd4bb9bdb mlx5en(4): Explain why CQE zipping is off.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:07 +02:00
Hans Petter Selasky
80b4ef6d10 mlx5: Remove unused debugfs node pointers.
No functional change intended.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:07 +02:00
Hans Petter Selasky
aa7bbdabde mlx5: Implement diagostic counters as sysctl(8) nodes.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:07 +02:00
Hans Petter Selasky
95bf70a4bf mlx5: Don't give zero number of pages to the firmware.
Can happen when using virtual mlx5_core<N> functions, VFs.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:06 +02:00
Hans Petter Selasky
273bfac08f mlx5: Implement mlx5_core_modify_cq_by_mask().
Implement one CQ modify function supporting all firmware versions,
instead of having more variants of CQ modify.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:06 +02:00
Hans Petter Selasky
2f7e9a8a21 mlx5: Fix duplicate free of default flow rule in error case.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:06 +02:00
Hans Petter Selasky
b0b87d9151 mlx5: Make mlx5_del_flow_rule() NULL safe.
This change factors out repeated NULL checks.

No functional change intended.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:06 +02:00
Hans Petter Selasky
3bb3e4768f mlx5: Make MLX5_COMP_EQ_SIZE tunable.
When using hardware pacing, this value can be increased, because more SQ's
means more EQ events aswell. Make it tunable, hw.mlx5.comp_eq_size .

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-04-18 15:01:06 +02:00
Randall Stewart
37229fed38 tcp: Blackbox logging and tcp accounting together can cause a crash.
If you currently turn BB logging on and in combination have TCP Accounting on we can get a
crash where we have no NULL check and we run out of memory. Also lets make sure we
don't do a divide by 0 in calculating any BB ratios.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D39622
2023-04-17 13:52:00 -04:00
Alexander V. Chernikov
28abf63277 netlink: sync interface IFLA attributes
MFC after:	2 weeks
2023-04-18 12:34:05 +00:00
Kajetan Staszkiewicz
56cd7716b6 tcpdump: add missing pf reasons and actions
Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39586
2023-04-18 09:33:33 +02:00
Gordon Bergling
c2a9d23736 mount_nfs.8: Fix a mandoc warning
- sections out of conventional order: Sh IMPLEMENTATION NOTES

MFC after:	3 days
2023-04-18 09:14:20 +02:00
Gordon Bergling
c3fbd9c621 Revert "stand: Remove double words in source code comments"
The sentence, "The base address that we the boot0 code to to run it."
is correct.

Reported by:	jrtc27

This reverts commit b12ccd0bb1.
2023-04-18 08:08:35 +02:00
Dag-Erling Smørgrav
d59dd30cf1 renice: Clean up the tests.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39629
2023-04-18 05:31:56 +00:00
Stephen J. Kiernan
49b6bc83cc meta: print some additional variables on build errors.
Add CPUTYPE and MACHINE_CPUARCH to the list of variables printed
when there are build errors.

Protect local.sys.mk from multiple inclusion.

Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2023-04-18 01:30:34 -04:00
Gordon Bergling
105e397eb6 kern_sysctl: Remove double words in source code comments
- s/on on/on/

MFC after:	5 days
2023-04-18 07:14:57 +02:00
Gordon Bergling
1190b82c22 last(1): Remove double words in source code comments
- s/on on/on/
- s/we we/we/

MFC after:	5 days
2023-04-18 07:14:53 +02:00
Gordon Bergling
93e4914816 net80211: Remove double words in source code comments
- s/we we/we/

MFC after:	5 days
2023-04-18 07:14:50 +02:00
Gordon Bergling
b12ccd0bb1 stand: Remove double words in source code comments
- s/to to/to/
- s/value value/value/

MFC after:	5 days
2023-04-18 07:14:44 +02:00
Stephen J. Kiernan
d664658015 meta: Allow TARGET_SPEC_VARS to be overridden
Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2023-04-18 00:25:59 -04:00
Stephen J. Kiernan
76735c7439 flash: Add "n25q64" to mx25l driver
This is for 64Mb Micron N25Q serial NOR flash memory

Obtained from:	Juniper Networks, Inc.
2023-04-18 00:21:17 -04:00
Stephen J. Kiernan
b5c3ade765 libsa: Update comments about SMBIOS specification
Summary:
Include details from the SMBIOS 3 specification and some additional
details for SMBIOS 2.1.

Obtained from:	Juniper Networks, Inc.

Reviewers: jmg, manu

Subscribers: imp, dab

Differential Revision: https://reviews.freebsd.org/D39635
2023-04-17 23:21:04 -04:00
Jason A. Harmening
0c01203e47 vfs_lookup(): re-check v_mountedhere on lock upgrade
The VV_CROSSLOCK handling logic may need to upgrade the covered
vnode lock depending upon the requirements of the filesystem into
which vfs_lookup() is walking.  This may involve transiently
dropping the lock, which can allow the target mount to be unmounted.

Tested by:	pho
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
Jason A. Harmening
93fe61afde unionfs_mkdir(): handle dvp reclamation
The underlying VOP_MKDIR() implementation may temporarily drop the
parent directory vnode's lock.  If the vnode is reclaimed during that
window, the unionfs vnode will effectively become unlocked because
the its v_vnlock field will be reset.  To uphold the locking
requirements of VOP_MKDIR() and to avoid triggering various VFS
assertions, explicitly re-lock the unionfs vnode before returning
in this case.

Note that there are almost certainly other cases in which we'll
similarly need to handle vnode relocking by the underlying FS; this
is the only one that's caused problems in stress testing so far.
A more general solution, such as that employed for nullfs in
null_bypass(), will likely need to be implemented.

Tested by:	pho
Reviewed by:	kib, markj
Differential Revision: https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
Jason A. Harmening
d711884e60 Remove unionfs_islocked()
The implementation is racy; if the unionfs vnode is not in fact
locked, vnode private data may be concurrently altered or freed.
Instead, simply rely upon the standard implementation to query the
v_vnlock field, which is type-stable and will reflect the correct
lower/upper vnode configuration for the unionfs node.

Tested by:	pho
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
Jason A. Harmening
a5d82b55fe Remove an impossible condition from unionfs_lock()
We hold the vnode interlock, so vnode private data cannot suddenly
become NULL.

Tested by:	pho
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
Jason A. Harmening
a18c403fbd unionfs: remove LK_UPGRADE if falling back to the standard lock
The LK_UPGRADE operation may have temporarily dropped the upper or
lower vnode's lock.  If the unionfs vnode was reclaimed during that
window, its lock field will be reset to no longer point at the
upper/lower vnode lock, so the lock operation will use the standard
lock stored in v_lock.  Remove LK_UPGRADE from the flags in this case
to avoid a lockmgr assertion, as this lock has not been previously
owned by the calling thread.

Reported by:	pho
Tested by:	pho
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
Yuri Pankov
21ef48af5c xargs: improve foundeof check for -E
4aeb63826e got it almost correct (we can't use strcmp() here as
current argument isn't guaranteed to be NUL-terminated), but we also
need to check that current argument length is equal to that of eofstr.

PR:		270867
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D39583
2023-04-17 22:20:03 +02:00
Dag-Erling Smørgrav
b03311cadd renice: Avoid segfault if -n flag is given without argument.
Fixes:		65ee0a8495
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39623
2023-04-17 19:50:19 +00:00
Ed Maste
00172f3416 geom: use bool for one-bit wide bit-field
A one-bit wide bit-field can take only the values 0 and -1.  Clang 16
introduced a warning that "implicit truncation from 'int' to a one-bit
wide bit-field changes value from 1 to -1".  Fix by using c99 bool.

Reported by:	Clang, via dim
Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
2023-04-17 15:43:00 -04:00
Dimitry Andric
653e8c11f4 Include bsd.linker.mk to get LINKER_TYPE and VERSION in rescue
To be able to use these make variables, you also have to include
bsd.linker.mk, apparently.

Fixes:		458f4722bf
MFC after:	1 week
2023-04-17 19:45:26 +02:00
Simon J. Gerraty
c4c981c1e6 Move include of site.src.opts.mk to allow more control
Sometimes a site may have different policy needs,
include site.src.opts.mk just before bsd.mkopt.mk to allow
more control.

Reviewed by: imp
2023-04-17 10:44:37 -07:00
Gleb Smirnoff
3232b1f4a9 tcp: fix build
The recent 25685b7537 came in conflict with a540cdca31.  Remove the
code that cleans up the old style input queue.  Note that two lines
below we assert that the new style input queue is empty.  The TCP
stacks that use the queue are supposed to flush it in their
tfb_tcp_fb_fini method.
2023-04-17 10:24:20 -07:00
Dimitry Andric
458f4722bf Suppress lld 16 errors about multiply defined symbols in rescue
lld >= 16 became more strict about multiply defined symbols. Since there
are many of those in crunchgen'd programs, turn off the check when
linking the rescue binary.

MFC after:	1 week
2023-04-17 18:26:27 +02:00