Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-8 (5d)  netbsd-10 (6d)  netbsd-9 (12d)  thorpej-ifq (176d)  thorpej-altq-separation (178d) 

2024-05-10 15:50:34 UTC Now

2024-04-22 21:25:29 UTC MAIN commitmail json YAML

it's nanosleep(2), not nanosleep(3)

(jdolecek)

2024-04-22 21:02:18 UTC MAIN commitmail json YAML

allow usleep(3) with useconds >= 1000000

update manpage to mention this interface is obsolete, remove
EINVAL from the ERRORS and mention EINTR instead.

PR lib/58184 by Taylor R Campbell

(jdolecek)

2024-03-24 21:27:48 UTC MAIN commitmail json YAML

minor spelling fix - 'with' and 'into'

(jdolecek)

2024-02-11 13:01:29 UTC MAIN commitmail json YAML

make kqfilter() behave the same for PIPE_SOCKETPAIR pipe as it does
for standard one - refuse EVFILT_WRITE if the reader is already disconnected

fixes test failure for kernel/kqueue/write/t_pipe.c on PIPE_SOCKETPAIR kernel

PR kern/55690

(jdolecek)

2024-02-03 19:05:15 UTC MAIN commitmail json YAML

fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete

use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()

this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690

(jdolecek)

2024-01-22 21:15:02 UTC MAIN commitmail json YAML

fix M_CSUM_BITS bitfield for M_CSUM_BLANK - \37 is the bit before \40

noticed by rillig@ thanks

(jdolecek)

2024-01-09 18:39:53 UTC MAIN commitmail json YAML

disable TX checksum optimization, it's causing ARP lossage in some
configurations using Linux dom0

PR port-xen/57743 by Brian Marcotte, thanks for the patch

(jdolecek)

2023-11-05 18:32:01 UTC MAIN commitmail json YAML

ena(4) improvements committed

Pull request: https://github.com/maleic1618/NetBSD/pull/1:
"""
This PR fixes some bugs and MP-ifies ena(4), including RSS.

On t3.small instance, its forward throughput has grown as followings:

              64 bytes 256 bytes
-current 1flow 21.58 110.51
-current 8flow 28.27 123.19
patched 1flow 37.20 142.21
patched 8flow 92.26 366.85
(Unit: Mbps, NET_MPSAFE enabled, Using https://github.com/iij/ipgen)

It also worked well on a aarch64 machine.

Addendum: I forgot to mention that this PR is reviewed ozaki-r@n.o.
"""

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
Reviewed also by ozaki-r@n.o

(jdolecek)

2023-11-05 18:26:11 UTC MAIN commitmail json YAML

ena(4): stop management first when detaching

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:24:31 UTC MAIN commitmail json YAML

ena(4): destroy all wait_event

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:23:29 UTC MAIN commitmail json YAML

ena(4): establish interrupt after setting up resources

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:21:55 UTC MAIN commitmail json YAML

ena(4): prevent AENQ handler from use-after-free

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:18:56 UTC MAIN commitmail json YAML

ena(4) is MP-ready, always use MPSAFE

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:17:41 UTC MAIN commitmail json YAML

ena(4): support RSS and delete FreeBSD-specified code

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>

(jdolecek)

2023-11-05 18:15:02 UTC MAIN commitmail json YAML

2021-11-29 20:03:15 UTC MAIN commitmail json YAML

enable UFS_ACL option for XEN3_DOMU, it's useful for e.g. running Samba in DomU

idea from Matthias Petermann via current-users@

(jdolecek)

2021-07-28 22:17:49 UTC MAIN commitmail json YAML

fix off-by-one check in another KASSERT() for bcount

still related to PR port-xen/56328

(jdolecek)

2021-07-28 21:38:50 UTC MAIN commitmail json YAML

fix intentional, but eventually faulty off-by-one for the maximum number
of segments for I/O - this was supposed to allow MAXPHYS-size I/O even
with page offset, but actually ended up letting through I/O up to
MAXPHYS+PAGE_SIZE

the KASSERT(bcount < MAXPHYS) is kept as-is, since at that place the number
of segments should already be validated, so it's kernel bug if the size
is still too big there

fixes PR port-xen/56328 by Greg Oster

(jdolecek)

2021-06-06 18:37:20 UTC MAIN commitmail json YAML

also reset xs->xs_xr[dci] to NULL when closing the pipe

avoids KASSERT() on next xhci_open()

should fix PR kern/56194 by nia

(jdolecek)

2021-05-05 19:30:51 UTC MAIN commitmail json YAML

disable MSI for SiI3124 - interrupts don't seem to work on this old board
when MSI is enabled, maybe because it's behind a PCI bridge

PR kern/55115 by John D. Baker

(jdolecek)

2021-05-02 19:13:43 UTC MAIN commitmail json YAML

implement fo_restart hook for kqueue descriptors, so that close(2)
on the descriptor won't block indefinitely if other thread is currently
blocked on the same kqueue in kevent(2)

done similarily to pipes and sockets, i.e. using flag on the potentially
shared kqueue structure hooked off file_t - this is somewhat suboptimal
if the application dup(2)ped the descriptor, but this should be rare
enough to not really matter

usually this causes the kevent(2) to end up returning EBADF since
on the syscall restart the descriptor is not there anymore; if
dup(2)ped the kevent(2) call can continue successfully if the closed
kqueue descriptor was other than the one used for the kevent(2)
call

PR kern/46248 by Julian Fagir

(jdolecek)

2021-04-08 17:36:33 UTC MAIN commitmail json YAML

update comment about the 'quirk' in we_mca_init_hook() - actually that is
just interrupt enable bit, so not a quirk at all; NFCI

info passed by Valery Ushakov from a guy running https://www.os2museum.com/wp/

(jdolecek)

2021-02-21 20:11:59 UTC MAIN commitmail json YAML

in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure

