Commit graph

270890 commits

Author SHA1 Message Date
John Baldwin
b52bfacc1e Remove redundant OLD_FILES entries for debug symbols.
Entries for foo.debug files matching an existing entry in OLD_FILES or
OLD_LIBS are unnecessary as they are auto-generated.

Reviewed by:	imp, emaste
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33777

(cherry picked from commit ebc1c24695)
2022-07-13 08:22:24 -07:00
John Baldwin
e3f9397aea Add list-old-{dirs,files,libs} targets.
These targets generate a raw list of the candidate old files roughly
corresponding to the values of OLD_DIRS, OLD_FILES, and OLD_LIBS.
Currently list-old-files also includes uncompressed manpages in
addition to compressed manpages.

Use these targets in the implementation of check-old-* and
delete-old-* to replace duplicated logic.

Reviewed by:	imp, emaste
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33327

(cherry picked from commit 21baf42c57)
2022-07-13 08:22:24 -07:00
Mike Karels
913ebccc8e netstat -i: do not truncate interface names
The field for interface names for netstat -i was 5 characters by
default, which is no longer sufficient with names like "vlan1234"
and "vtnet0".  netstat -iW computed the necessary field width, but
also enlarged the address field by a lot (especially with IPv6 enabled).
Make netstat -i compute the field width for interface names with or
without -W.  Note that the existing default output does not fit in
80 columns in any case.  Update the man page accordingly, documenting
the remaining effect of -W with -i.  Also add -W to the list of
General Options, as there are numerous pointers to this.

Reported by:	Chris Ross
Reviewed by:	melifaro, rgrimes, cy
Differential Revision: https://reviews.freebsd.org/D35703

(cherry picked from commit 231092bb6f)
2022-07-13 08:20:03 -05:00
Dmitry Chagin
6fddab804a amd64: Reload CPU ext features after resume or cr4 changes
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D35555
MFC after:		2 weeks

(cherry picked from commit 050f5a8405)
2022-07-13 14:48:49 +03:00
Dmitry Chagin
34b00959fb linprocfs: Decode SGX CPU feature in cpuinfo
MFC after:		2 weeks

(cherry picked from commit c8e7070ce3)
2022-07-13 14:48:38 +03:00
Dmitry Chagin
9736c19884 linprocfs: Decode more CPU flags in cpuinfo
Differential revision:	https://reviews.freebsd.org/D35556
MFC after:		2 weeks

(cherry picked from commit 7ab03740ae)
2022-07-13 14:48:27 +03:00
Dmitry Chagin
f56ea6b7d0 linprocfs: Decode constant_tsc CPU feature
Differential revision:	https://reviews.freebsd.org/D35554
MFC after:		2 weeks

(cherry picked from commit 8da00a514e)
2022-07-13 14:48:14 +03:00
Warner Losh
82a8b8f0cf lastcomm/sa: Remove sparc64 tests, they aren't needed.
Fix delete-old, since 22375931 MFC, annoy to delete them manually
every make delete-old.

These tests will run only on a sparc64 system, and so never run anymore.

Sponsored by:		Netflix

(cherry picked from commit d6dffbae96)
2022-07-13 14:17:40 +03:00
Konstantin Belousov
c41bc56574 ufs_rename(): revert the bump of fvp nlink count in case of EMLINK for tdvp
(cherry picked from commit 513e1bbc73)
2022-07-13 11:38:01 +03:00
Konstantin Belousov
a924a143dd ufs_rename(): do not treat ERELOOKUP specially
(cherry picked from commit ab5ef5fb63)
2022-07-13 11:38:01 +03:00
Konstantin Belousov
0aa68d5fbe UFS rename: make it reliable when using SU and reaching nlink limit
PR:	165392

(cherry picked from commit bc6d0d72f4)
2022-07-13 11:38:01 +03:00
Doug Moore
0a7f5f1885 mips busdma: expunge an extra closing brace
A merge left a dangling right brace unaccounted for.
Delete it.

Reported by:	jenkins
2022-07-12 13:47:44 -05:00
Dimitry Andric
72e9fd9daa Apply tentative llvm fix for avoiding fma on PowerPC SPE
Merge llvm review D77558, by Justin Hibbits:

  PowerPC: Don't hoist float multiply + add to fused operation on SPE

  SPE doesn't have a fmadd instruction, so don't bother hoisting a
  multiply and add sequence to this, as it'd become just a library call.
  Hoisting happens too late for the CTR usability test to veto using the CTR
  in a loop, and results in an assert "Invalid PPC CTR loop!".

Reported by:		alfredo
Obtained from:		https://reviews.llvm.org/D77558
MFC after:		3 days

