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
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
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
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
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
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
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
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
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
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
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
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
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)