fix detection of partial failure - GNTTABOP_map_grant_ref can actually return
zero for partial failure, so we need to always check all the entries
to detect it

previously, DIAGNOSTIC kernel triggered panic() for partial failure,
and non-DIAGNOSTIC kernel did not detect it at all, leading to Dom0 page
fault later; since the mapping failure can be triggered by malicious
DomU via bad grant reference, it's important to expect the calls
to fail, and handle it gracefully without crashing Dom0

part of fixes for XSA-362

(jdolecek)

2021-02-21 20:02:25 UTC MAIN commitmail json YAML

reset xio_xv before calling xbdback_io_error() so it won't try to unmap
the non-initialized handles when xen_shm_map() fails

remove the ratechecked error printf for shm error - xbdback_io_error() prints
the error too

part of fixes for XSA-362

(jdolecek)

2021-02-07 15:54:09 UTC MAIN commitmail json YAML

restore change from rev 1.23 "Avoid undefined behavior in fread(3)", mistakely
removed as part __SNBF optimization

(jdolecek)

2021-02-06 21:24:20 UTC MAIN commitmail json YAML

use __builtin_assume_aligned() on places where the memset() or memcpy()
parameters are known to be PAGE_SIZE-aligned, so compiler doesn't need
to emit atrocious alignment check code when inlining them

this particularly improves pmap_zero_page() and pmap_copy_page(),
which are now reduced to only 'rep stosq', and close to what a hand-written
assembly would do

Note: on CPUs supporting ERMS, 'rep stosb' would still be slightly faster, but
this is a solid stop-gap improvement

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html

(jdolecek)

2021-02-06 00:08:58 UTC MAIN commitmail json YAML

change libc sched_yield() stub to actually still call the syscall
instead of doing nothing when app is not linked with pthread; this matches
other systems

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html

(jdolecek)

2021-02-04 21:07:06 UTC MAIN commitmail json YAML

introduce vfs.generic.timestamp_precision sysctl to control precision
of the timer used for vfs_timestamp(); default stays the same
to use nanotime(9), but option is there to use the faster, albeit
less precise methods

code taken from FreeBSD

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html

(jdolecek)

2021-02-01 17:50:53 UTC MAIN commitmail json YAML

for fread(3) and fwrite(3) check for (size * nmemb) size_t overflow, and
error out with EOVERFLOW if it happens; this is less silly answer
to a silly call than returning some randomly wrapped length

change adapted from OpenBSD

FreeBSD has a similar check, but they return EINVAL instead, feel
free to adjust if SUS or other standard mandates specific value

suggested by Kamil Rytarowski

(jdolecek)

2021-01-31 16:18:22 UTC MAIN commitmail json YAML

for unbuffered I/O arrange for the destination buffer to be filled in one
go, instead of triggering long series of 1 byte read(2)s; this speeds up
fread() several order of magnitudes for this case, directly proportional
to the size of the supplied buffer

change adapted from OpenBSD rev. 1.19

fixes PR lib/55808 by Roland Illig

(jdolecek)

2021-01-26 19:09:18 UTC MAIN commitmail json YAML

call f_touch with kq_lock held, and without KERNEL_LOCK() - for this
adjust EVFILT_USER, which is the only filter actually using that hook

kqueue_scan() now doesn't need to exit/enter the kq_lock when calling
f_touch, which removes another possible race

part of PR kern/50094

(jdolecek)

2021-01-25 19:57:05 UTC MAIN commitmail json YAML

put back clearing of KN_QUEUED and check for re-queue - as rev. 1.53 notes,
it's necessary for correct function

fixes PR kern/55946, thanks to Paul Goyette for testing

part of PR kern/50094 fix

(jdolecek)

2021-01-24 11:31:47 UTC MAIN commitmail json YAML

don't check signals while waiting for other kqueue scans to finish

reportedly somewhat improves behaviour for PR kern/55946

part of PR kern/50094 fix

(jdolecek)

2021-01-21 19:37:23 UTC MAIN commitmail json YAML

remove stray debug #define DEBUG

(jdolecek)

2021-01-21 18:09:23 UTC MAIN commitmail json YAML

adjust kq_check() (enabled with DEBUG) to new reality - it's now perfectly
normal to have kq_count bigger than number of the linked entries
on the kqueue

PR kern/50094, problem pointed out by Chuck Silvers

(jdolecek)

2021-01-20 22:46:33 UTC MAIN commitmail json YAML

fix free_all_endpoints() to not try calling free_pipe() when no endpoints
are allocated; this can happen during config_detach() after attach fails

Reported-by: syzbot+6e8a4c978358ecead03e@syzkaller.appspotmail.com
Reported-by: syzbot+b25ba25b57561144ac6e@syzkaller.appspotmail.com

(jdolecek)

2021-01-20 21:39:09 UTC MAIN commitmail json YAML

fix a race in kqueue_scan() - when multiple threads check the same
kqueue, it could happen other thread seen empty kqueue while kevent
was being checked for re-firing and re-queued

make sure to keep retrying if there are outstanding kevents even
if no kevent is found on first pass through the queue, and only
drop the KN_QUEUED flag and kq_count when actually completely done
with the kevent

change is inspired by the FreeBSD in-flux handling, but without
introducing the reference counting

PR kern/50094 by Christof Meerwald

(jdolecek)

2020-12-27 12:45:33 UTC MAIN commitmail json YAML

reduce indentation for the main processing loop in kqueue_scan(), this also
makes the code more similar to FreeBSD; NFCI

part of PR kern/50094

(jdolecek)

2020-12-20 19:30:04 UTC MAIN commitmail json YAML

disable (U)DMA for ATAPI on aceride(4), the chip doesn't support it
PR port-sparc64/55540

(jdolecek)

2020-09-27 18:17:35 UTC MAIN commitmail json YAML

add -s option for 'power' command, this instructs the controller to save
the value so it persists resets/whatnot; the NVMe specification lists
this as optional, so this only works if the controller supports it

