FreeBSD/src b8529e7usr.sbin/devinfo devinfo.c devinfo.8

devinfo: Distinguish resources owned by unnamed devices from free resources

For resources owned by an unnamed device, list the device name as
"(unknown)" instead of using "----".  In addition, if the -v flag is
given, output the pnpinfo and location info for the device if present.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D48676
DeltaFile
+11-3usr.sbin/devinfo/devinfo.c
+1-1usr.sbin/devinfo/devinfo.8
+12-42 files

FreeBSD/src 7554746. ObsoleteFiles.inc, lib/libdevinfo Makefile devinfo.c

libdevinfo: Avoid false positives for the root0 sentinel value

Previously, a NULL pointer value was used to request the root0 device
at the top of the device tree.  However, this meant that resource
ranges from a rman with a NULL device pointer were annotated as being
owned by root0 instead of being unowned.  Switch to a different value
for root0's sentinel to avoid the clash.

Since this is an ABI change, bump the SHLIB_MAJOR for libdevinfo to 7.

Reported by:    jrtc27
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D48675
DeltaFile
+3-0ObsoleteFiles.inc
+1-1lib/libdevinfo/Makefile
+1-1lib/libdevinfo/devinfo.c
+1-1lib/libdevinfo/devinfo.h
+6-34 files

FreeBSD/src c06b504sys/dev/fdt simplebus.c

simplebus: Stop accepting SYS_RES_IOPORT resources

Child devices handling I/O port resources (such as PCI-e bridges)
should map those to a memory resource and pass up a request for the
translated memory resource.

Differential Revision:  https://reviews.freebsd.org/D48501
DeltaFile
+0-3sys/dev/fdt/simplebus.c
+0-31 files

FreeBSD/src e91117fshare/man/man7 mitigations.7

Improve the stack clash protection description.

Despite not being mentioned in the docs of gcc and clang, the stack
clash protection is architecture / implementation dependent.
Reported by:    jrtc27
DeltaFile
+4-3share/man/man7/mitigations.7
+4-31 files

FreeBSD/src 6dcdd79usr.sbin/ip6addrctl ip6addrctl.c ip6addrctl.8

ip6addrctl(8): Teach ip6addrctl to attach and run itself in a jail

This will make it easier to manage address selection policies of vnet
jails, especially for those light weighted OCI containers or slim jails.

Requested by:   dfr
Reviewed by:    dfr, markj
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D48679
DeltaFile
+68-17usr.sbin/ip6addrctl/ip6addrctl.c
+11-1usr.sbin/ip6addrctl/ip6addrctl.8
+7-0usr.sbin/ip6addrctl/Makefile
+86-183 files

FreeBSD/src 13ce55busr.sbin/ip6addrctl ip6addrctl.c

ip6addrctl(8): Strictly check the number of arguments

The additional arguments are useless but may tempt user a wrong usage.

Reviewed by:    dfr
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D48701
DeltaFile
+6-4usr.sbin/ip6addrctl/ip6addrctl.c
+6-41 files

FreeBSD/src 6f34788usr.bin/colrm colrm.c

colrm(1): Replace magic exit codes with standard macros

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1496

(cherry picked from commit fc26f24b3ef276b2a9f73c9778aecff7377b1aeb)
DeltaFile
+6-7usr.bin/colrm/colrm.c
+6-71 files

FreeBSD/src 6285abfusr.bin/nl nl.c

nl(1): Capsicumise the utility

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1465

(cherry picked from commit dfd52321b7beba716fa2bdd4f54e57e9ac806e96)
DeltaFile
+7-0usr.bin/nl/nl.c
+7-01 files

FreeBSD/src a6d0bc7usr.bin/perror perror.c

perror(1): Replace magic exit codes with standard macros

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492

(cherry picked from commit 4dd6597a56f8c7ff03d4f451b612a9e45442c549)
DeltaFile
+4-4usr.bin/perror/perror.c
+4-41 files

FreeBSD/src 8cf0915usr.bin/perror perror.c

perror(1): Reorder headers alphabetically to meet style(9) compliance

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492

(cherry picked from commit 82e9f8c2d19ba5d132438a764352eb3b4826fc58)
DeltaFile
+4-3usr.bin/perror/perror.c
+4-31 files

