Be truly pedantic about UTF-8 encodings
If we're not going to be accepting "legacy" UTF-8
(5 and 6 byte encodings for code points >= 0x00200000 which the
standards don't allow, as they won't fit in UTF-16) then we
certainly should never be able to generate them, and even more
should certainly be pedantic about not allowing the various
forms of mis-coded strings for which there is no justification
but have been known to be used to attempt to violate security.
This, I believe, now enforces all the current restrictions, eg,
it will no longer be possible to encode ascii in 2 bytes (0xc0 '.')
and similar, the shortest legal encoding is all that will be
accepted (and all that will be generated, but that was always true).
It is quite possible that this will break things, probably many
tests, as now random garbage won't be accepted as valid, things
must be properly encodedd.
Pull up following revision(s) (requested by riastradh in ticket #348):
usr.sbin/npf/npftest/libnpftest/npf_rid_test.c: revision 1.4
adjust to holding the softnet_lock now that the kernel has changed to not do it.
Make sysinst intercept kernel console messages using TIOCCONS at all
times, not just when running an external command, and discard those
that occur when not running an external command so that they don't
mess up the display when running sysinst on the console. Fixes
PR install/54932.
Pull up following revision(s) (requested by isaki in ticket #347):
sys/arch/virt68k/virt68k/bus_dma.c: revision 1.5
Fill in bus_dmamap_sync() for 68030. Since 68030 caches are write-through,
this is pretty trivial: just invalidate the on-chip + any external D cache
in the PREREAD case. (See comment in code for why PREREAD is preferred
over POSTREAD.)
PR kern/60144
Pull up following revision(s) (requested by kbowling in ticket #2023):
sys/uvm/uvm_km.c: revision 1.168
uvm_km_pgremove: pmap_update before freeing pages
Update the commentary in uvm_km_free to reflect this reality while here
Reviewd by skrll@
PR kern/60376
Pull up following revision(s) (requested by kbowling in ticket #1293):
sys/uvm/uvm_km.c: revision 1.168
uvm_km_pgremove: pmap_update before freeing pages
Update the commentary in uvm_km_free to reflect this reality while here
Reviewd by skrll@
PR kern/60376
Pull up following revision(s) (requested by kbowling in ticket #346):
sys/uvm/uvm_km.c: revision 1.168
uvm_km_pgremove: pmap_update before freeing pages
Update the commentary in uvm_km_free to reflect this reality while here
Reviewd by skrll@
PR kern/60376
uvm_km_pgremove: pmap_update before freeing pages
Update the commentary in uvm_km_free to reflect this reality while here
Reviewd by skrll@
PR kern/60376
t_mbstowcs: Mark UTF-8 test cases xfail.
mbrtowc fails to reject invalid (legacy 5/6-byte) UTF-8.
Need to split this test up into:
1. correctly decoding the valid inputs
2. correctly rejecting the invalid inputs
Also don't stop at the first failing test in t_mbrtowc; keep going to
test everything, for better diagnostics at the end in the test
report.
As with t_mbrtowc, this should be split into multiple parts, TBD.
PR lib/60369: mbrtowc, mbrlen have wrong return value for some
invalid byte sequences: Invalid sequence
mm(4): Only grant kva exposure if user opens /dev/kmem.
Don't apply the same to /dev/null, /dev/zero, or anything else.
PR kern/60374: opening /dev/null exposes kva
compat32: Fix accidental use of error branch in recvmsg(2).
Avoids use-after-free / double-free.
PR kern/60373: compat32: kernel use-after-free in recvmsg
Pull up following revision(s) (requested by nia in ticket #2004):
lib/libnvmm/libnvmm.c: revision 1.21 (patch)
libnvmm(3): Check return value of malloc.
adapted from a patch by Aaron LI at DragonflyBSD, commit id
7c543ef0a3b08473f10dcc066e531c459fbc3879
Pull up following revision(s) (requested by kbowling in ticket #2022):
sys/uvm/uvm_km.c: revision 1.167
uvm_km_pgremove_intrsafe: drain TLB shootdown before freeing pages
Call pmap_update(pmap_kernel()) between pmap_kremove and the page
free so the shootdown completes first.
Reviewed by skrll@
Pull up following revision(s) (requested by kbowling in ticket #1292):
sys/uvm/uvm_km.c: revision 1.167
uvm_km_pgremove_intrsafe: drain TLB shootdown before freeing pages
Call pmap_update(pmap_kernel()) between pmap_kremove and the page
free so the shootdown completes first.
Reviewed by skrll@
Pull up following revision(s) (requested by kbowling in ticket #345):
sys/uvm/uvm_km.c: revision 1.167
uvm_km_pgremove_intrsafe: drain TLB shootdown before freeing pages
Call pmap_update(pmap_kernel()) between pmap_kremove and the page
free so the shootdown completes first.
Reviewed by skrll@