(jdolecek)

2020-09-27 17:27:08 UTC MAIN commitmail json YAML

print current power state and workload as separate values for
'nvmectl power nvme0'

(jdolecek)

2020-09-27 16:45:21 UTC MAIN commitmail json YAML

show APSTA support status in identify

(jdolecek)

2020-09-27 16:44:24 UTC MAIN commitmail json YAML

add definition of the bit indicating support for APSTA

(jdolecek)

2020-08-26 10:34:04 UTC MAIN commitmail json YAML

for jp keymap map also scan code 49 to right bracket to handle ARCHISS model

PR kern/55608 by Shinichi Doyashiki

(jdolecek)

2020-08-16 10:31:40 UTC MAIN commitmail json YAML

note COMPAT_LINUX is disabled by default now

(jdolecek)

2020-08-16 10:27:47 UTC MAIN commitmail json YAML

2020-08-01 12:39:40 UTC MAIN commitmail json YAML

adjust includes to pull __HAVE_PCI_MSI_MSIX properly

(jdolecek)

2020-08-01 12:36:36 UTC MAIN commitmail json YAML

reorder includes to pull __HAVE_PCI_MSI_MSIX properly via
<x86/pci_machdep_common.h>

(jdolecek)

2020-08-01 12:28:19 UTC MAIN commitmail json YAML

remove CISS_NO_INTERRUPT_HACK from ALL kernel config too, it's no longer
supported in ciss(4)

(jdolecek)

2020-08-01 12:15:40 UTC MAIN commitmail json YAML

2020-08-01 12:14:40 UTC MAIN commitmail json YAML

2020-08-01 11:18:26 UTC MAIN commitmail json YAML

avoid VLA for the sizeof() calculations

(jdolecek)

2020-07-29 13:03:36 UTC MAIN commitmail json YAML

fix xmm7360_os_msleep() macro to actually work when not wrapped inside a block

from genua

(jdolecek)

2020-07-29 13:01:19 UTC MAIN commitmail json YAML

sprinkle __diagused so this compiles without DIAGNOSTIC

(jdolecek)

2020-07-29 13:00:26 UTC MAIN commitmail json YAML

adjust OpenBSD mbuf handling so tcpdump(1) works there; from genua

keep code as-is for NetBSD, DLT_RAW works there

(jdolecek)

2020-07-29 07:14:45 UTC MAIN commitmail json YAML

rename label now that it has dual purpose; suggested by mrg@

(jdolecek)

2020-07-28 15:59:19 UTC MAIN commitmail json YAML

say what is not configured in nvme_print()

(jdolecek)

2020-07-28 10:29:30 UTC MAIN commitmail json YAML

note that MSI was enabled by default for Xen

(jdolecek)

2020-07-28 09:38:06 UTC MAIN commitmail json YAML

remove NO_PCI_MSI_MSIX again, enabling MSI for Xen Dom0 by default

(jdolecek)

2020-07-28 09:36:05 UTC MAIN commitmail json YAML

add a quirk to disable MSI, and enable it for Intel SSD DC P4500

this device seems to cause serious system responsiveness issues when configured
to use MSI, while it works fine when configured for either INTx or MSI-X

this is important so this works well under Xen Dom0, which doesn't
support MSI-X yet

fixes another issue reported as feedback for PR port-xen/55285 by Frank Kardel

(jdolecek)

2020-07-27 14:17:47 UTC MAIN commitmail json YAML

add reference to net/py-xmm7360 for the network initialization script

(jdolecek)

2020-07-27 11:12:56 UTC MAIN commitmail json YAML

2020-07-26 17:12:41 UTC MAIN commitmail json YAML

fix attribution - I was confused what was the correct final version

(jdolecek)

2020-07-26 15:57:03 UTC MAIN commitmail json YAML

2020-07-26 15:56:30 UTC MAIN commitmail json YAML

add note that the network initialization script needs the device nodes
to be created

(jdolecek)

2020-07-26 15:47:27 UTC MAIN commitmail json YAML

add support for wwanc(4) device nodes (xmm[0-9])

(jdolecek)

2020-07-26 15:14:23 UTC MAIN commitmail json YAML

note new Intel XMM7360 driver

(jdolecek)

2020-07-26 15:13:10 UTC MAIN commitmail json YAML

2020-07-26 14:51:19 UTC MAIN commitmail json YAML

Add driver for Intel XMM7360 LTE modem, based upon Linux driver available
at https://github.com/xmm7360/xmm7360-pci

This version works on Linux, OpenBSD, and NetBSD.

OpenBSD port written for genua GmbH

Modem requires python script from the master site to initialize the network,
it will be added to pkgsrc shortly

(jdolecek)

2020-07-24 06:12:21 UTC MAIN commitmail json YAML

<xen/xenio.h> is in fact used by the newly imported xentools 4.13,
reinstantiate it

header is for use by xentools only, which define domid_t themselves,
so it should not be a problem the header doesn't define it per PR port-xen/52874

(jdolecek)

2020-07-22 19:37:59 UTC MAIN commitmail json YAML

enable -Walloca, warn if something uses alloca()

(jdolecek)

2020-07-19 16:20:36 UTC MAIN commitmail json YAML

add #ifdef __HAVE_PCI_MSI_MSIX so this still compiles with NO_PCI_MSI_MSIX

(jdolecek)

2020-07-19 16:17:00 UTC MAIN commitmail json YAML

add definition for MSR_IA32_FEATURE_CONTROL, just for information

(jdolecek)

2020-07-19 14:27:07 UTC MAIN commitmail json YAML

for Xen MSI, fallback to INTx when PHYSDEVOP_map_pirq fails for the device

apparently Xen requires VT-d to be enabled in BIOS for PHYSDEVOP_map_pirq
to work, this change makes it work on systems with VT-d disabled or missing

