summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* add IPPROTO_SCTP, ok claudio@sthen2021-01-181-1/+2
|
* Introduce new function if_unit(9). This function returns a pointer themvs2021-01-182-19/+55
| | | | | | | | | | | interface descriptor corresponding to the unique name. This descriptor is guaranteed to be valid until if_put(9) is called on the returned pointer. if_unit(9) should replace already existent ifunit() which returns descriptor not safe for dereference when context was switched. This allow us to avoid some use-after-free issues in ioctl(2) path. Also this unifies interface descriptor usage. ok claudio@ sashan@
* Cache parent's pid as `ps_ppid' and use it instead of `ps_pptr->ps_pid'.mvs2021-01-176-9/+12
| | | | | | This allows us to unlock getppid(2). ok mpi@
* Add defines for the various ARM SMMU models.patrick2021-01-171-2/+8
| | | | ok kettenis@
* add another iwx devicejcs2021-01-172-11/+21
| | | | ok stsp jsg
* regenjcs2021-01-172-2/+7
|
* add another ax201jcs2021-01-171-1/+2
|
* kqueue: Revise fd close notificationvisa2021-01-173-33/+121
| | | | | | | | | | | | | | | | | | Deliver file descriptor close notification for __EV_POLL knotes through struct kevent that kqueue_scan() returns. This replaces the previous way of returning EBADF from kqueue_scan(), making it easier to determine what exactly has changed. When a file descriptor is closed, its __EV_POLL knotes are turned into one-shot events and queued for delivery. These knotes are "unregistered" as they are reachable only through the queue of active events. This reduces interference with the normal workings of kqueue. However, more care is needed to avoid leaking knotes. In addition, the unregistering removes a limit on the number of issued knotes. To prevent accumulation of pending fd close notifications, kqpoll_init() flushes the active queue at the start of a kqpoll scan. OK mpi@
* Replace SB_KNOTE and sb_flagsintr with direct checking of klist.visa2021-01-173-19/+5
| | | | OK mpi@ as part of a larger diff
* this hardware is fine with BUS_DMA_64BIT mappings.dlg2021-01-171-4/+7
| | | | | | | | this raises performance of tcpbench on an m3000 from ~3kpps and ~8MB/s to ~70kpps and ~191MB/s when transmitting, and ~10kpps and ~15MB/s to ~120kpps and 174MB/s when receiving. i also tested this on a v245 and an m4000 a while back.
* don't encode the mbuf prio as part of the vlan tag in bpf_mtap_ether.dlg2021-01-171-8/+2
| | | | | | | | | the vlan tag we're injecting into the mbuf chain is either straight off the wire and therefore already has the vlan priority encoded, or is straight after it's been set up by vlan(4), which also has the prio already encoded. ok kn@ visa@ mvs@
* Move `access_type' to the fault context.mpi2021-01-161-20/+20
| | | | | | | Fix a regression where the valye wasn't correctly overwritten for wired mapping, introduced in previous refactoring. ok mvs@
* The sysctl variable net.inet.ip.forwarding is checked beforebluhm2021-01-161-7/+19
| | | | | | | | | ip_input() passes the packet to ip_forward(). But with an af-to rule, pf(4) calls ip_forward() directly. Check the forwarding sysctl also in pf to get consistent behavior. This requires to set both ip and ip6 forwarding to get packet flow in both directions over af-to rules. OK kn@
* Extend IP_MULTICAST_IF to take either an address (struct in_addr), aclaudio2021-01-161-3/+32
| | | | | | | | struct ip_mreq or a struct ip_mreqn. Using struct ip_mreqn allows to pass a interface index instead of specifying the multicast interface via its IP address. This is also the API implemented by Linux and FreeBSD and should help porting software. OK bluhm@ phessler@ robert@
* recognise Realtek ALC287jsg2021-01-161-1/+4
|
* regenjsg2021-01-162-4/+9
|
* add Intel AX201 Bluetoothjsg2021-01-161-1/+2
|
* regenjsg2021-01-162-4/+109
|
* add devices mostly from x1 nano jcs@ hasjsg2021-01-161-2/+23
|
* Remove a check that bypasses pf state tests. It dates back to 2003bluhm2021-01-151-7/+1
| | | | | | | when NAT was implemented differently. Now it does not seem to make sense anymore. sashan@ has identified cases where it does harm. dlg@ wants to remove it to simplify route-to code. from dlg@; OK sashan@
* Add IORT structs for ARM SMMU versions 1 and 2.patrick2021-01-151-1/+35
| | | | ok kettenis@
* Split the IORT struct into two, as the current version not only containedpatrick2021-01-152-3/+8
| | | | | | the generic IORT node information but also the Root Complex's attributes. ok kettenis@
* Add IORT id for ARM SMMUv3.patrick2021-01-151-1/+2
| | | | ok kettenis@
* Move IO Remapping Table (IORT) struct defines to the common ACPI headerpatrick2021-01-152-36/+35
| | | | | | so that it can be used by more drivers. ok kettenis@
* As documented in sysctl(2) net.inet.ip.forwarding can be 2.bluhm2021-01-151-3/+3
| | | | | Relax input validation and use integer comparison. OK kn@ mvs@ sthen@
* Report full IP address information to the host. Contrary to what I wrotejmatthew2021-01-151-9/+300
| | | | | | here 10 years ago, xdr isn't scary at all. ok dlg@
* Some BIOS seem to provide memory regions <16M in their reserved memorypatrick2021-01-141-5/+7
| | | | | | | | | | region reporting table. Since the extent only covered memory starting at 16M, these regions could not be reserved and would in turn cause a panic. Make the extent start at 0 and immediately reserve the first 16M right away, so that we can change the reserved memory allocator to EX_CONFLICTOK to make allocations succeed if they are already reserved. ok kettenis@
* Fix build without carp: ifp0 is only used within #if NCARP > 0.tb2021-01-141-2/+7
| | | | ok kn mvs
* syncer_thread: sleep without lboltcheloha2021-01-141-6/+25
| | | | | | | | | | | | | | | | | | | | | The syncer_thread() uses lbolt to perform periodic execution. We can do this without lbolt. - Adding a local wakeup(9) channel (syncer_chan) and sleep on it. - Use a local copy of getnsecuptime() to get 1/hz resolution for time measurements. This is much better than using gettime(9), which is wholly unsuitable for this use case. Measure how long we spend in the loop and use this to calculate how long to sleep until the next execution. NB: getnsecuptime() is probably ready to be moved to kern_tc.c and documented. - Using the system uptime instead of the UTC time avoids issues with time jumps. ok mpi@
* Make vm_rpc_send_rpci_tx_buf() use the buffer passed in, not the bufferjmatthew2021-01-131-2/+2
| | | | | | | allocated as part of the softc, though it's always been the same buffer so far. ok dlg@
* put M_ZERO in the right placejmatthew2021-01-131-2/+2
| | | | ok dlg@
* kernel, sysctl(8): remove dead variable: tickadjcheloha2021-01-135-15/+6
| | | | | | | | | | | | | | | | | | | | The global "tickadj" variable is a remnant of the old NTP adjustment code we used in the kernel before the current timecounter subsystem was imported from FreeBSD circa 2004 or 2005. Fifteen years hence it is completely vestigial and we can remove it. We probably should have removed it long ago but I guess it slipped through the cracks. FreeBSD removed it in 2002: https://cgit.freebsd.org/src/commit/?id=e1d970f1811e5e1e9c912c032acdcec6521b2a6d NetBSD and DragonflyBSD can probably remove it, too. We export tickadj via the kern.clockrate sysctl(2), so update sysctl.2 and sysctl(8) accordingly. Hypothetically this change could break someone's sysctl(8) parsing script. I don't think that's very likely. ok mvs@
* Convert mbuf type KDASSERT() to a proper KASSERT() in m_get(9).bluhm2021-01-131-3/+3
| | | | | Should prevent to use uninitialized value as bogus counter index. OK mvs@ claudio@ anton@
* Add support for the HYM8563 RTC, which is a PCF8563 clone.kettenis2021-01-131-5/+3
| | | | ok kurt@
* Link pflog(4) instances to `pflog_ifs' list instead of allocatingmvs2021-01-132-52/+31
| | | | | | | | | | | | `pflogifs' array. This was done to prevent panics caused by internal malloc(9) limit. Also we avoid the case while single pflog(4) interface with a high index allocates an array for all indices below and eats up kernel memory. Since we have a very little count of pflog(4) interfaces linear search does not performance impact. ok bluhm@ claudio@ kn@
* Send without kernel lockkn2021-01-131-10/+7
| | | | | | | | The output path can run without kernel lock just fine as is. Looking at CVS log, it seems this was not done during import because IFXF_MPSAFE only became a thing afterwards. OK mvs
* revert drm vmalloc changesjsg2021-01-133-126/+39
| | | | | | | It is suspected they were to blame for a machine with inteldrm running X (xterms and chromium) running out of resources after a few days. ok kettenis@
* Sometimes a user ID was logged in pflog(4) although the logopt ofbluhm2021-01-122-5/+5
| | | | | | | | | | the rule did not specify it. Check the option again for the log rule in case another rule has triggered a socket lookup. Remove logopt group, it is not documented and cannot work as struct pfloghdr does not contain a gid. Rename PF_LOG_SOCKET_LOOKUP to PF_LOG_USER to express what it does. The lookup involved is only an implemntation detail. OK kn@ sashan@ mvs@
* Remove unused start routinekn2021-01-111-12/+1
| | | | | | pflog(4) does not send or generate packets by design. OK mvs sashan
* Assert that the KERNEL_LOCK() is held in uao_set_swslot().mpi2021-01-111-1/+3
| | | | ok kettenis@
* New rw_obj_init() API providing reference-counted rwlock.mpi2021-01-113-3/+147
| | | | | | | Original port from NetBSD by guenther@, required for upcoming amap & anon locking. ok kettenis@
* Clear CR 26 before returning to userland to avoid potentioal info leak.kettenis2021-01-111-4/+7
| | | | ok miod@, deraadt@
* When an endpoint stalls, we usually try to reset it by callingmglocker2021-01-111-2/+2
| | | | | | | | | | | | usbd_clear_endpoint_stall(), which in turn will call usbd_clear_endpoint_toggle(). It can be a common situation that when this happens, there is still a transfer in the stalled queue being in progress. The ehci(4) clear toggle function is currently doing a panic() in the diagnostic code in this situation, which is a bit of an overkill. The device still can be recovered by detaching/attaching it. Therefore change the panic() in to a printf(). ok mpi@
* Simplify sleep signal handling a bit by introducing sleep_signal_check().claudio2021-01-112-19/+26
| | | | | | | The common code is moved to sleep_signal_check() and instead of multiple state variables for sls_sig and sls_unwind only one sls_sigerr is set. This simplifies the checks in sleep_finish_signal() a great bit. Idea from and OK mpi@
* Create a path MTU host route for IPsec over IPv6. Basically thebluhm2021-01-117-32/+111
| | | | | | | | | | | | | | | | code is copied from IPv4 and adapted. Some things are changed in v4 to make it look similar. - ip6_forward increases the noroute error counter, do that in ip_forward, too. - Pass more specific sockaddr_in6 to icmp6_mtudisc_clone(). - IPv6 may also use reject routes for IPsec PMTU clones. - To pass a route_in6 to ip6_output_ipsec_send() introduce one in ip6_forward(). That is the same what IPv4 does. Note that dst and sin6 switch roles. - Copy comments from ip_output_ipsec_send() to ip6_output_ipsec_send() to make code similar. - Implement dynamic IPv6 IPsec PMTU routes. OK tobhe@
* add quirks for Kensington Slimblade trackball via new vendor buttonsthfr2021-01-105-17/+40
| | | | | | | quirks. Original diff from Sven M. Hallberg < pesco () khjk ! org > Diff updated and tested by Timo Myyra ok phessler@
* regenthfr2021-01-102-4/+9
|
* add Kensington Slimblade Trackballthfr2021-01-101-1/+2
|
* Split hierarchical calls into kern_sysctl_dirsgnezdo2021-01-091-42/+46
| | | | | | Removed a rash of +/-1 and made both functions shorter and more focused. OK millert@
* Reduce case duplication in kern_sysctlgnezdo2021-01-091-108/+85
| | | | | | | This changes amd64 GENERIC.MP .text size of kern_sysctl.o from 6440 to 6400. Surprisingly, RAMDISK grows from 1645 to 1678. OK millert@, mglocker@