FreeBSD/src 75c8e11usr.bin/leave leave.c

leave: we should also cache time zone

MFC after:      1 week

(cherry picked from commit 08a38bb098e96f2ec77b26fab3b22bc4be89332a)
DeltaFile
+1-0usr.bin/leave/leave.c
+1-01 files

FreeBSD/src ef3914ausr.bin/leave leave.c

leave(1): Replace magic exit codes with standard macros

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1499

(cherry picked from commit f7a6cf3a020600b77795729d1c01780dae8e6d2e)
DeltaFile
+9-9usr.bin/leave/leave.c
+9-91 files

FreeBSD/src 15261beusr.bin/leave leave.c

leave(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1499

(cherry picked from commit 24a7303821ad2343b9239ab3d12a569a70a2b99a)
DeltaFile
+6-0usr.bin/leave/leave.c
+6-01 files

FreeBSD/src ac068edusr.bin/perror perror.c

perror(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492

(cherry picked from commit adc02d5e3cfad9c9d7e12f776cad651795d9ad78)
DeltaFile
+7-0usr.bin/perror/perror.c
+7-01 files

FreeBSD/src a7a1b23usr.bin/colrm colrm.c

colrm(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1496

(cherry picked from commit 95498a5acc0888ed2e73237b82a1e90f109473f9)
DeltaFile
+6-0usr.bin/colrm/colrm.c
+6-01 files

FreeBSD/src 0078df5sys/vm vm_phys.c vm_page.c

vm_phys: reduce touching of page->pool fields

Change the usage of the pool field in vm_page structs.

Currently, every page belongs to a pool, and the pool field identifies
that pool, whether the page is allocated or free.

With this change, the pool field of the first page of a free block is
used by the buddy allocator to identify its pool, but the buddy
allocator makes no guarantees about the pool field value for allocated
pages. The buddy allocator requires that a pool parameter be passed as
part of freeing memory. A function that allocates memory may use the
pool field of a page to record what pool to pass as that parameter
when the memory is freed, but might not need to do so for every
allocated page.

Suggested by:   alc
Reviewed by:    markj (previous version)
Tested by:      pho
Differential Revision:  https://reviews.freebsd.org/D45409
DeltaFile
+66-57sys/vm/vm_phys.c
+50-47sys/vm/vm_page.c
+16-15sys/vm/vm_reserv.c
+3-3sys/vm/vm_phys.h
+1-1sys/vm/vm_kern.c
+136-1235 files

FreeBSD/src 73e8049sys/dev/ath if_ath.c

ath(4): Fix a typo in a source code comment

- s/isnt/isn’t/

(cherry picked from commit 6fbf8502a5004a99847bda57b4875b567c7ca018)
DeltaFile
+1-1sys/dev/ath/if_ath.c
+1-11 files

FreeBSD/src 59e4c02libexec/bootpd/tools/bootptest print-bootp.c

bootptest: Fix a typo in a source code comment

- s/tralier/trailer/

(cherry picked from commit 5da0eee3d842bd0bef2c95553e75e462cda27ee6)
DeltaFile
+1-1libexec/bootpd/tools/bootptest/print-bootp.c
+1-11 files

FreeBSD/src 3dc41absys/net80211 ieee80211_sta.c

net80211: Fix a typo in a source code comment

- s/isnt/isn’t/

(cherry picked from commit abcbde5d68f1fb6fa21fe2c24e04901a53f15798)
DeltaFile
+1-1sys/net80211/ieee80211_sta.c
+1-11 files

FreeBSD/src 2239ae7sys/dev/ath if_ath.c

ath(4): Fix a typo in a source code comment

- s/isnt/isn’t/

(cherry picked from commit 6fbf8502a5004a99847bda57b4875b567c7ca018)
DeltaFile
+1-1sys/dev/ath/if_ath.c
+1-11 files

FreeBSD/src 676794alibexec/bootpd/tools/bootptest print-bootp.c

bootptest: Fix a typo in a source code comment

- s/tralier/trailer/

(cherry picked from commit 5da0eee3d842bd0bef2c95553e75e462cda27ee6)
DeltaFile
+1-1libexec/bootpd/tools/bootptest/print-bootp.c
+1-11 files

FreeBSD/src 75a7424sys/net80211 ieee80211_sta.c

net80211: Fix a typo in a source code comment

- s/isnt/isn’t/

(cherry picked from commit abcbde5d68f1fb6fa21fe2c24e04901a53f15798)
DeltaFile
+1-1sys/net80211/ieee80211_sta.c
+1-11 files

FreeBSD/src b77fe5esys/dev/smartpqi smartpqi_request.c

smartpqi(4): Fix a typo in a source code comment

- s/isnt/isn’t/

(cherry picked from commit b0c318efdde7c1b059b26f1ab6d4c75e838b6652)
DeltaFile
+1-1sys/dev/smartpqi/smartpqi_request.c
+1-11 files

FreeBSD/src 94fb5absys/cddl/dev/dtrace/aarch64 dtrace_isa.c

Revert "dtrace/arm64: Simplify dtrace_getarg() slightly"

The change is clearly wrong as it removes a dereference of the pointer
into the stack.  Just revert for now.

This reverts commit 70c067062217a5295ed321427b91cfd857c18b77.

Reported by:    jrtc27
DeltaFile
+3-1sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
+3-11 files

FreeBSD/src 4da070csys/cddl/dev/fbt/aarch64 fbt_isa.c

dtrace/arm64: Fix enumeration of FBT return probes

On arm64, the FBT provider treats tail calls as return probes.  Ignoring
the question of whether this is really correct, the implementation is
wrong: instr is a pointer to uint32_t, so the removed multiplication by
the instruction size is wrong.  As a result, FBT would create return
probes for intra-function branches.

MFC after:      2 weeks
Sponsored by:   Innovate UK
DeltaFile
+1-2sys/cddl/dev/fbt/aarch64/fbt_isa.c
+1-21 files

FreeBSD/src 70c0670sys/cddl/dev/dtrace/aarch64 dtrace_isa.c

dtrace/arm64: Simplify dtrace_getarg() slightly

The use of memcpy here is redundant, and also incorrect since memcpy()
might be instrumented by fbt or kinst.  dtrace_bcopy() exists, but we
don't need it.

MFC after:      2 weeks
Sponsored by:   Innovate UK
DeltaFile
+1-3sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
+1-31 files

FreeBSD/src 5168813cddl/contrib/opensolaris/lib/libdtrace/common dt_dis.c

libdtrace: Use designators to initialize the opcode array

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Innovate UK
DeltaFile
+80-80cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c
+80-801 files

FreeBSD/src 21502f9lib/csu/common crtend.c

crtend: accurately check for the start of .ctors

For the hypothetic situation where crtbegin.o is not linked into the
binary, but crtend.o is, which results in the missing starting sentinel
in the ctors array, be careful to not iterate past the start of the
section.

Reviewed by:    andrew, dim
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D48700
DeltaFile
+9-2lib/csu/common/crtend.c
+9-21 files

FreeBSD/src 6ee34bclib/csu/common crtbegin.c

crtbegin: accurately check for the end of .dtors

not relying only on the end section marker, but also checking for the
section size when iterating.

Reported by:    kargl
Analyzed by:    dim
Reviewed by:    andrew, dim
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D48700
DeltaFile
+9-1lib/csu/common/crtbegin.c
+9-11 files

FreeBSD/src 0f1f6d1sys/sys mount.h, sys/ufs/ffs ffs_vfsops.c

fs: Add new VFCF_xxx flags for va_filerev

Richard Kojedzinszky <richard at kojedz.in> reported a problem via
email, where the Linux NFSv4.2 client did not detect a change in a
directory on a FreeBSD NFSv4.2 server.

Adding support for the NFSv4.2 change_attr_type attribute seems
to have fixed the problem. This requires that the server file system
indicate if it increments va_filerev by one, since that file attribute
is used for the NFSv4.2 change attribute.  Fuse requires an indication
that va_filerev is based on ctime.

This patch adds VFCF_FILEREVINC and VFCF_FILEREVCT to indicate this.

A future patch to the NFS server will use these flags.

(cherry picked from commit 1cd455f39d886f27c33f7726f79fc4cc566da7b3)
DeltaFile
+2-0sys/sys/mount.h
+1-1sys/ufs/ffs/ffs_vfsops.c
+3-12 files