adresses the panic part of PR port-xen/55285 by Patrick Welche

(jdolecek)

2020-07-17 21:04:14 UTC MAIN commitmail json YAML

remove explicit irqack() call for unexpected interrupt; this happens
normally during boot when running identify for the drive as polled
command, and fixes hard hang caused by the irqack() on a sun machine

the unexpected interrupt happens because cmdide doesn't respect
WDCTL_IDS bit and triggers interrupt also for polled commands

also reclassify the "bogus intr" as aprint_verbose() to avoid noise
on boot

discussed and tested by Martin Husemann

(jdolecek)

2020-07-17 12:12:24 UTC MAIN commitmail json YAML

2020-07-17 10:56:15 UTC MAIN commitmail json YAML

if bnx_tx_encap() fails because mbuf is too fragmented or too long,
drop the mbuf instead of wedging the TX queue forever; found by code inspection

this is quite unlikely scenario since it requires mbuf chain consisting of
more than 8 frags and m_defrag() failing, so probably unrelated to PR kern/47229

(jdolecek)

2020-07-17 10:08:04 UTC MAIN commitmail json YAML

make sure bnx_alloc_pkts() always clears BNX_ALLOC_PKTS_FLAG and IFF_OACTIVE,
even on dmamap allocation failure; remove unnecessary IFF_UP condition

(jdolecek)

2020-07-17 09:51:31 UTC MAIN commitmail json YAML

remove mistakely committed in-progress code from previous commit

(jdolecek)

2020-07-17 09:48:21 UTC MAIN commitmail json YAML

re-enable MSI/MSI-X, the TX timeouts were caused by the IFF_OACTIVE handling,
which was fixed in previous revision

(jdolecek)

2020-07-16 14:57:59 UTC MAIN commitmail json YAML

need to clear IFF_OACTIVE after allocating more pkts in order to actually
start processing the queue in bnx_start()

(jdolecek)

2020-07-16 14:44:43 UTC MAIN commitmail json YAML

disable MSI/MSI-X for time being, it causes interrupt timeouts and needs
to be investigated before enabling this again

(jdolecek)

2020-07-16 14:41:04 UTC MAIN commitmail json YAML

make sure the alignment of ciss_cmd matches KASSERT() in ciss_cmd()

(jdolecek)

2020-07-16 14:39:33 UTC MAIN commitmail json YAML

revert the conversion to STAILQ, it broke execution of commands

(jdolecek)

2020-07-15 14:33:59 UTC MAIN commitmail json YAML

g/c unused sc_channel_raw, sc_adapter_raw

(jdolecek)

2020-07-14 17:40:10 UTC MAIN commitmail json YAML

note ciss(4) adapter match update

(jdolecek)

2020-07-14 17:39:19 UTC MAIN commitmail json YAML

update list of matched adapters

(jdolecek)

2020-07-14 17:23:59 UTC MAIN commitmail json YAML

match newer HP Smart Array controllers, list from FreeBSD

(jdolecek)

2020-07-14 17:23:27 UTC MAIN commitmail json YAML

fix __arraycount() parameter

(jdolecek)

2020-07-14 17:19:03 UTC MAIN commitmail json YAML

make ciss_pci_devices[] more compact

(jdolecek)

2020-07-14 16:57:12 UTC MAIN commitmail json YAML

2020-07-14 16:56:35 UTC MAIN commitmail json YAML

add newer ciss(4) devices, list obtained from FreeBSD

(jdolecek)

2020-07-14 15:37:40 UTC MAIN commitmail json YAML

make bnx_wk (used to trigger bnx_alloc_pkts()) part of softc instead
of using a static variable, so it's independant for each adapter

(jdolecek)

2020-07-14 12:15:16 UTC MAIN commitmail json YAML

remove call to bnx_alloc_pkts() from bnx_init_tx_chain() - it can
be called from softint context via bnx_watchdog(), and bnx_alloc_pkts()
dmamap allocation can't run in (soft)interrupt context

(jdolecek)

2020-07-14 12:04:46 UTC MAIN commitmail json YAML

remove CISS_NO_INTERRUPT_HACK, discussed with joerg@ and spz@

(jdolecek)

2020-07-14 11:44:53 UTC MAIN commitmail json YAML

remove ccb_sc to save memory, no need to store pointer to sc in ccb

(jdolecek)

2020-07-14 11:39:02 UTC MAIN commitmail json YAML

use STAILQ for ccb lists to save some memory, doubly-linked list is not needed

(jdolecek)

2020-07-14 10:49:21 UTC MAIN commitmail json YAML

note bnx(4) MSI/MSI-X and ciss(4) PERFORMANT+MSI/MSI-X

(jdolecek)

2020-07-14 10:44:34 UTC MAIN commitmail json YAML

only copy the actual command length in ciss_scsi_cmd(), instead of always
copying CISS_MAX_CDB bytes

Fixes reading past buffer memory triggered e.g. on kernel dump, reported
by KASAN:
ASan: Unauthorized Access In ...: Addr ... [16 bytes, read, RedZonePartial]

also do not pre-zero the cdb before copying cmd to it, there is no need for it

(jdolecek)

2020-07-14 10:38:07 UTC MAIN commitmail json YAML

g/c #if 0'ed ciss_scsi_raw_cmd()

(jdolecek)

2020-07-14 10:37:30 UTC MAIN commitmail json YAML

add support for PERFORMANT mode, and allow MSI/MSI-X (only) for adapters which
support it

code adapted from FreeBSD, but with fix for setting the performant bit
and pull count on command submittion as seen in hpsa Linux driver

tested with INTx and MSI-X on HP Smart Array 11

thanks to Andreas Gustafsson for initial testing, and providing
access to test machine

(jdolecek)

2020-07-14 10:26:34 UTC MAIN commitmail json YAML

