Commit Graph

284688 Commits

Author SHA1 Message Date
Graham Perrin
6927176113 bectl(8): clarifications, expansion
Reviewed-by:  imp
Pull-request: https://github.com/freebsd/freebsd-src/pull/728
2023-06-28 03:05:26 +01:00
Bjoern A. Zeeb
1b18fb7faa LinuxKPI: list.h add list_count_nodes()
Implement list_count_nodes() using a simple loop.  This is needed by
an updated wireless driver.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D40757
2023-06-28 01:32:29 +00:00
Jessica Clarke
91d7edd549 Generalise libcompat to be a list rather than a single option
Whilst the kernel can support any number of COMPAT_FOO, world can only
build a single libfoo. Upstream this isn't such an issue, since the only
option is lib32 anyway, but downstreams, such as CheriBSD, may wish to
support multiple at the same time. Thus, adjust the top-level Makefiles
to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and
adjust bsd.compat.mk to support this use-case.

For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and
refer to the requested compat's, preserving the current interface. For
the top-level Makefiles those variables are no longer set (since there
is no longer "the" compat) and only the per-compat ones are available.

Reviewed by:	brooks, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D40571
2023-06-28 00:10:49 +01:00
Jessica Clarke
10afc5eada Makefile.libcompat: Handle MK_FOO varying for native and compat arches
Currently Makefile.libcompat queries a few MK_FOO variables to determine
what is being built. However, it is plausible (and indeed, downstream
in CheriBSD, this is the case) that these may vary between the native
and the compat architecture. In order to correctly determine their
values for the compat architecture, we need to defer their evaluation
until we are in the compat sub-make where src.opts.mk will give us the
right value for the compat MACHINE_ARCH.

