summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-11-04in vlan_clone_destroy take NET_LOCK when calling vlan_down and mark it dead.David Gwynne
2019-11-04make the parent promisc when a promisc vlan interface is brought up.David Gwynne
this has been reported by a bunch of people including chris@, jon williams on bugs@, and ze loff on misc@
2019-11-04Fix previous commit: missed a ds_copyin() moved in rev 1.72Philip Guenther
2019-11-03Merge sys_shmctl() and shmctl1() again, as we no longer have a need forPhilip Guenther
the copyin/copyout compat shims. ok deraadt@ millert@ anton@
2019-11-03kern_timeout.c: style(9), misc. cleanupcheloha
- Move mutex to top of file, annotate locking for module - Group module-local prototypes below globals but above function defs - __inline -> inline - No static without inline - Drop extra parentheses around return values Compiler input from visa@. ok visa@
2019-11-03rework kubsan_state into simpler boolean named kubsan_coldanton
2019-11-03add missing handler for float cast overflow; caused by code inanton
sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c
2019-11-03Don't talk about uvm_km_alloc(9), pool_get(9) is what we need.Martin Pieuchot
ok deraadt@, guenther@
2019-11-03Correctly re-initialize the nameinfo struct that is re-used forBob Beck
vn_open when vnconfig'ing from a read-only filesystem. This bug has been with us for a long time and was spotted by Kawamata Yoshihiro <kaw@on.rim.or.jp> after recent changes making vn_open more picky about the structure it is called with.
2019-11-02softclock: move softintr registration/scheduling into timeout modulecheloha
softclock() is scheduled from hardclock(9) because long ago callouts were processed from hardclock(9) directly. The introduction of timeout(9) circa 2000 moved all callout processing into a dedicated module, but the softclock scheduling stayed behind in hardclock(9). We can move all the softclock() "stuff" into the timeout module to make kern_clock.c a bit cleaner. Neither initclocks() nor hardclock(9) need to "know" about softclock(). The initial softclock() softintr registration can be done from timeout_proc_init() and softclock() can be scheduled from timeout_hardclock_update(). ok visa@
2019-11-02Revert previous, a race is present and can be triggered with golang.Martin Pieuchot
Found by jsing@
2019-11-02Add a few more PCIe capability registers and bits. As usual, the namesMark Kettenis
are taken from Intel chipset documentation. Prompted by a diff from kurt@. ok kurt@
2019-11-02Start documenting which locking primitives apply to uvm_map members.Martin Pieuchot
ok kettenis@
2019-11-02Move dead procs to the reaper queue immediately after context switch.Visa Hankala
This eliminates a forced context switch to the idle proc. In addition, sched_exit() no longer needs to sum proc runtime because mi_switch() will do it. OK mpi@ a while ago
2019-11-01Kill resched_proc() and instead call need_resched() when a thread isMartin Pieuchot
added to the runqueue of a CPU. This fix out-of-sync cases when the priority of a thread wasn't reflecting the runqueue it was sitting in leading to unnecessary context switch. ok visa@
2019-11-01Reduce BOOTRANDOM_MAX to 256. naddy pointed out there's no point havingTheo de Raadt
it larger than RC4STATE. A long discussion ensued. In conclusion all entropy inputs are either satisfactory enough, or just as shitty at 512.
2019-11-01Push the KERNEL_LOCK() down in uvm_map_inentry().Martin Pieuchot
The lookup in uvm_map_inentry_fix() is already serialized by the vm_map_lock and such lookup is already executed w/o the KERNEL_LOCK(). ok kettenis@, deraadt@
2019-11-01Keep local function definitions in C files.Martin Pieuchot
2019-11-01Document that p_{sp,pc}inentry are owned by the current thread.Martin Pieuchot
2019-11-01Fix an off-by-one in db_save_stack_trace().Martin Pieuchot
Save the PC after checking if it belongs to the kernel.
2019-11-01Flush the register windows before unwinding the stack.Martin Pieuchot
This makes db_save_stack_trace() and db_stack_dump() work. ok deraadt@, kettenis@
2019-10-31In 2013, when OpenBSD/armv7 was still rather early, improvements forPatrick Wildt
that platform have been trickling in bit by bit. One of those changes unfortunately introduced a regression in cache flushes. The check for the length in the cache-flush-loop was changed from the instruction bpl to bhi. This has the effect that it does not branch on zero anymore. Due to the length decrement at the beginning of the function, which was not removed, a length of (n * cacheline) + 1 means that the loop misses one run! This means it is possible that the last byte of a DMA transfer was incorrect, as one could see on network packets often enough. Remove that instruction, which makes it even more similar to the OpenBSD/arm64 code. ok deraadt@
2019-10-31Make background scans less frequent if we keep choosing the same AP.Stefan Sperling
This helps a bit in situations where a single AP is used and background scans are causing packet loss, as seen with Jesper Wellin's Broadcom-based AP and my Android phone in hotspot mode. This is not a proper fix but our background scan frequency against a single AP was much higher than needed anyway. Tested by jan, job, benno, Tracey Emery, Jesper Wallin
2019-10-30drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1Jonathan Gray
From Hans de Goede 4d5307c099afc9ce5fe89e8acf9b3c65104d0e08 in linux 4.19.y/4.19.81 984d7a929ad68b7be9990fc9c5cfa5d5c9fc7942 in mainline linux
2019-10-30drm/ttm: Restore ttm prefaultingJonathan Gray
From Thomas Hellstrom 11377c3e997eca9c9ff562fc4fc7a41a455bddf6 in linux 4.19.y/4.19.81 941f2f72dbbe0cf8c2d6e0b180a8021a0ec477fa in mainline linux
2019-10-30drm/edid: Add 6 bpc quirk for SDC panel in Lenovo G50Jonathan Gray
From Kai-Heng Feng 33af2a8ee304ee2deb618eebb534b52ce166467f in linux 4.19.y/4.19.81 11bcf5f78905b90baae8fb01e16650664ed0cb00 in mainline linux
2019-10-30Revert "drm/radeon: Fix EEH during kexec"Jonathan Gray
From Alex Deucher 0933b0db7fb239be01270b25bf73884870d8c1e6 in linux 4.19.y/4.19.81 8d13c187c42e110625d60094668a8f778c092879 in mainline linux
2019-10-29syncJoshua Stein
2019-10-29add an Intel 9260 wifi cardJoshua Stein
2019-10-29Consistently release the vnode lock while calling d_close of cloned andVisa Hankala
non-cloned devices. Combine spec_close() and spec_close_clone() to avoid code duplication. OK mpi@
2019-10-29Regen for Marvell 88SE9128 AHCI.Kurt Miller
2019-10-29Add Marvell 88SE9128 AHCI. okay kettenis@Kurt Miller
2019-10-29add the 802.1AE MACsec ethertypeDavid Gwynne
2019-10-29Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdataTheo de Raadt
section, which has grown a fair bit with the introduction of retguard. Mortimer discovered the repeated 512-byte sequence as retguard keys, and this resolves the issue. (Chacha does not fit on the media, so 1.5K early drop RC4 is hopefully sufficient in our KARL link universe) Version crank the bootblocks. sysupgrade -s will install new bootblocks. ok djm mortimer
2019-10-29add arc4 cipher to the bootblocksTheo de Raadt
ok djm mortimer
2019-10-28Copy in the user-supplied buffer in shmctl(2) before looking up theanton
shared memory segment. Otherwise, if copyin ends up sleeping it allows another thread to remove the same segment leading to a use-after-free. Feedback from kettenis@ and ok guenther@ Reported-by: syzbot+0de42c2e600a6dd3091d@syzkaller.appspotmail.com
2019-10-28Have iwm(4) configure the PCIe LTR.Stefan Sperling
Patch by Imre Vadasz. Cross-check and pcireg.h tweak by kettenis@ ok patrick@
2019-10-28Make iwm_stop_device() power down bus master DMA clocks on 7k devices only.Stefan Sperling
Patch by Imre Vadasz ok patrick@
2019-10-28Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE PHY_OP notification which willStefan Sperling
be generated by version 17 firmware. While at it, declare all known firmware command groups and all PHY_OPS subcomand ids. Patch by Imre Vadasz, with tweaks by me ok patrick@
2019-10-28Get rid of version 1 of iwm's time event firmware API.Stefan Sperling
All supported firmware versions support IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2. Rename struct iwm_time_event_cmd_v2 to iwm_time_event_cmd, and remove helper functions for converting from V2 API structs to V1 versions. Patch by Imre Vadasz ok patrick@
2019-10-28Remove a couple of unneeded IWM_UCODE_TLV_FLAGS_* flags:Stefan Sperling
IWM_UCODE_TLV_FLAGS_PM_CMD_SUPPORT IWM_UCODE_TLV_FLAGS_NEWBT_COEX IWM_UCODE_TLV_FLAGS_BF_UPDATED IWM_UCODE_TLV_FLAGS_D3_CONTINUITY_API IWM_UCODE_TLV_FLAGS_STA_KEY_CMD IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD IWM_UCODE_TLV_FLAGS_SCHED_SCAN All supported firmware versions have these flags set. Patch by Imre Vadasz ok patrick@
2019-10-28Remove unneeded IWM_UCODE_TLV_FLAGS_RX_ENERGY_API flag.Stefan Sperling
All supported firmware versions have this feature flag set. Remove now unneeded iwm_calc_rssi() function. Patch by Imre Vadasz. ok patrick@
2019-10-28Do not set IWM_SF_CFG_DUMMY_NOTIF_OFF bit in iwm SF_CFG firmware command.Stefan Sperling
It is only required for devices connected via SDIO which we do not support. Patch by Imre Vadasz ok patrick@
2019-10-28Skip the 'update MCC' command if iwm 8k firmware supports LocationStefan Sperling
Aware Regulatory (LAR) mode and LAR is disabled according to NVM. Patch by Imre Vadasz. ok patrick@
2019-10-28Use 0x6c as permanent ID for IWM_PHY_DB_CMD; remove incorrect comment.Stefan Sperling
Patch by Imre Vadasz. Matches Linux commit 176aa60bf148b5af4209ac323cef941dee76e390 by Sara Sharon. ok patrick@
2019-10-28Remove unused DEFAULT_MAX_TX_POWER definition from if_iwmreg.h,Stefan Sperling
which had a value different from the IWL_DEFAULT_MAX_TX_POWER constant in Linux iwlwifi. Patch by Imre Vadasz. ok patrick@
2019-10-28The iwm_prepare_card_hw() call in iwm_attach() is only needed on 8k devices.Stefan Sperling
Patch by Imre Vadasz. ok patrick@
2019-10-28iwm: tweak post-alive NIC locking to more closely match how Linux does itStefan Sperling
ok patrick@
2019-10-28iwm: enlarge maximum NVM section size; required for newer firmwareStefan Sperling
ok patrick@
2019-10-28Add missing KERNEL_UNLOCK.Mark Kettenis
ok guenther@, mpi@