loader.efi(8): the amd64 loader doesn't do protected mode
The amd64 UEFI loader executes in long mode, not protected mode.
Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57568
grep: periodic timer-based fflush instead of unconditional per-line flush
Replace the unconditional fflush(stdout) in grep_printline and
procmatches with a periodic timer that flushes at most once every
100ms. This preserves interactive responsiveness (grep | tee,
grep | tail -f) while avoiding 1M+ write(2) syscalls when
processing large inputs.
The flush interval is tracked via clock_gettime(CLOCK_MONOTONIC)
and a static timespec. --line-buffered continues to flush
immediately via setlinebuf(3), as before.
Benchmark on 1M lines (37MB output to file):
unconditional fflush: 1.90s (sys 1.22s)
periodic 100ms timer: 0.49s (sys 0.007s)
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57528
msun: Fix up for recent rsqrt[fl] functions
Paul Zimmermann (of Core-Math and MPFR fame) graciously tested
the recently committed rsqrt[fl]() functions. He identified 127
incorrectly rounded values for rsqrtf() in round-to-nearest mode.
This patch fixes the rounding in RN. Exhaustive testing now shows
that rsqrtf() is corrected rounded for RN. He also tested rsqrt()
and rsqrtl() in the interval [1,4). Both appear to be correctly
rounded. Finally, the patch includes small changes to comments.
A concise list of changes is
* lib/msun/src/s_rsqrt.c:
. Fix comments.
* lib/msun/src/s_rsqrtf.c
. Fix comments.
. Exhaustive testing by Paul Zimmermann found 127 incorrectly
rounded values in round-to-nearests. These gave have the
[12 lines not shown]
depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S
We have to switch back to the previous rule once the temporary
build fix has been replaced with a permanent fix.
PR: 295823
See also: 4996ebdb720042239a197ebec2d265cdfdf1bbf3
Reported by: siva
MFC after: 1 week
(cherry picked from commit 93221c277608d2612511eaabbf2bfc1f4b4250f7)
libc/riscv64: temporarily unhook strrchr() from the build
A bug was discovered in the riscv64 assembly implementation of
this function. Fall back to the generic implementation until a
fix can be developed.
PR: 295823
Reported by: siva
MFC after: 1 week
(cherry picked from commit 4996ebdb720042239a197ebec2d265cdfdf1bbf3)
linux_ntsync(9): check the file type before calling native ntsync(9)
Reported by: Alex S <iwtcex at gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
vnode: move VIRF_KNOTE to v_v2flag
The semantic of the flag has the natural march to the code scope that is
protected by the vnode lock.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56912
struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state
Use the avaliable space to introduce vnode-locked flag v_v2flag.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56912
sys/rangelock.h: explicitly enumerate padding at the end of the structure
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56912
vfs: work around the race between vget() and vnlru
Specifically, do not let vtryrecycle() to recycle a used vnode. It is
possible for a vnode to be vref-ed or vuse-ed lockless after it is held
by vhold_recycle_free(). Then, since vtryrecycle() does not recheck the
hold count, we might end up freeing vused vnode.
Since vget_finish() increments v_usecount after obtaining the vnode
lock, we would observe the hold reference anyway when the parallel
vget() is blocked waiting on the vnode lock.
PR: 281749
Reported and tested by: Steve Peurifoy <ssw01 at mathistry.net>, Vladimir Grebenshchikov <vova at zote.me>
Reviewed by: olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57305
rtld-elf: add some tests for parse_integer()
Reviewed by: des, dim
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57549
rtld parse_integer(): support binary, octal, and hex C notations
Reviewed by: des, dim
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57549
acl_to_text_nfs4.c: Fix a snprintf() for large uid
Commit 6e7c10c79dea fixed a couple of snprintf()s for large
uid/gid numbers above 2Gig. This patch fixes another one.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D57561
snd_uaudio: Support Roland UA-33
Apply the appropriate quirk. Also, introduce a new uaudio_vendor_audio
table, similar to uaudio_vendor_midi, which includes non-standard USB
audio devices. The Roland UA-33 needs this, bceause it comes with
bInterfaceClass = 0xff (vendor-specific), so snd_uaudio(4) doesn't
detect it.
PR: 294814
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: emaste
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/24
(cherry picked from commit 549e740619873716b796a841a10f56fae3c3ad49)