only destroy the TX pkgs and dmamaps in bnx_dma_free() called on detach, don't
do it anymore in bnx_free_tx_chain(), called from bnx_init()

avoid occassional panic triggered by the free code having to allocate
memory from interrupt context when bnx_init() is called from bnx_watchdog()

(jdolecek)

2020-07-13 21:21:57 UTC MAIN commitmail json YAML

change xbd_unmap_align() to get the bp via argument rathen than
req_bp, to avoid using req_bp after it's been set to NULL by the
time xbd_unmap_align() is called in xbd_handler(); this fixes
regression caused by previous fix

also make sure xbd_unmap_align() works correctly even when using the
linked request pair for I/O (ie. for Dom0 not supporting indirect
segments), regardless of the order the paired requests finish

(jdolecek)

2020-07-12 19:05:32 UTC MAIN commitmail json YAML

enable MSI/MSI-X if supported by adapter

tested MSI-X with Broadcom NetXtreme II BCM5709 1000Base-T

(jdolecek)

2020-07-10 14:24:14 UTC MAIN commitmail json YAML

remove write-only sc_ccbq, and unused sc_ccbdone

(jdolecek)

2020-07-10 14:23:56 UTC MAIN commitmail json YAML

remove write-only sc_ccbq, and unused sc_ccbdone

(jdolecek)

2020-07-09 22:45:54 UTC MAIN commitmail json YAML

Adapt to proplib api changes

(jdolecek)

2020-07-08 11:11:00 UTC MAIN commitmail json YAML

initalize ci_kfpu_spl, to avoid triggering KASSERT() in fpu_kern_enter()

Follows revision 1.177 of sys/arch/x86/x86/cpu.c:
"""
Add a small API for in-kernel FPU operations.

        fpu_kern_enter();
        /* do FPU stuff */
        fpu_kern_leave();
"""

With this DomU kernel boots with:
[  2.0000571] aes: Intel AES-NI

(jdolecek)

2020-07-05 19:28:37 UTC MAIN commitmail json YAML

there is more to MSI/MSI-X support in ciss(4) than just allocating the
right interrupt, it needs some explicit support; disable for now
until the full support is there

PR kern/55461

(jdolecek)

2020-07-04 14:49:24 UTC MAIN commitmail json YAML

switch to pci_intr_alloc() so this uses MSI/MSI-X if device supports it

(jdolecek)

2020-07-03 19:37:28 UTC MAIN commitmail json YAML

add a cast to (struct statvfs *) for STATVFSBUF_GET() to make sure it's
never assigned to anything else

(jdolecek)

2020-07-03 18:49:38 UTC MAIN commitmail json YAML

don't overallocate (follows similar change to compat/sys/statvfs.h)

(jdolecek)

2020-07-02 11:08:55 UTC MAIN commitmail json YAML

fix incomplete gnu/ deletion - PR misc/55444 by Jim Bernard

(jdolecek)

2020-07-01 17:57:14 UTC MAIN commitmail json YAML

revert, not working

(jdolecek)

2020-07-01 15:10:01 UTC MAIN commitmail json YAML

ignore interrupt when not expecting one, particularly don't invoke
the irqack in this case

seems cmdide doesn't honour WDCTL_IDS when executing polled commands,
and there is a race where the irqack call interferes with polled
command and causes a lockup

reported by Martin Husemann

(jdolecek)

2020-06-29 21:45:50 UTC MAIN commitmail json YAML

when using two linked requests for I/O (i.e. when backend doesn't support
INDIRECT segments), make sure to clear req_bp for both of them

fixes a misfired assertion in BLKIF_OP_FLUSH_DISKCACHE - PR port-xen/55431

(jdolecek)

2020-06-29 09:56:51 UTC MAIN commitmail json YAML

increase UPAGES (used for lwp kernel stack) for SVS so the the
amount of actually usable kernel stack is the same for SVS and
non-SVS kernels (currently 12 KiB)

discussed with maxv@, part of investigation for PR kern/S55402

(jdolecek)

2020-06-27 21:21:11 UTC MAIN commitmail json YAML

fix bug introduced in conversion to kmem(9), passing address of the local
variable instead of pointer to allocated memory

should fix PR kern/55426 by Andreas Gustafsson

(jdolecek)

2020-06-27 17:07:49 UTC MAIN commitmail json YAML

2020-06-27 16:48:01 UTC MAIN commitmail json YAML

make sure to strip leading '$' from NetBSD rcs id so that it won't be
replaces by cvs, and regen the headers again

(jdolecek)

2020-06-27 16:32:46 UTC MAIN commitmail json YAML

2020-06-27 16:29:11 UTC MAIN commitmail json YAML

2020-06-27 16:19:39 UTC MAIN commitmail json YAML

2020-06-27 16:00:35 UTC MAIN commitmail json YAML

make this work with objdir, drop unused -ll

(jdolecek)

2020-06-27 14:34:45 UTC MAIN commitmail json YAML

mark several init-only functions as noinline to avoid bumping into the
stack limit

(jdolecek)

2020-06-27 14:03:39 UTC MAIN commitmail json YAML

belately note the stackgap removals in 2007

(jdolecek)

2020-06-27 09:54:08 UTC MAIN commitmail json YAML

avoid excessive stack usage in mp_cpu_start(), this is called after VM
init so kmem(9) can be used

(jdolecek)

2020-06-27 09:28:15 UTC MAIN commitmail json YAML

2020-06-27 09:03:15 UTC MAIN commitmail json YAML

mark ahc_loadseq()/ahd_loadseq() as __noinline to avoid 'stack usage
might get unbounded' - seems the variable-length array using const variable
is misinterpreted as unbounded when inlined

(jdolecek)

2020-06-25 18:20:18 UTC MAIN commitmail json YAML

uvm_emap_size was removed a while ago

(jdolecek)

2020-06-25 17:24:31 UTC MAIN commitmail json YAML

rearrange code to remove need for the scratch space variable, simply put
the data to destination bootinfo buffer directly

