vnode(9): Split a wall of prose into an itemized description list.
Prompted by puzzling over the obtuse API contract around v_writecount
and VOP_OPEN/CLOSE for:
PR kern/60586: panic after hot-plugging raidframe component
ssh-agent(1): Restore /bin/sh-style output with `ssh-agent -s'.
This was locally patched to pacify -Wformat-nonliteral, but the local
patch was changed in the 10.3 leading to different output. The
different output, while still valid /bin/sh, broke other downstream
consumers including pam_ssh. Perhaps pam_ssh should be more liberal in
what /bin/sh syntax it accepts, but the change in output wasn't really
necessary anyway.
PR bin/60578: pam_ssh fails to use ssh-agent
HZ=1000 is a lot of HZ. @techav reports that changing it to 400 shaves
several minutes off boot time and is about the best we can do with a
16-bit timer counting at 25MHz.
This is a stop-gap until a pre-scaler is added to the system timer
(located in the DRAM controller).
For the console device, don't specify a gettytab entry with a
speed specification. Instead, just use "default" so that the
console login just works with whatever speed the console device
is currently running at.
PR/60021: USB-only boot: uhub0 attaches but uhub1 never appears...
Update the dwc2 intial reset sequence to more closely match the upstream
driver - it's changed a bit in the last 10 years.
This reset sequence gets the device out of the state it's left in by the
RaspberryPI firmware when booting from USB.
proc_vmspace_getref: Take p->p_lock around p->p_sflag access.
Prompted by reviewing the locking rules in;
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
sysctl kern.proc_args.*.cwd/pathname: Use p_reflock, not p_lock.
- Avoid holding p_lock across copyout; this risks deadlock or panic
if memory is exhausted and the uvm fault handler during copyout
tries to deliver SIGKILL, which requires p_lock.
- Avoid holding p_lock across vnode_to_path: this risks deadlock or
panic if the file system, such as nfs, tries to check for pending
signals, which requires p_lock.
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
sysctl vm.proc.*: Use p_reflock, not p_lock.
- Avoid holding p_lock across copyout; this risks deadlock or panic
if memory is exhausted and the uvm fault handler during copyout
tries to deliver SIGKILL, which requires p_lock.
- Avoid holding p_lock across vnode_to_path: this risks deadlock or
panic if the file system, such as nfs, tries to check for pending
signals, which requires p_lock.
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
kern: New function proc_find_reflocked.
This is like proc_find_locked but returns with p_reflock held rather
than p_lock. Will be used to replace proc_find_locked in order to
fix:
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
No modules currently use proc_find_locked or proc_find_reflocked, so
there should be no module ABI compatibility issues here.
pciconf: Sort resource windows in order of decreasing alignment
instead of size.
Consider pci0 has two ppb's. ppb0 has a memory window larger in
size, but smaller in alignment. ppb1 has one smaller in size, but
larger in alignment.
In this case, the memory window of ppb1 must be allocated earlier.
Otherwise, total size of required memory exceeds pci0's mem_total,
in general, due to padding region.
pciconf: Fix round-up logics for total sizes of bridge resources
The previous ones are valid only if alignments are 4K or 1M,
for I/O or memory, respectively.
pciconf: Fix alignments of device memory and I/O resources
Resources must be their-size-aligned. While here:
- Switch *align variable from int to more suitable integer types.
- Make some conditions clearer (NFC).
sdmmc: dmamap_load bounce buffer on demand
When using a bounce buffer, cmd->c_dmamap->dm_segs[0]->ds_len did not agree with cmd->c_datalen because the bounce buffer is loaded once at initialization, so cmd->c_dmamap->dm_segs[0]->ds_len never gets updated before executing a sdmmc command.
This is problematic when the dmamap is passed on to an API like fdt_dma that treats the dmamap as the source of truth.
This problem probably hasn't surfaced yet because it needs three preconditions:
- using bounce buffers is already an edge case for when we can't allocate block size aligned dma memory
- the driver needs CAPS_DMA, but not CAPS_MULTI_SEG_DMA
- the driver needs to use cmd->c_dmamap->dm_segs[0]->ds_len and not cmd->c_datalen
The fix is to bus_dmamap_load the bounce buffer just when we need it. This allows us to load it with the correct size.
evbarm/ti_edma: enable on am18xx SoCs
The linux dt-bindings allow two different ways to specify power/clock domains for the edma3. This commit adds support for the way used on the am18xx (powerdomains).
igc: Fix KASSERT failure when `ifconfig igc%d down`
When we invoke callout_halt(9) for rxr->rx_refill, both in
igc_stop_locked() and igc_free_receive_buffers(), we don't hold
rxr->rxr_lock.
Also, `drvctl -d igc%d` does not trigger KASSERT failure now.