Reviewed by:	brooks, jhb, imp
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D40570
2023-06-28 00:10:30 +01:00
Jessica Clarke
5ed8515151 Makefile.libcompat: Remove unused _LC_INCDIRS
This is no longer referenced as of commit 724123b9f4 ("libcompat: Use
WORLDTMP sysroot").

Reviewed by:	brooks, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D40569
2023-06-28 00:09:44 +01:00
Jessica Clarke
9b3bce2074 usb: Fixed botched spacing
Fixes:	d3a83456e1 ("Add vendor id for Quectel USB modem and align with quectel marketing names.")
2023-06-28 00:07:54 +01:00
Gabriele Laganà
d3a83456e1 Add vendor id for Quectel USB modem and align with quectel marketing names.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/750
2023-06-27 16:35:20 -06:00
Igor Ostapenko
7b5a1c39f1 vfs: bring vfs_lookup() description comment up to date
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/737
2023-06-27 16:34:02 -06:00
Igor Ostapenko
5958cd88f2 vfs: fix description comment of vfs_lookup()
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/737
2023-06-27 16:33:25 -06:00
Alfonso Gregory
21c32cebf8 ifconfig: skip calling fnmatch once the result no longer matters
Because fnmatch has no side effects, we can safely avoid calling fnmatch
if the end result does not matter anyway (the compiler cannot see this,
so it calls fnmatch in the event it has side-effects).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/747
2023-06-27 16:28:44 -06:00
Konstantin Belousov
ef747607ea vm_fault: move FAULT_* return codes out of range for Mach errors
This way a possible clash between FAULT_* and KERN_* numbering is
avoided, and panics checks for fault_status confusion become more
efficient.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40771
2023-06-28 00:03:14 +03:00
Simon J. Gerraty
148ee84570 Merge bmake-20230622
Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'
2023-06-27 13:57:58 -07:00
Simon J. Gerraty
3e39ce563b Import bmake-20230622
Relevant/interesting changes:

	o optimize string matching for ':M' and ':N'
	o warn about malformed patterns in ':M', ':N' and '.if make(...)'
	o allow guards to be targets as well as variables
	The guard targets may include variable references like
	__${.PARSEDIR:tA}/${.PARSEFILE}__
	o optimization for makefiles protected from multiple-inclusion
	skip even opening the file after first include.
	o var.c: do not allow delete of readOnly variable
	o parse.c: .break takes no args
2023-06-27 13:29:43 -07:00
Graham Perrin
b374a3921d hier(7): fix inline markup for a variable
I mistakenly preceded macro  Va  with macro  It  in
8ff26f2cb5

https://bugs.freebsd.org/261349

PR:                      261349
Approved by:             emaste, imp, mhorne
Fixes: 6469f9c hier(7): improvement, modernisation
2023-06-27 20:22:32 +01:00
Cy Schubert
e36b028933 systat: Chase 70ea484e3e, removing vdev_cache
As of 70ea484e3e vdev_cache has been removed. Stop reporting on it.
Without this systat reports:

	sysctl(kstat.zfs.misc.vdev_cache_stats.misses...) failed:
	No such file or directory

Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D40742
2023-06-27 11:34:29 -07:00
Doug Moore
da72505f9c radix_trie: pass fewer params to node_get
Let node_get calculate it's own owner value. Don't pass the count
parameter, since it's always 2. Save 16 bytes in insert(). Move,
without modifying, slot and trimkey to handle use-before-declaration
problem.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D40723
2023-06-27 12:21:11 -05:00
John Baldwin
2e1665ff34 ldns: Remove a set but unused variable.
Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D40695
2023-06-27 10:19:32 -07:00
John Baldwin
b9f56cabed efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP.
This quiets a set but unused warning on platforms without this module
info such as aarch64.

Differential Revision:	https://reviews.freebsd.org/D40672
2023-06-27 10:19:32 -07:00
John Baldwin
eca9714e4b libbsnmptools: Fully comment out set but unused count variable.
These functions all end with 'return (2/* count */);'.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40670
2023-06-27 10:19:32 -07:00
John Baldwin
1e80d4b188 xo: Disable -Wunused-but-set-variable.
Presumably these warnings will be fixed upstream at some point.

contrib/libxo/xo/xo.c:99:9: error: variable 'hflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
        ^
contrib/libxo/xo/xo.c:99:20: error: variable 'jflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
                   ^
contrib/libxo/xo/xo.c:99:31: error: variable 'tflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
                              ^
contrib/libxo/xo/xo.c💯2: error: variable 'zflag' set but not used [-Werror,-Wunused-but-set-variable]
        zflag = 0, qflag = 0, star1 = 0, star2 = 0;
        ^
contrib/libxo/xo/xo.c💯13: error: variable 'qflag' set but not used [-Werror,-Wunused-but-set-variable]
        zflag = 0, qflag = 0, star1 = 0, star2 = 0;
                   ^

Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D40668
2023-06-27 10:19:32 -07:00
John Baldwin
90f2fee0e0 ipf: Remove set but unused variables.
Reported by:	clang
Differential Revision:	https://reviews.freebsd.org/D40667
2023-06-27 10:19:32 -07:00
John Baldwin
235c8f6631 ncurses: Silence -Wunused-but-set-variable for various files.
Presumably these will be fixed upstream eventually.

Differential Revision:	https://reviews.freebsd.org/D40664
2023-06-27 10:19:32 -07:00
John Baldwin
32c7dde816 hyperv/kvp: Remove set but unused variables.
Reported by:	GCC
Reviewed by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Differential Revision:	https://reviews.freebsd.org/D40660
2023-06-27 10:19:32 -07:00
John Baldwin
f66a8328c3 bsdinstall: Replace correct, but fragile, string builder with open_memstream.
The old one triggered a false positive -Warray-bounds from GCC (the
compiler assumed len was always 0), but it was also fragile with
manually computed lengths paired with strcat vs using a string
builder.

Differential Revision:	https://reviews.freebsd.org/D40658
2023-06-27 10:19:32 -07:00
John Baldwin
f5e7330633 ipfw: Remove set but unused variables.
Reported by:	GCC
Differential Revision:	https://reviews.freebsd.org/D40654
2023-06-27 10:19:32 -07:00
John Baldwin
a7f25f141a libipf: Remove set but unused variable from printfraginfo().
Reported by:	GCC
Differential Revision:	https://reviews.freebsd.org/D40652
2023-06-27 10:19:31 -07:00
John Baldwin
ccfd87fe2a libefivar: Use a void cast in unimplemented stubs.
This "consumes" an otherwise unused argument.

Differential Revision:	https://reviews.freebsd.org/D40650
2023-06-27 10:19:31 -07:00
John Baldwin
36c2fec31d riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf.
- Remove now unnecessary MACHINE_ARCHES definition.  The default logic
  in kern_mib.c works fine now for RISC-V.

- Remove custom sv_machine_arch hook from sysentvec.

Fixes:		1ca12bd927 Remove the riscv64sf architecture.
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D40648
2023-06-27 10:19:31 -07:00
Warner Losh
2d38d9839b openzfs: Remove broken symlinks
These symlinks are broken. They point to files that don't exist, and
rely on having them be built using a 'in-tree' build that FreeBSD
doesn't use. They also show up as errors on grep -r. Since they are
broken and can't possibly work, remove them for now since non-functional
symlinks matching an upstrem repo that can't work in our repo aren't
worth the error messages.

Though one could argue the whole debian directory should be removed, I
did the minimal change necessary. These can return when the fundamental
issue is fixed and the contrib/debian tree is useful on FreeBSD systems.
2023-06-27 11:15:20 -06:00
John Baldwin
5ae4463498 nvme: Fix typo in "Command Aborted by Host" constant name.
Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D40763
2023-06-27 10:06:22 -07:00
Dag-Erling Smørgrav
3ba4c8c81a Upgrade to OpenPAM Ximenia.
Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b'
2023-06-27 19:03:17 +02:00
Dag-Erling Smørgrav
5894a4142a Vendor import of OpenPAM Ximenia. 2023-06-27 19:01:49 +02:00
Doug Moore
9cfed089ac radix_trie: clean up overlong lines
This is purely a cosmetic change. vm_radix.c has lines that reach past
column 80 and this change cleans that up. The associated changes to
subr_pctrie.c are just to keep mirroring vm_radix.c.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D40764
2023-06-27 12:01:33 -05:00
Warner Losh
a1db51dbdb unzip(1): Comma after e.g.
Add comma after e.g. to make igor happy (oh, and I suppose to conform to
normal English grammar rules).

Sponsored by:		Netflix
2023-06-27 10:58:40 -06:00
Mingye Wang
a227908571 unzip: add -O/-I encoding support
These are for compatibility with the info-zip version of unzip.

PR: 271657
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/752
2023-06-27 10:55:26 -06:00
Mohamed Akram
8edb6fb572 man(1): Support custom sections
PR: 271830
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/764
2023-06-27 07:51:27 -06:00
Greg Becker
a6c0d801ca libpthread: allocate rwlocks and spinlocks in dedicated cachelines
Reduces severe performance degradation due to false-sharing. Note that this
does not account for hardware which can perform adjacent cacheline prefetch.

[mjg: massaged the commit message and the patch to use aligned_alloc
instead of malloc]

PR:	272238
MFC after:	1 week
2023-06-27 11:56:44 +00:00
Konstantin Belousov
4a402dfe0b VFS: Remove VV_READLINK flag
since its only reason to exist is removed.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40700
2023-06-27 13:43:25 +03:00
Konstantin Belousov
3bffa22623 fdescfs: improve linrdlnk mount option
Instead of using VV_READLINK vnode flag and checking it in one place,
just assign VLNK type to the Fdesc vnodes for linrdlnk mounts.  Then all
places where symlinks needs to be followed, e.g. lookup(), are handled.

PR:	272127
Reported by:	Peter Eriksson <pen@lysator.liu.se>
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40700
2023-06-27 13:43:17 +03:00
Li-Wen Hsu
eb550615ef
release/azure: Update reference URL
Sponsored by:	The FreeBSD Foundation
2023-06-27 15:58:55 +08:00
Doug Moore
72c3a43b16 radix_trie: skip compare in lookup_le, lookup_ge
In _lookup_ge, where a loop "looks for an available edge or val within
the current bisection node" (to quote the code comment), the value of
index has already been modified to guarantee that it is the least
value than can be found in the non-NULL child node being
examined. Therefore, if the non-NULL child is a leaf, there's no need
to compare 'index' to anything, and the value can just be returned.

The same is true for _lookup_le with 'most' replacing 'least'.
Reviewed by:	alc
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D40746
2023-06-27 00:42:41 -05:00
Alan Cox
d8e6f4946c vm: Fix anonymous memory clustering under ASLR
By default, our ASLR implementation is supposed to cluster anonymous
memory allocations, unless the application's mmap(..., MAP_ANON, ...)
call included a non-zero address hint.  Unfortunately, clustering
never occurred because kern_mmap() always replaced the given address
hint when it was zero.  So, the ASLR implementation always believed
that a non-zero hint had been provided and randomized the mapping's
location in the address space.  To fix this problem, I'm pushing down
the point at which we convert a hint of zero to the minimum allocatable
address from kern_mmap() to vm_map_find_min().

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D40743
2023-06-26 23:42:48 -05:00
John Baldwin
af296130ea nvme_xpt: Tidy nvme_announce_periph for fabrics support.
- Read the version from cts.protocol_version.

- Only check xport_specific.nvme for PCI-e info for XPORT_NVME.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D40618
2023-06-26 20:37:43 -07:00
John Baldwin
e932f0d2a3 cam_xpt: Properly fail if a sim uses an unsupported transport.
The default xport ops for a new bus is xport_default, not NULL, so
check for that when determining if a bus failed to find a suitable
transport.  In addition, the path needs to be freed with xpt_free_path
instead of a plain free so that the path's reference on the sim is
dropped; otherwise, cam_sim_free in the caller after xpt_bus_register
returns failure will hang forever.

Note that we have to exempt the xpt bus from this check as it uses
xport_default on purpose.

Reviewed by:	mav, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D40617
2023-06-26 20:36:06 -07:00
John Baldwin
9c2203a691 nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS.
- Replace a magic number with CTS_NVME_VALID_SPEC.

- Set the transport and protocol versions the same as for XPT_PATH_INQ.

Probably we shouldn't bother with setting the version in the 'spec'
member of ccb_trans_settings_nvme at all and use the transport
and/or protocol version field instead.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D40616
2023-06-26 20:32:29 -07:00
John Baldwin
1aaa8f670a nvme: Don't install nvme_private.h in /usr/include.
Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D40394
2023-06-26 20:30:45 -07:00
Tom Hukins
e495600ce3 netstat(1): Use simpler language
Reviewed by: imp, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/771
2023-06-26 17:07:27 -06:00
VexedUXR
780332f1c1 loader.efi: Remove redundant error message
efi_copy_init already prints an error message (with more information) if it fails.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/777
2023-06-26 16:57:31 -06:00
Tom Hukins
3df959b5fe nohup(1): link to a related manual page
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/783
2023-06-26 16:36:25 -06:00
Tom Hukins
70bc3f4331 timeout(1): link to related manual pages
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/783
2023-06-26 16:36:25 -06:00