XXX compile tested only, needs confirmation that it still works

(jdolecek)

2020-06-25 14:52:26 UTC MAIN commitmail json YAML

enable gcc stack usage limit for kernel functions, set to 3.5 KiB for now
as that seems to be enough to accomodate the current biggest stack usages

there are about six functions which use over 3KiB local stack, and
about a dozen between 2-3 KiB, so pushing this further needs more work
if desired

compile tested on amd64, i386, sparc64, sparc, powerpc (evbppc - BookE),
m68k (mac68k)

(jdolecek)

2020-06-25 14:52:00 UTC MAIN commitmail json YAML

avoid variable-length array

(jdolecek)

2020-06-25 14:22:19 UTC MAIN commitmail json YAML

remove experimental direct pipe code (using uvm_loan()) I added in 2001 - it's
slower than the non-direct variant on MP systems, if anybody wants
to hack on this further it's available in Attic

(jdolecek)

2020-06-25 14:04:30 UTC MAIN commitmail json YAML

make ubc_winshift / ubc_winsize constant, and based on whatever is bigger
of (1 << UBC_WINSHIFT, MAX_PAGE_SIZE)

given that default UBC_WINSHIFT is 13, this changes behaviour only
for mips and powerpc (BookE/OEA), which will now have twice as much
memory used for UBC windows; if this ever becomes a problem, it's
possible to reduce ubc_nwins in MD code similar to what is done on sparc

this eliminates variable-length arrays in ubc_fault(),
ubc_uiomove(), and ubc_zerorange() so that the stack usage can be
determined and checked in compile time

(jdolecek)

2020-06-25 11:31:45 UTC MAIN commitmail json YAML

no need for alloca() in of_compatible(), malloc() is fine

(jdolecek)

2020-06-25 09:58:44 UTC MAIN commitmail json YAML

use maximum-size fixed size array instead of variable-length array
in uvm_aio_aiodone() so that the stack usage can be determined and
checked in compile time; this is not called recursively not
particularly deep in call stack, so there is no need to save every
last drop of stack space here

(jdolecek)

2020-06-24 22:28:08 UTC MAIN commitmail json YAML

don't try allocating 16KB of scratch space on stack

it's too early for kmem_alloc(), so use static variable in BSS; it's used
post reloc, so don't need to use the RELOC() macros

XXX compile-tested only on i386

(jdolecek)

2020-06-24 21:54:57 UTC MAIN commitmail json YAML

reduce stack usage in ipf_nat_ioctl()

also, in SIOCADNAT, make sure to not leak kernel data

(jdolecek)

2020-06-24 21:06:39 UTC MAIN commitmail json YAML

disable inlining for couple functions which allocate usb_device_request_t
on stack to reduce total run_init() stack usage from 7KB to 2KB

(jdolecek)

2020-06-24 20:17:55 UTC MAIN commitmail json YAML

actually stop using the stack variable

(jdolecek)

2020-06-24 19:55:25 UTC MAIN commitmail json YAML

avoid allocating almost 5k struct ibm561data on stack in ibm561_cninit();
it's too early for kmem_alloc(), so use static variable in BSS

(jdolecek)

2020-06-24 19:24:44 UTC MAIN commitmail json YAML

rearrange to avoid allocating softc on stack in ug_isa_match()

(jdolecek)

2020-06-24 19:11:49 UTC MAIN commitmail json YAML

2020-06-24 17:47:52 UTC MAIN commitmail json YAML

reduce stack usage in compat_60_ptmget_ioctl() - allocate struct ptmget
via kmem_alloc()

(jdolecek)

2020-06-24 16:29:34 UTC MAIN commitmail json YAML

reduce stack usage in dsl_scan_recurse() - allocate memory for
temporary zbookmark_phys_t using kmem_alloc() rather than stack;
this recuses several times usually, and this saves 2x
sizeof(zbookmark_phys_t) == 64 bytes per recursion

part of fix for PR kern/55402 by Frank Kardel

(jdolecek)

2020-06-24 16:23:16 UTC MAIN commitmail json YAML

change dsl_scan_visitbp() to allocate blkptr_t dynamically rather than
on-stack - this function is called recursively, and the 120 bytes per call
add up; also remove unused variable

part of fix for PR kern/55402 by Frank Kardel

(jdolecek)

2020-06-24 16:16:01 UTC MAIN commitmail json YAML

reduce stack usage in vdev_queue_io_to_issue() - zio_t is about 1KB, and
the function potentially recurses into itself

part of fix for PR kern/55402 by Frank Kardel

(jdolecek)

2020-06-24 14:33:08 UTC MAIN commitmail json YAML

fix tyop in KASSERT() condition which made it an assignment rather than a check

the field indeed is supposed to be set to GRANT_INVALID_REF at this moment,
the grant must be already revoked by this time

pointed out by Taylor R Campbell

(jdolecek)

2020-06-24 10:28:17 UTC MAIN commitmail json YAML

remove special handling for symbolic links for COMPAT_43 lstat, it's
not necessary; this removes the only places in kernel which did namei
LOOKUP with LOCKPARENT

fixes diagnostic KASSERT() in namei() code

Reported-by: syzbot+628382ecf1438e53d08d@syzkaller.appspotmail.com

(jdolecek)

2020-06-19 19:32:03 UTC MAIN commitmail json YAML

remove unnnecessary splbio() in rf_FreeDiskQueueData()

(jdolecek)

2020-06-19 19:29:39 UTC MAIN commitmail json YAML

2020-06-19 14:13:23 UTC MAIN commitmail json YAML

use pool_cache for (meta)data buffers also on NetBSD

this should generally slightly improve performance on MP systems, and
specifically for xbd(4) storage avoids slow unaligned I/O buffer handling

this change requires updated kernel, to allow up to SPA_MAXBLOCKSHIFT item
size for pools