(cherry picked from commit 9ef1127008)
2022-07-12 20:29:55 +02:00
Dimitry Andric
b36f85590d Apply clang fix for assertion building llvm with libc++ 15
Merge commit f1b0a4fc540f from llvm git (by Richard Smith):

  An expression should only contain an unexpanded parameter pack if it
  lexically contains a mention of the pack.

  Systematically distinguish between syntactic and semantic references to
  packs, especially when propagating dependence from a type into an
  expression. We should consult the type-as-written when computing
  syntactic dependence and should consult the semantic type when computing
  semantic dependence.

  Fixes #54402.

MFC after:	3 days

(cherry picked from commit 3b7f365e4d)
2022-07-12 20:29:46 +02:00
Doug Moore
069ec467c1 iommu_gas: Drop needless bound check in lowermatch
The loop iteration in iommu_gas_lowermatch checks the bound
a->common->lowaddr twice per loop iteration. Rewrite to test only once
per iteration.  Do not worry about passing to iommu_gas_match_one a
range wholly beyond lowaddr. Since that function checks the upper end
of the range against lowaddr, it'll get rejected there.

Reviewed by:	alc
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35522

(cherry picked from commit 70b5d8fa0f)
2022-07-12 12:37:48 -05:00
Doug Moore
094bcfa4e1 mips_busdma: fix mips errors after merge
The change "vm_extern: use standard address checkers everywhere"
introduced bugs, as well as features, into head. After it was
introduced, but before those bugs were addressed, mips support was
dropped from head, so those mips bugs were never fixed in head. Now,
that change and those fixes have been merged into stable/13. This
change fixes two of those bugs that were fixed everywhere else but
never in mips.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D35793
2022-07-12 12:33:20 -05:00
Doug Moore
48d01e24f9 vm_addr_ok: add power2 invariant check
With INVARIANTS defined, have vm_addr_align_ok and vm_addr_bound_ok
panic when passed an alignment/boundary parameter that is not a power
of two.

Reviewed by:	alc
Suggested by:	kib, se
Differential Revision:	https://reviews.freebsd.org/D33725

(cherry picked from commit ae13829ddc)
2022-07-12 11:26:12 -05:00
Doug Moore
01f79c9da8 busdma: _bus_dmamap_addseg repaired
A recent change introduced a one-off error into a test allowing
coalescing chunks into segments.  This fixes that error.

broke a check in _bus_dmamap_addseg on many architectures. This change makes it clear that it is not a particular range that is being boundary-checked, but the proposed union of the two adjacent ranges.
Reported by:	se
Reviewed by:	se
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
Differential Revision:	https://reviews.freebsd.org/D33715

(cherry picked from commit f1e7a532d1)
2022-07-12 11:26:11 -05:00
Doug Moore
ab0f2ae2ee x86-busdma - Add missing paren
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere

(cherry picked from commit b7810e05ff)
2022-07-12 11:26:10 -05:00
Doug Moore
3af858bd8f riscv-busdma: Balance parens.
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere

(cherry picked from commit b496126886)
2022-07-12 11:26:08 -05:00
Doug Moore
0cbb744f96 iommu_gas: Rename a function missed earlier
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere

(cherry picked from commit cfb2aa3f53)
2022-07-12 11:26:07 -05:00
Doug Moore
6f387a5632 vm_reserv: #include vm_extern.h explicitly, for arm.
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
(cherry picked from commit f76916c095)
2022-07-12 11:26:06 -05:00
Doug Moore
bf27b9bc7f vm_phys: convert error back to warning
Move an assignment back to where it was before, to turn the
defined-but-not-used error back into a set-but-not-used warning.

Fixes:	01e115ab83 vm_phys: #include vm_extern
(cherry picked from commit e6930b1c5f)
2022-07-12 11:26:05 -05:00
Doug Moore
87e6f3d27e vm_phys: #include vm_extern
Arm64 and powerpc don't include vm_extern.h indirectly in vm_phys.c, which
means that for the sake of those architectures, it must be included explicitly.

Also, fix a set-unused warning that jenkins also found.

Reported by:	Jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere

(cherry picked from commit 01e115ab83)
2022-07-12 11:26:04 -05:00
Doug Moore
c5a5a9dbcf vm_extern: use standard address checkers everywhere
Define simple functions for alignment and boundary checks and use them
everywhere instead of having slightly different implementations
scattered about. Define them in vm_extern.h and use them where
possible where vm_extern.h is included.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D33685

(cherry picked from commit c606ab59e7)
2022-07-12 11:26:03 -05:00
Mateusz Piotrowski
b70b138611 ftp: Use /var/spool/ftp as ftp's home consistently
The home directory of the ftp user is /var/spool/ftp according to
hier(7). Update the manual page of ftpd(8) to reflect that.

