dtrace_fbt.4: Document the DTrace fbt provider
Reported by: markj
Reviewed by: christos, markj (earlier version), ziaee
Obtained from: Mark Johnston, DTrace, FreeBSD Journal, May 2014
Obtained from: https://wiki.freebsd.org/DTrace/One-Liners
MFC after: 2 weeks
Relnotes: yes
(cherry picked from commit 9388c2887817d7162ebb356b39aa9b4ab67a8c00)
Do not mention dtrace_kinst(4) as it is not available on FreeBSD 13.
db/hash.c: Allow O_WRONLY in dbm_open
The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSIX.1 allows O_WRONLY in dbm_open and states
that the underlying file must be opened for both reading and writing.
Fix this by correcting the O_WRONLY check and moving it further into
the function to make sure that the original flags are stored in hashp.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D51514
find: Put back clearing the NOSTAT bit
In fd186cd16eaf I read the condition backwards. We want to stat all the
time until we can implement something to do it more inteligently as
Jiles suggested in the review.
Fixes: fd186cd16eaf
Noticed by: des
Sponsored by: Netflix
file: Fix the !CAPABILITIES build
Reported by: Ian FREISLICH <ianfreislich at gmail.com>
Fixes: f35525ff2053 ("file: Add a fd flag with O_RESOLVE_BENEATH semantics")
(cherry picked from commit 6783dfb10637100067520bd6d9804e154cfee7ee)
makefs: zfs dataset mountpoints are considered non-empty
The dataset mountpoints get link count and size calculated by
content of dataset root directory, but this will break libzfs
dir_is_empty_stat() test.
For fix, we need to check if the directory is mountpoint for
dataset, and calculate the link count and size accordingly.
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D51593
makefs: clean up warnings
zfs/fs.c:
zfs/objset.c:
zfs/vdev.c:
zfs/zap.c:
Add include sys/param.h
dsl_dir_alloc() needs to set parent = NULL to silence warning
about 'parent' may be used uninitialized. Warning is given because
we break the loop when nextdir == NULL and parent was not previously set.
(it should not happen, but compiler does not know that).
zap_add() and zap_fat_write_array_chunk() takes uint8_t *, use type
cast.
zap_fat_write_array_chunk() should check sz for 0 to avoid
use of uninitialized pointer.
[4 lines not shown]
sys_swapon: reject too small devices
blist_create() panics on zero nblks.
Reported by: olivier
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51618
pci_iov: Support dynamic subordinate bus growth during VF creation
Certain SR-IOV devices enumerate Virtual Functions (VFs) on a different
PCIe bus than their parent Physical Function (PF). In such cases, the
default subordinate bus range assigned by BIOS may be insufficient to cover
all VFs.
This patch dynamically expands the subordinate bus range by:
- Allocating additional bus numbers using bus_alloc_resource() when VFs are
initialized
- Releasing the reserved bus range during VF deletion via
bus_release_resource()
Reviewed by: jhb
cross-build: Add a <endian.h> wrapper for macOS
This is required to build libkrb5support.
Fixes: 7e35117eb07f ("Makefile: Hook MIT KRB5 into the build")
ssh: Reduce sshd_config diffs against OpenSSH 10.0p2
Upstream had a poor description for KbdInteractiveAuthentication prior
to the 10.0p2 release. We use KbdInteractiveAuthentication for PAM
authentication, and we replaced the poor description with a note about
use by PAM.
In 10.0p2 the upstream description has been fixed. Incorporate that
text now as it is an improvement and avoids a conflict in the upcoming
10.0p2 import.
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
krb5: remove libedit from the bootstrap tools
libedit breaks the bootstrap on MacOS and Linux.
Activate libedit only for the regular build not for the bootstrap
tools
While here fix the definition of the dependency chain between
libkrb5ss and libedit (and libtinfow) via src.libnames.mk
Remove a local patch to find the readline compatible header and
find them via proper CFLAGS.
uk.kbd: Fix € mapping
We previously emitted the generic currency sign `¤` for Ctrl+4.
Generally speaking the modifer should be AltGr not Ctrl, and this should
be the Euro symbol `€`.
Fixes: eb8f9028fb38 ("Add the Euro symbol mapping to the UK keyboard keymap.")
Fixes: a232c1d130d2 ("Copy country-code .iso syscons keymaps for vt(4)")
Fixes: fdd869bd8a89 ("Another rpund of fixes, after checking keymaps for plausibility and with")
Reviewed by: ivy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50702
(cherry picked from commit 5c66d7a2b8a000b6307c0a12e78eb1b50376c9f8)
memcmp.3: Clarify return value
The return value is not required to be the difference between the
differing bytes, only less than zero, zero, or greater than zero.
Reviewed by: fuz
Event: Kitchener-Waterloo Hackathon 202406
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47683
(cherry picked from commit 5cc53d79655bf7f67b1a794c088d896aa6475c2e)
beep: Capsicumize
While it's unlikely that beep(1) will be used in a context where a
sandbox is particularly valuable, it does offer a simple demonstration
of entering a capability sandbox after opening required fds, and is
trivial to do.
Reviewed by: christos
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50709
(cherry picked from commit 54eda43cc1e6b1d73804b6c397a15002e3519555)
ufs: Pass the new parent inode number to ufs_dirrewrite()
Despite the name, isrmdir is not a boolean-valued, it is also used to
pass a new parent inode number down to the SU layer.
Fixes: 98eb6f0eaa50 ("ufs: restore conditional")
Reviewed by: kib
Reported by: syzbot+fbfff9613b6dab616124 at syzkaller.appspotmail.com
Reported by: syzbot+02cb048d48b51bcd9c41 at syzkaller.appspotmail.com
Reported by: syzbot+98c39c45a437812f7683 at syzkaller.appspotmail.com
Reported by: syzbot+6fb8cb919cc686d1a1d0 at syzkaller.appspotmail.com
Reported by: syzbot+fb35cce6a6f5075a6692 at syzkaller.appspotmail.com
Reported by: syzbot+602fb6ee1a39abfd3b5c at syzkaller.appspotmail.com
Reported by: syzbot+5cb82352555d5d505640 at syzkaller.appspotmail.com
Reported by: syzbot+6a4ea1e13f4e07369785 at syzkaller.appspotmail.com
Reported by: syzbot+18722c8e4008048efb51 at syzkaller.appspotmail.com
netinet6: Don't return non-IPv6 enabled interfaces from in6_getlinkifnet()
There are scenarios where we can end up looking up an interface by its scope and
turn up an interface that doesn't have IPv6 enabled on it. If that happens we
could end up dereferencing a NULL pointer accessing ifp->if_afdata[AF_INET6].
Check for this.
One such scenario is if a firewall rewrites a destination address to a
link-local address, with an embedded scope for such an interface. Attach a test
case which provokes this.
PR: 288263
Reported by: Robert Morris <rtm at lcs.mit.edu>
Reviewed by: zlei
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D51500