fixes PR kern/55397 by Frank Kardel

(jdolecek)

2020-06-19 13:52:40 UTC MAIN commitmail json YAML

bump version - maximum item size for pool_init()/pool_cache_init() changed

PR kern/55397

(jdolecek)

2020-06-19 13:49:38 UTC MAIN commitmail json YAML

bump the limit on max item size for pool_init()/pool_cache_init() up
to 1 << 24, so that the pools can be used for ZFS block allocations, which
are up to SPA_MAXBLOCKSHIFT (1 << 24)

part of PR kern/55397 by Frank Kardel

(jdolecek)

2020-06-17 14:04:03 UTC MAIN commitmail json YAML

explicitly disable INTx interrupts to avoid interrupt storm triggered by
unhandled adapter interrupts

fixes PR kern/46596 by Andreas Gustafsson, fix adopted from FreeBSD

(jdolecek)

2020-06-15 15:29:46 UTC MAIN commitmail json YAML

only install space handler and enable interrupt for EC if ACPI
claims the device is actually present, it's not enough when there
is entry for it in the ACPI tables

fixes interrupt storm triggered on Dell PowerEdge R220 by enabling
GPE interrupt on a non-enabled EC (for which _REG call later
fails), reported and fix tested by Dima Veselov:
http://mail-index.netbsd.org/netbsd-users/2020/03/02/msg024166.html

XXX pullup netbsd-9

(jdolecek)

2020-06-11 09:02:05 UTC MAIN commitmail json YAML

2020-06-11 09:01:27 UTC MAIN commitmail json YAML

add Intel XMM 7360 LTE Modem

(jdolecek)

2020-05-31 18:20:24 UTC MAIN commitmail json YAML

also set ifc->ui_endpoints to NULL in usbd_free_iface_data() when the value
is freed, to make it impossible to re-enter this by mistake

very likely has no effect for the syzbot problem, but good to do nevetheless

Reported-by: syzbot+c555801d6bc0d768f402@syzkaller.appspotmail.com

(jdolecek)

2020-05-31 11:12:36 UTC MAIN commitmail json YAML

make bwfm_usb_bus_ops static and const

(jdolecek)

2020-05-30 19:23:25 UTC MAIN commitmail json YAML

catch up with changes - need bwfmreg.h before bwfmvar.h

(jdolecek)

2020-05-30 17:18:22 UTC MAIN commitmail json YAML

slightly improve sentence, no need to 'Note' when in NOTES section

(jdolecek)

2020-05-30 17:12:01 UTC MAIN commitmail json YAML

remove M_SOFTDEP from list of supported malloc types, it's long gone

also remove M_PCB - while it is used by SCTP, it's actually not defined
anywhere

in fact add new NOTES section explaining that the malloc types are
actually not used on NetBSD

(jdolecek)

2020-05-30 15:55:47 UTC MAIN commitmail json YAML

discussed with thorpej@, and it seems it's better to allocate the bss
alignment buffer statically (as part of softc) just to be sure to not
affect performance

(jdolecek)

2020-05-30 14:15:43 UTC MAIN commitmail json YAML

reduce stack usage in genfb_calc_hsize()

(jdolecek)

2020-05-30 14:03:08 UTC MAIN commitmail json YAML

reduce stack usage in bwfm_rx_event_cb(), can use KM_SLEEP because
this is called from workqueue handler (i.e. thread context)

(jdolecek)

2020-05-30 13:41:58 UTC MAIN commitmail json YAML

2020-05-30 13:35:31 UTC MAIN commitmail json YAML

add bwfm* at pci?, which is present in GENERIC

(jdolecek)

2020-05-30 13:23:14 UTC MAIN commitmail json YAML

fix wdcprobe_with_reset() to avoid allocating big structures on stack

(jdolecek)

2020-05-30 13:15:10 UTC MAIN commitmail json YAML

allocate memory for dtv_ts_section using kmem_alloc() in dtv_demux_read(),
instead of on-stack

XXX compile-tested only

(jdolecek)

2020-05-30 10:43:46 UTC MAIN commitmail json YAML

change pci_conf_print() to allocate memory for the regs dynamically
instead of on-stack

(jdolecek)

2020-05-30 10:27:29 UTC MAIN commitmail json YAML

remove #if 0'ed pci_conf_print() call

(jdolecek)

2020-05-26 14:03:21 UTC MAIN commitmail json YAML

put back NO_PCI_MSI_MSIX, need to fix MSI issues reported in PR port-xen/55285
first

(jdolecek)

2020-05-25 19:05:30 UTC MAIN commitmail json YAML

disable downgrade of ATA mode from DMA, as generally not relevant
any more - while it has been instrumental to inadvertedly discover
driver bugs in PIO mode under QEMU recently, generally the switch
more hurts than helps, so now only warn when DMA errors happen

code kept under ATA_DOWNGRADE_MODE ifdef, disabled by default

(jdolecek)

2020-05-25 18:29:25 UTC MAIN commitmail json YAML

make ata_downgrade_mode() static, it's not used anywhere else

(jdolecek)

2020-05-24 22:12:29 UTC MAIN commitmail json YAML

account for already transferred data (partially done I/O) when
retrying an xfer, to avoid reading/writing data from/to wrong offset,
and eventually beyond the end of data buffer

fixes data corruption under QEMU observed by Paul Ripke for emulated
IDE drives

(jdolecek)

2020-05-24 14:11:49 UTC MAIN commitmail json YAML

fix KASAN PoolUseAfterFree for async write - can't read bp after VOP_STRATEGY()

problem found and fix provided by Paul Ripke

(jdolecek)

2020-05-23 14:51:19 UTC MAIN commitmail json YAML

switch back to PHYSDEVOP_alloc_irq_vector for non-MSI interrupts - on my
computer it works the same as PHYSDEVOP_map_pirq, but seems it doesn't
on other systems