MFC after:	2 weeks

(cherry picked from commit bad2f716f4)
2022-07-12 10:39:48 +02:00
Mateusz Piotrowski
444a6c982f sesutil.8: Polish
- Use right mdoc macros
- Fix synopsis. Some of the optional command modifiers were not optional
  after all.
- Sort options

MFC after:	1 week

(cherry picked from commit 4e3dc91e4c)
2022-07-12 10:39:48 +02:00
Dmitry Chagin
f8da863470 linux(4): Implement __vdso_time
PR:		240769
MFC after:	3 days

(cherry picked from commit 42317e6426)
2022-07-12 00:28:28 +03:00
Dmitry Chagin
00c933e925 linux(4): Use saved cpu feature bits
MFC after:		3 days

(cherry picked from commit 03473e8ec8)
2022-07-12 00:28:11 +03:00
Dag-Erling Smørgrav
625bc476c6 Catch up with 2004 and improve markup.
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35676

(cherry picked from commit 42db2dbbc5)
2022-07-11 21:44:54 +00:00
Dag-Erling Smørgrav
f639aeb3fd Enable CRC64 checksums in xz.
Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35668

(cherry picked from commit 038405f32f)
2022-07-11 21:43:34 +00:00
Cy Schubert
34cf2ab49b unbound: Vendor import 1.16.0
Merge commit '5f9f82264b91e041df7cba2406625146e7268ce4' into main

(cherry picked from commit a39a5a6905)
2022-07-11 05:55:11 -07:00
Mike Karels
5919cf3218 mountd startup: enable NFSv4 if needed on restart
The mountd script in rc.d sets vfs.nfsd.server_max_nfsvers correctly
when it is run at system startup, relying on the kernel default.
However, if NFSv4 was enabled in /etc/rc.conf later, and the script
was re-run to restart mountd, the sysctl was still set to 3.
Set the sysctl to the right value in all cases.

Reviewed by:	rmacklem

(cherry picked from commit 1cf8e6339e)
2022-07-11 07:43:58 -05:00
Doug Moore
bb75580e03 bitstring: fix ff_area() when start!=0
commit 84e2ae64c5 introduced an error in the ff*_area_at
functions for nonzero start parameters when the bit range sought was
found immediately. It mistakenly replaced '_value = _start' with
'_value = 0' in initialization. Undo that mistake.

Reported by:	markj
Reviewed by:	markj
Tested by:	markj
Fixes:	84e2ae64c5 vm_reserv: use enhanced bitstring for popmaps
Differential Revision:	https://reviews.freebsd.org/D35157

(cherry picked from commit 6e7a585348)
2022-07-11 01:01:30 -05:00
John Baldwin
897877ae64 <sys/bitstring.h>: Cast _BITSTR_BITS to int in a ternary operator.
This fixes a -Wsign-compare error reported by GCC due to the two
results of the ternary operator having differing signedness.

Reviewed by:	dougm, rlibby
Differential Revision:	https://reviews.freebsd.org/D34122

(cherry picked from commit 8a67a1a964)
2022-07-11 01:01:12 -05:00
Doug Moore
b1290f4746 vm_reserv: use enhanced bitstring for popmaps
vm_reserv.c uses its own bitstring implemenation for popmaps. Using
the bitstring_t type from a standard header eliminates the code
duplication, allows some bit-at-a-time operations to be replaced with
more efficient bitstring range operations, and, in
vm_reserv_test_contig, allows bit_ffc_area_at to more efficiently
search for a big-enough set of consecutive zero-bits.

Make bitstring changes improve the vm_reserv code.  Define a bit_ntest
method to test whether a range of bits is all set, or all clear.
Define bit_ff_at and bit_ff_area_at to implement the ffs and ffc
versions with a parameter to choose between set- and clear- bits.
Improve the area_at implementation.  Modify the bit_nset and
bit_nclear implementations to allow code optimization in the cases
when start or end are multiples of _BITSTR_BITS.

Add a few new cases to bitstring_test.

Discussed with:	alc
Reviewed by:	markj
Tested by:	pho (earlier version)
Differential Revision:	https://reviews.freebsd.org/D33312

(cherry picked from commit 84e2ae64c5)
2022-07-11 00:54:06 -05:00
Doug Moore
88a5d20e90 vm: alloc pages from reserv before breaking it
Function vm_reserv_reclaim_contig breaks a reservation with enough
free space to satisfy an allocation request and returns the free space
to the buddy allocator. Change the function to allocate the request
memory from the reservation before breaking it, and return that memory
to the caller. That avoids a second call to the buddy allocator and
guarantees successful allocation after breaking the reservation, where
that success is not currently guaranteed.

