tests/procdesc: Fix race in pdopenpid_pdwait_only_one
The child exited immediately after pdfork(), so the parent's pdopenpid() could
catch it mid-exit (P_WEXIT) and fail with EBUSY.
Block the child on a pipe until the parent has opened the second descriptor,
then release it
Approved by: markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58546
if_vxlan(4): Fix panic by validating unused drvspec values
Add validation for unused parameter values in the gap between
VXLAN_PARAM_WITH_LOCAL_ADDR4 and VXLAN_PARAM_WITH_LOCAL_ADDR6 to prevent
panics.
PR: 297151
Reported by: Robert Morris <rtm at lcs.mit.edu>
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D58552
igbv: Sanitize retained VF queue state
82576 and I350 VFLR leave queue configuration unchanged. A previous
VF owner can therefore leave a transmit head-writeback DMA destination
and other queue policy for the next guest.
After each reset attempt, disable all exposed VF queues and wait for
their enable bits to clear before clearing SRRCTL, VFPSRTYPE, RXCTRL,
TXCTRL, and TDWBAL/H. Spin briefly and then sleep until the bounded
queue-disable deadline.
iflib cannot report initialization failure and marks an interface
running after its init callback returns. On sanitation failure, keep
interrupts disabled and use the deferred admin task to clear RUNNING.
Retry after 100 and 500 ms; after three total failures, leave the
interface down until another administrative initialization starts a
new bounded attempt set.
igbv uses queue zero on both families, but 82576 exposes a second VF
[8 lines not shown]
igb: Sanitize retained VF queue state
82576 and I350 VFLR leave the VF queue configuration unchanged. A VF
can program transmit head write-back and leave its DMA destination for
a later VF owner; mainstream VF drivers do not overwrite TDWBAL/H.
Disable every receive and transmit queue assigned to the VF, wait for
the enable bits to clear, then clear SRRCTL, PSRTYPE, RXCTRL, TXCTRL,
and TDWBAL/H. Spin briefly for the normal transition, then sleep at
100 microsecond intervals with an approximately 1 ms bound. This
prevents a VF that keeps asserting QUEUE_ENABLE from busy-waiting the
PF context lock for 10 ms.
If a queue does not quiesce, leave the VF disabled and NACK its reset
rather than programming an active queue. Rate-limit this diagnostic
independently from mailbox and malicious-driver notifications.
I350 maps pool n to queue n. 82576 assigns physical queues n and n+8
to VF n, so sanitize both queues while clearing per-pool PSRTYPE once.
[11 lines not shown]
e1000: Correct VF register validation
Pass the VF generation through the CSR accessors so the validator can
distinguish the sparse 82576 and I350 register maps.
Admit the queue-zero RXCTRL, TXCTRL, TDWBAL, TDWBAH, and
VFPSRTYPE registers exposed by both families.
82576 exposes VFMPRC at 0xf3c. I350 erratum 31 makes its
corrected 0xf38 address inaccessible to a VF, so reject both I350
spellings while retaining read access on 82576.
Sponsored by: BBOX.io
krb5: Install profile.h again
Commit 1876de606eb8 exposed missing symbols that the port security/krb5
installed that the base system did not install. Part of the solution
was to make libprofile.so private (not libprofile.a) just as the port
does, Red Hat Enterprise Linux does, and as installing MIT KRB5 by hand
does. The actual fix for this was to put symbols and their corresponding
functions into the correct librarires, i.e. libkrb5.so and othes, just
as the port, Red Hat, and manually installed via tarball do.
Unfortunately INTERNALLIB disables the include of bsd.incs.mk and the
install of header files. This is still needed to install profile.h into
/usr/include (just as the port installs it into ${LOCALBASE}/include
and RHEL installs it in /usr/include). This commit fixes this by
installing profile.h into /usr/include from the krb5/include Makfile.
Reported by: fluffy
Tested by: fluffy
Reviewed by: fluffy
[4 lines not shown]
routing: Remove unused rib_head members
Remove unused rnh_multipath and rib_algo_fixed members.
While here, convert rib_dying and rib_algo_init from uint32_t to bool.
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D58537
mbuf: Make m_unshare() fail on KTLS mbufs
Commit f2202ab5abda did not account for KTLS mbufs.
m_unshare() tries to linearize the original mbuf chain and creates a
writable copy of it, converting unmapped mbufs. Both of them are
unsafe for KTLS mbufs.
It is better to return NULL if the mbuf chain contains a KTLS mbuf.
Reported by: jhb
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D58466