fixes PR port-xen/55285 for Patrick Welche, but not yet for another system
by Frank Kardel

(jdolecek)

2020-05-22 16:17:42 UTC MAIN commitmail json YAML

remove NO_PCI_MSI_MSIX option, MSI is supported for XenPV Dom0

(jdolecek)

2020-05-22 11:54:05 UTC MAIN commitmail json YAML

DRY code in uvm_swap_io() for the write loop

(jdolecek)

2020-05-21 09:36:24 UTC MAIN commitmail json YAML

update Xen ldscript to add kASan .ctors section, so that Xen kernel with
enabled KASAN option at least compiles; no promises on it actually working
though

(jdolecek)

2020-05-21 09:24:17 UTC MAIN commitmail json YAML

in wdctimeout(), do not schedule another timeout handler, as that only
creates race with eventual xfer resubmission - the c_intr()
method does all the necessary handling, including re-scheduling of the
timeout handler if appropriate

also make sure to clear ATACH_IRQ_WAIT before calling c_intr(), same
as real interrupt does; this is important so that eventual spurious timeout
would not interfere with xfer handling in the atabus thread

fixes another race in the atabus thread found by KASAN, reported by Paul Ripke

(jdolecek)

2020-05-21 09:11:33 UTC MAIN commitmail json YAML

stop timeout handler while scheduling another part of partial I/O,
to avoid race between the timeout and I/O submission; the I/O
submission can sleep with xfer while waiting for the controller to
be ready once it gets to thread context, and timeout might cause
the xfer to be freed, leading to crashes due to use-after-free

this fixes another type of crashes with slow devices under QEMU reported
by Paul Ripke - thanks a lot with extensive debugging help

(jdolecek)

2020-05-19 08:21:30 UTC MAIN commitmail json YAML

in wdctimeout() ignore timeout if not actually waiting for IRQ, to avoid
processing xfer which is not quite setup

in wdcintr() actually write the error message on invocation when
not waiting for IRQ even without ATADEBUG option, as usually that
is a driver bug; might revisit this if this ends up too noisy for
PCI-IDE which seems to ignore WDCTL_IDS and hence trigger irq even
for polled commands

(jdolecek)

2020-05-19 08:08:51 UTC MAIN commitmail json YAML

only start the timeout machinery once the I/O is completely setup
and successful, particularly after PIO write is finished

fixes crashes in case the setup is so slow that timeout is triggered
e.g. while still waiting in wdc_wait_for_unbusy() or shortly after, without
drive actually having chance to complete the I/O, as seen in some
configuration under QEMU by Paul Ripke

(jdolecek)

2020-05-15 21:56:14 UTC MAIN commitmail json YAML

remove unused atacmd_tostatq()

(jdolecek)

2020-05-15 16:58:28 UTC MAIN commitmail json YAML

whitespace (bad indent)

(jdolecek)

2020-05-15 07:42:58 UTC MAIN commitmail json YAML

use short for irq2port[] to save memory (4KB), it only needs to store
numbers <= NR_EVENT_CHANNELS (2048)

(jdolecek)

2020-05-15 07:31:07 UTC MAIN commitmail json YAML

only call PHYSDEVOP_map_pirq for a shared interrupt once, same as previous code

fixes boot problem reported privately by Frank Kardel and Patrick Welche

(jdolecek)

2020-05-14 19:36:03 UTC MAIN commitmail json YAML

xen_vec_alloc() is no more

(jdolecek)

2020-05-14 13:25:40 UTC MAIN commitmail json YAML

fix resume for xennet, now the network continues working after resume

we can't read feature-rx-copy in resume, at that time the new backend
device is not filled yet; convert it just to feature flag read on interface
attach, can assume any backend would support rx-copy anyway

fix compile with XENNET_DEBUG

part of PR port-xen/55207

(jdolecek)

2020-05-14 13:18:55 UTC MAIN commitmail json YAML

fix compile when DPRINK() is defined

(jdolecek)

2020-05-14 09:47:25 UTC MAIN commitmail json YAML

rearrange so that suspend & resume doesn't cause panics, and interface
is more likely to work - particularly, don't try to xengnt_revoke_access()
after resume, move xen_intr_disestablish() call to resume, also
unmask the event channel on resume

XXX right now xennet device detaches immediately after resume, which is not
desirable and needs to be fixed

part of PR port-xen/55207

(jdolecek)

2020-05-13 22:13:49 UTC MAIN commitmail json YAML

fix how shutdown is acknowledged - do it just by writing empty value
into the key; this is necessary for suspend, for it removal fails with
EACCESS

now 'xl save' proceeds almost instantly without timing out, and no longer
complains about the domain not acknowleding suspend

part of port-xen/55207

(jdolecek)

2020-05-13 21:59:45 UTC MAIN commitmail json YAML

make the iscsi attached message aprint_verbose(), no need to show normally

(jdolecek)

2020-05-13 16:17:46 UTC MAIN commitmail json YAML

move the xen_intr_disestablish() to resume - having it in suspend
seems to cause panic in later phases of suspend

don't try to revoke grants in resume, they are all gone

add some diagnostic code in suspend to make sure the request lists are ready
for resume

part of PR port-xen/55207

(jdolecek)

2020-05-13 16:13:14 UTC MAIN commitmail json YAML

need to set the version on resume same as during initialization

part of PR port-xen/55207

(jdolecek)

2020-05-13 13:19:38 UTC MAIN commitmail json YAML

2020-05-12 10:02:56 UTC MAIN commitmail json YAML

need to take IFNET_LOCK() around if_stop (on suspend) and if_init (on resume)
calls, those need to read and/or manipulate if_flags and hence need
the lock for IFEF_MPSAFE drivers; the drivers can't do IFNET_LOCK() themselves,
because the ioctl path call these hooks with the lock held

fixes KASSERT() in xennet(4) while investigating PR port-xen/55207

(jdolecek)