fib_algo: add FIB_ALGO to GENERIC kernel config on riscv
FIB_ALGO modular FIB lookups have been enabled by default on
amd64 and arm64 since 2021, so enable it on riscv as well.
Reviewed by: melifaro
MFC after: 1 month
fdread: Fix logic bug when reading by sector
When reading by sector (because reading a whole track failed), we can
accidentally fall into the "should not happen" path, which both
(a) emits a spurious error message and (b) fouls up our position
accounting going forward. Ensure we do not inappropriately fall into
that path.
Avoid obscuring the "short after" message in cases where it happens.
Signed-off-by: Matt Jacobson <mhjacobson at me.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1897
NOTES: Fix a typo in a comments
Signed-off-by: ykla yklaxds at gmail.com
Sponsored by: Chinese FreeBSD Community
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1899
libefivar: Support UefiDevicePathLib under StandaloneMm
This change added an instance of UefiDevicePathLib for StandaloneMm. It
abstracts DevicePathFromHandle function into different files for
Standalone MM and other instances to avoid linking gBS into MM_STANDALONE
drivers.
No functional change intended, as this function and its invocation are ifdefd
out.
Obtained from: https://github.com/tianocore/edk2/commit/14a746bb6a92d59669c67a970479558734cf2383
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
libefivar: Add and comment out unused functions
This commit introduces gratuitous white space and unused functions.
This functionality is guarded/commented out. This change is necessary
to reduce the differences with the reference file in subsequent commits.
No functional change intended.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
libefivar: Move functions to match reference file
Move a few functions to match their locations in the reference file.
No functional change intended.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
libefivar: Fix (some) typos
Fix typos in the files that are owned by the project.
Bring back a "duplicate word" removal (node node), which should have
been "node Node", the second "node" is not capitalized in the reference
file (yet). We'll bring it back capitalized to avoid it from triggering
automated checking scripts and possibly reverting this change again. A
few other typos were not fixed, as we strive to keep as close to the
reference files as possible, these fixes should be submitted to the
reference project (tianocore/edk2) in the not so distant future.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
Revert "kernel linker: Disable local sym resolution by default"
I've received a report of a failure from resolving kern_kmq_open.
Revert for now as we are currently in stabweek.
This reverts commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef.
Reported by: mav
nvme: Minor style(9) fixes
<sys/systm.h> needs to be first after <sys/param.h>. And we don't need
both sys/param.h and sys/types.h.
Fixes: 032fbda024d78
Sponsored by: Netflix
pf: relax sctp v_tag verification
pf was too strict when validating SCTP tags. When a server receives a
retransmitted INIT it will reply with a random initiate tag every time.
However, pf saves the first initiate tag and expects every subsequent INIT_ACK
retransmission to have the same tag. This is not the case, leading to endless
INIT/INIT_ACK cycles.
Allow the tag to be updated as long as we've not gone past COOKIE_WAIT.
Add a test case to verify this.
MFC after: 2 weeks
See also: https://redmine.pfsense.org/issues/16516
Sponsored by: Rubicon Communications, LLC ("Netgate")
kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK)
In general f_event is supposed to be called with the knlist mutex held,
so lock it earlier to follow this protocol. Also make sure that the
update to kn_fflags is synchronized.
Lock the kqueue itself earlier in the case where the knote is activated,
to avoid locking and unlocking the kqueue twice.
PR: 291005
Reported by: Qiu-ji Chen <chenqiuji666 at gmail.com>
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53762
(cherry picked from commit d795c753e262b97a93dc353aa66b858e1b1969d1)
kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK)
In general f_event is supposed to be called with the knlist mutex held,
so lock it earlier to follow this protocol. Also make sure that the
update to kn_fflags is synchronized.
Lock the kqueue itself earlier in the case where the knote is activated,
to avoid locking and unlocking the kqueue twice.
PR: 291005
Reported by: Qiu-ji Chen <chenqiuji666 at gmail.com>
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53762
(cherry picked from commit d795c753e262b97a93dc353aa66b858e1b1969d1)
libpfctl: improve error handling
If we fail to open /dev/pf don't try to close it again. That would result in
errno getting overwritten by close(), hiding potentially useful information.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
kernel linker: Disable local sym resolution by default
In 95c20faf11a1 and ecd8245e0d77 kib introduced support to have the
kernel linker stop resolving local symbols from other files, but did
not enable it by default to avoid surprises. Flip the default now,
before FreeBSD 16.0.
The debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals
sysctls are available to revert to the previous behaviour if necessary.
PR: 207898
Reviewed by: bz
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47742