Reviewed by:	alc, kib (previous version)
Differential Revision:	https://reviews.freebsd.org/D33644

(cherry picked from commit 0d5fac2872)
2022-07-11 00:41:07 -05:00
Doug Moore
b52d35520c Fix clerical error in page alloc
Fix a very recent change that introduced a page accounting error in
case of a reserveration being broken.
Reviewed by:	alc
Fixes:	fb38b29b56 (page_alloc_br) vm_page: Remove extra test, dup code from page alloc
Differential Revision:	https://reviews.freebsd.org/D33645

(cherry picked from commit 184c63db3c)
2022-07-11 00:41:06 -05:00
Doug Moore
a8d3ef5bc6 vm_page: Remove extra test from page alloc
Extract code from vm_page_alloc_contig_domain into a new function.  Do
so in a way that eliminates a bound-to-fail reservation test after a
reservation is broken by a call from vm_page_alloc_contig_domain.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D33551

(cherry picked from commit fb38b29b56)
2022-07-11 00:41:05 -05:00
Doug Moore
86299ec1c4 vm_phys: hide vm_phys_set_pool
It is only called in the file that defines it, so make it static and
remove the declaration from the header.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D33688

(cherry picked from commit 8119cdd38b)
2022-07-11 00:41:04 -05:00
Yuri
81fe400fb1 ipmi: do not omit lun in BMC addresses
Some systems put sensors on non-0 lun, so we should not omit it.  This
was the only difference with the Linux driver, where DIMM sensors could
be queried, but not on FreeBSD.

See this report[1] on the FreeBSD forums:
https://forums.freebsd.org/threads/freebsd-cannot-get-dimm-temperature-sensor-value.85166/

Reviewed by:	philip
Tested by:	Andrey Lanin[1]
Differential Revision: https://reviews.freebsd.org/D35612

(cherry picked from commit 177f8b3294)
2022-07-11 11:10:23 +08:00
Yuri
1549a6172f ipmi: correctly handle ipmb requests
Handle IPMB requests using SEND_MSG (sent as driver request as we do not
need to return anything back to userland for this) and GET_MSG (sent as
usual request so we can return the data for RECEIVE_MSG ioctl) pair.

This fixes fetching complete sensor data from boards (e.g. HP ProLiant
DL380 Gen10).

Reviewed by:	philip
Differential Revision: https://reviews.freebsd.org/D35605

(cherry picked from commit 18db96dbfd)
(cherry picked from commit c4995b69db)
2022-07-11 11:10:05 +08:00
Doug Moore
689d65d736 tree.3: document RB_AUGMENT
Document the RB_AUGMENT macro, and provide an example of its use.
Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35518

(cherry picked from commit a8380d272a)
2022-07-09 22:57:44 -05:00
Kirk McKusick
cb59f7dd22 Correctly update fs_dsize in growfs(8)
When growing a UFS/FFS filesystem, the size of the summary information
may expand into additional blocks. These blocks must be removed from
fs_dsize which records the number of blocks in the filesystem that can
be used to hold filesystem data.

While here also update the fs_old_dsize and fs_old_size fields for
compatibility with kernels that were compiled before the addition
of UFS2.

(cherry picked from commit 2049cc3218)
2022-07-08 14:46:16 -07:00
Kirk McKusick
e349fcc80a Eliminate set but not used variable.
No functional change intended.

(cherry picked from commit 78dfcf256a)
2022-07-08 14:46:16 -07:00
Mateusz Piotrowski
65a490aa9a rc.8: Reference the article about rc scripting
MFC after:	3 days

(cherry picked from commit 604bc078a5)
2022-07-08 12:05:49 +02:00
Mateusz Piotrowski
534f445990 tslog.4: Document what TSLOG excels at
Based on an email mhorne@ sent to arch@.

Reviewed by:	debdrup, pauamma_gundo.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34565

(cherry picked from commit 9e337d53de)
2022-07-08 12:05:48 +02:00
Dmitry Morozovsky
830d566254 build(7): fix references to svn(1) and svnlite(1)
Replace them with references to Git.

PR:	254937
Reported by:	m.bueker@berlin.de
Differential Revision:	https://reviews.freebsd.org/D29949

(cherry picked from commit e444a4c677)
2022-07-08 11:58:18 +03:00
Gordon Bergling
0a93e8e360 snmp_hostres(3): Fix a typo in a debug message
- s/atempt/attempt/

(cherry picked from commit c7b9006af5)
2022-07-08 04:25:18 +02:00
Gordon Bergling
7dff1d4be7 aic7xxx: Fix a few common typos in source code comments
- s/ingnore/ignore/
- s/ingnored/ignored/

(cherry picked from commit 9bfefcea43)
2022-07-08 04:25:03 +02:00