IABSD.fr/src/sys

Branch :


Log

Author Commit Date CI Message
6d21c932 2020-10-12 17:38:28 Add support for the i.MX8M AHB clocks. These behave just like all the other composite clocks. With this we can get the frequency for the OCOTP.
783aabe8 2020-10-12 17:36:06 OCOTP's parent clock is the IPG clock on i.MX8M.
99ef5f49 2020-10-12 13:08:03 Fix build of tmpfs The breakage was caused by the removal of #include <sys/systm.h> from <uvm/uvm_map.h>. OK deraadt@, mpi@, beck@
0d27d3d9 2020-10-12 08:44:45 Use KASSERT() instead of if(x) panic() for NULL dereference checks. Improves readability and reduces the difference with NetBSD without compromising debuggability on RAMDISK. While here also use local variables to help with future locking and reference counting. ok semarie@
45227170 2020-10-12 02:06:25 Set the maximum frame size to RGE_JUMBO_FRAMELEN. From Brad. Tweak by myself.
06881677 2020-10-11 07:11:59 Refactor kqueue_scan() to use a context: a "kqueue_scan_state struct". The struct keeps track of the end point of an event queue scan by persisting the end marker. This will be needed when kqueue_scan() is called repeatedly to complete a scan in a piecewise fashion. Extracted from a previous diff from visa@. ok visa@, anton@
51a6fb14 2020-10-11 07:05:28 Stop exporting `wt_hwqueue' now that drivers don't advertise it. Pointed by and ok jsg@
0f557061 2020-10-11 05:45:33 Align pool items on CACHELINESIZE when replacing linux kmem_cache with SLAB_HWCACHE_ALIGN flag. tested by semarie@
61e9a5e4 2020-10-10 18:03:41 Returning a void expression is weird; ok kettenis@ daniel@
0c5cb021 2020-10-10 17:05:55 Handle spurious interrupts. ok patrick@, deraadt@
1cb5dd39 2020-10-10 13:19:50 Add OPAL_PCI_MAP_PE_DMA_WINDOW.
a7d33ebc 2020-10-10 10:11:54 Remove unnecessary count of device instances.
c6fb730a 2020-10-10 07:07:46 Clear the kcov device for the current thread before freeing the same kcov device. Prevents a use-after-free, note I've never seen this one in practice.
16c91a58 2020-10-09 20:30:18 Unbreak the powerpc64 kernel build.
2769981b 2020-10-09 17:36:47 Optimize copyin(9), copyout(9) and kcopy(9) by doing 16-byte copies if possible. No doubt further optimizations are poissible, but this change results in a nice balance between code size and speed and is still easy to understand. ok patrick@
eb1adcec 2020-10-09 08:53:16 Kill unused IEEE80211_RADIOTAP_HWQUEUE. Its value is conflicting with an effort to standardize TX flags fields of the radiotap header from Mathy Vanhoef. This flag used to indicate the presence of a specific hardware queue used by WME but is unchecked. ok sthen@, kn@
65a03d4d 2020-10-09 08:20:46 Do not dereference `vp' after vput(9)ing it. From dholland@NetBSD ok anton@
26d06e40 2020-10-09 08:16:28 Remove unecesary includes. ok deraadt@
73a63b7d 2020-10-08 20:57:52 Register sxitwi(4) in the I2C framework. ok kettenis@
6e66b933 2020-10-08 19:41:03 use access_type as the PROT_* variable for uvm_fault() consistantly ok kettenis
574045aa 2020-10-07 17:53:44 sys_getitimer(), sys_setitimer(): style(9), misc. cleanup - Consolidate variable declarations. - Remove superfluous parentheses from return statements. - Prefer sizeof(variable) to sizeof(type) for copyin(9)/copyout(9). - Remove some intermediate pointers from sys_setitimer(). Using SCARG() directly here makes it more obvious to the reader what you're copying.
d71a0d64 2020-10-07 16:17:25 getitimer(2), setitimer(2): ITIMER_REAL: call getnanouptime(9) once Now that the critical sections are merged we should call getnanouptime(9) once. This makes an ITIMER_REAL timer swap atomic with respect to the clock: the time remaining on the old timer is computed with the same timestamp used to schedule the new timer.
b015073f 2020-10-07 15:45:00 getitimer(2), setitimer(2): merge critical sections Merge the common code from sys_getitimer() and sys_setitimer() into a new kernel subroutine, setitimer(). setitimer() performs all of the error-free work for both system calls within a single critical section. We need a single critical section to make the setitimer(2) timer swap operation atomic relative to realitexpire() and hardclock(9). The downside of the new atomicity is that the behavior of setitimer(2) must change. With a single critical section we can no longer copyout(9) the old timer before installing the new timer. So If SCARG(uap, oitv) points to invalid memory, setitimer(2) now fail with EFAULT but the new timer will be left running. You can see this in action with code like the following: struct itv, olditv; itv.it_value.tv_sec = 1; itv.it_value.tv_usec = 0; itv.it_interval = itv.it_value; /* This should EFAULT. 0x1 is probably an invalid address. */ if (setitimer(ITIMER_REAL, &itv, (void *)0x1) == -1) warn("setitimer"); /* The timer will be running anyway. */ getitimer(ITIMER_REAL, &olditv); printf("time left: %lld.%06ld\n", olditv.it_value.tv_sec, olditv.it_value.tv_usec); There is no easy way to work around this. Both FreeBSD's and Linux's setitimer(2) implementations have a single critical section and they too fail with EFAULT in this case and leave the new timer running. I imagine their developers decided that fixing this error case was a waste of effort. Without permitting copyout(9) from within a mutex I'm not sure it is even possible to avoid it on OpenBSD without sacrificing atomicity during a setitimer(2) timer swap. Given the rarity of this error case I would rather have an atomic swap. Behavior change discussed with deraadt@.
10b16239 2020-10-07 13:37:32 Remove dead marko cdev_joy_init. ok mpi@, kettenis@, patrick@
7406c037 2020-10-07 12:33:03 Document that `a_p' is always curproc by using a KASSERT(). One exception of this rule is VOP_CLOSE() where NULL is used instead of curproc when the garbace collector of unix sockets, that runs in a kernel thread, drops the last reference of a file. This will allows for future simplifications of the VFS interfaces. Previous version ok visa@, anton@. ok kn@
38802bc0 2020-10-07 12:26:20 Do not release the KERNEL_LOCK() when mmap(2)ing files. Previous attempt to unlock amap & anon exposed a race in vnode reference counting. So be conservative with the code paths that we're not fully moving out of the KERNEL_LOCK() to allow us to concentrate on one area at a time. The panic reported was: ....panic: vref used where vget required ....db_enter() at db_enter+0x5 ....panic() at panic+0x129 ....vref(ffffff03b20d29e8) at vref+0x5d ....uvn_attach(1010000,ffffff03a5879dc0) at uvn_attach+0x11d ....uvm_mmapfile(7,ffffff03a5879dc0,2,1,13,100000012) at uvm_mmapfile+0x12c ....sys_mmap(c50,ffff8000225f82a0,1) at sys_mmap+0x604 ....syscall() at syscall+0x279 Note that this change has no effect as long as mmap(2) is still executed with ze big lock. ok kettenis@
281a22f0 2020-10-07 12:13:23 Include <sys/systm.h> directly instead of relying on hidden UVM includes. The header is being pulled via uvm_extern.h -> uvm_map.h
8e8ebef9 2020-10-07 11:23:05 match more Intel PCH SMBus ids
ce666b53 2020-10-07 11:20:41 match on more pch kt ids
d8e9eaf6 2020-10-07 11:19:28 match on more pch thermal ids
5267dca0 2020-10-07 11:17:59 match on more Intel dwiic pci ids
9798072a 2020-10-07 11:15:31 regen
17ad86b8 2020-10-07 11:14:59 add more Intel 100, 200 and 300 Series PCH ids
3cc85d69 2020-10-07 06:27:22 regen
ab110328 2020-10-07 06:26:43 add Intel 400 Series and 400 Series V PCH ids
7392f8b9 2020-10-07 01:18:26 regen
02b15c9c 2020-10-07 01:15:18 add Intel 495 Series LP PCH and Ice Lake graphics ids
f8c201ec 2020-10-06 07:23:15 The command value of the _IOC() macro is limited to values [0..255]. This change results in no binary change, it just makes things more clear. OK deraadt
11bacf69 2020-10-05 05:29:34 add more ure(4) ids found in lenovo version of realtek windows driver and linux ok kevlo@
c645d466 2020-10-05 05:28:44 regen
587c3e20 2020-10-05 05:28:13 add more ure(4) ids found in lenovo version of realtek windows driver and linux ok kevlo@
2dfaff3c 2020-10-05 02:27:39 sync
a17fe007 2020-10-05 02:26:54 drm/i915/tgl: Add new PCI IDs to TGL From Swathi Dhanavanthri 3882581753d1cca0d32b5a8ad81791b79fb35d67 in mainline linux
5e73443b 2020-10-05 01:59:10 regen
131f31a0 2020-10-05 01:58:32 add more Intel 500 Series LP PCH and Tiger Lake graphics ids
64e0152d 2020-10-05 01:56:17 Fix write hang-up on file system on vnd. ok beck@
c37ebb0f 2020-10-04 21:58:53 Recent changes for PROT_NONE pages to not count against resource limits, failed to note this also guarded against heavy amap allocations in the MAP_SHARED case. Bring back the checks for MAP_SHARED from semarie, ok kettenis https://syzkaller.appspot.com/bug?extid=d80de26a8db6c009d060
55f96d47 2020-10-04 20:22:22 Change kcopy(9) such that it does 64-bit and 32-bit copies whenever possible. This makes sure a kcopy(9) that is a sequence of 64-bit or 32-bit values that are properly aligned is done atomically. This is needed for kbind(2) as it needs to update PLT/GOT entries atomically when doing lazy binding. This seems to fix some random SIGSEGV and SIGTRAP when linking stuff with ld.lld. ok deraadt@
fe11e15c 2020-10-04 20:03:57 Change kcopy(9) such that it does 64-bit and 32-bit copies whenever possible. This makes sure a kcopy(9) that is a sequence of 64-bit or 32-bit values that are properly aligned is done atomically. This is needed for kbind(2) as it needs to update PLT/GOT entries atomically when doing lazy binding. This seems to fix some random SIGSEGV and SIGTRAP when linking stuff with ld.lld. ok deraadt@, patrick@, drahn@
081b9769 2020-10-04 18:49:22 Remove outdated comment.
bf0061d2 2020-10-04 10:36:55 regen
5ef07433 2020-10-04 10:35:35 add more Intel 400 Series LP PCH and Comet Lake graphics ids
17a53f5a 2020-10-04 06:59:16 fix indent
84cad3c2 2020-10-03 07:31:12 Collect coverage from interrupts. Currently limited to remote sections which allows coverage of timeouts executed from softclock to be collected. During boot, a dedicated coverage buffer per CPU is allocated which is used to collect coverage in interrupts. The kcov implementation in Linux recently added the same functionality. ok mpi@
5a63c237 2020-10-03 06:22:20 Increase CLAIM_LIMIT from 11M to 14M to make room for retguard The kernel text will grow larger when retguard adds code to many functions to check their return addresses. The entire kernel (including text, data, bss, symbol table, and ramdisk) must fit under the CLAIM_LIMIT. A kernel that overflows this limit may fail very quickly, by causing a "DEFAULT CATCH!" error in Open Firmware. Crank version to "1.10", so I can see whether the running ofwboot uses the higher CLAIM_LIMIT. ok deraadt@
997bae9a 2020-10-03 00:23:55 Introduce `if_cloners_lock' rwlock and use it to serialize if_clone_{create,destroy}(). This fixes the races described below. if_clone_{create,destroy}() are kernel locked, but since they touch various sleep points introduced by rwlocks and M_WAITOK allocations, without serialization they can intersect due to race condition. The avoided races are: 1. While performing if_clone_create(), concurrent thread which performing if_clone_create() can attach `ifp' with the same `if_xname' and made inconsistent `if_list' where all attached interfaces linked. 2. While performing if_clone_create(), concurrent thread which performing if_clone_destroy() can kill this incomplete `ifp'. 3. While performing if_clone_destroy(), concurrent thread which performing if_clone_destroy() can kill this dying `ifp'. ok claudio@ kn@ mpi@ sashan@
fbafb849 2020-10-02 18:43:14 Attach on Intel 500-series chipsets. ok jsg@
7fa7ff51 2020-10-02 18:42:39 regen
890af8a5 2020-10-02 18:41:51 Add Intel 500-series I2C devices. ok jsg@
c62c648b 2020-10-02 15:45:22 expose timeval/timespec from system calls into ktrace, before determining if they are out of range, making it easier to isolate reason for EINVAL ok cheloha
cfacd38e 2020-10-02 09:14:33 relax check for valid onrdomain range. onrdomain is -1 if the value is unused by the rule. So skip the rest of the check in that case. Fixes rulest loading for semarie@ OK semarie@
38c93db2 2020-10-02 04:02:46 adjust for reversed outb arguments linux uses
2b67eb97 2020-10-01 17:28:14 Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on many POWER8 and POWER9 systems.
a345488b 2020-10-01 15:43:41 Attach on Intel 400-series chipsets. ok jsg@
4f86a910 2020-10-01 15:42:53 regen
7c753e1b 2020-10-01 15:42:15 Add Intel 400-series I2C devices. ok jsg@
060fb837 2020-10-01 14:02:08 rdomain IDs do not need to exist for "on rdomain N" to work Unlike "... rtable N", pf.conf(5)'s "on rdomain N" does not alter packet state and will always work no matter if rdomain N currently exists or not, i.e. the rule "pass on rdomain 42" will simply match (and pass) packets if rdomain 42 exists, and it will simply not match (neither pass nor block) packets if 42 does not exist. There's no need to reload the ruleset whenever routing domains are created or deleted, which can already be observed now by creating an rdomain, loading rules referencing it and deleting the same rdomain immediately afterwards: pf will continue to work as expected. Relax both pfctl(8)'s parser check as well as pf(4)'s copyin routine to accept any valid routing domain ID without expecting it to exist at the time of ruleset creation - this lifts the requirement to create rdomains before referencing them in pf.conf while keeping pf behaviour unchanged. Prompted by yasuoka's recent pfctl parse.y r1.702 commit requiring an rtable to exist upon ruleset creation. Discussed with claudio and bluhm at k2k20. Feedback sashan OK sashan yasouka claudio
db454026 2020-10-01 10:05:09 correct size argument to free(9) ok kettenis@
f9dd7470 2020-10-01 09:35:30 avoid uninitialised var use in drm_syncobj.c We don't walk the chain in dma_fence_chain_for_each() but can provide the first fence.
16dc5006 2020-10-01 05:14:10 fix indentation
d714ed3d 2020-09-30 22:23:40 Move mfokclock(4) from loongson to sys/dev/i2c so that it be used by more platforms than just loongson. Rename it to mfokrtc(4) for consistency with other RTC drivers. Make it match on st,m41t83, since that was the chip for which the driver was written for. More compatible strings can be added for each chip of the series verified to behave the same. Discussed with kettenis@ Compile tested on loongson by kn@ Tested on loongson by and ok visa@
73c7e8bc 2020-09-30 19:22:51 We have no if_attachtail() function so remove the declaration. ok deraadt@ claudio@
1f0d2f73 2020-09-30 14:51:17 renable POOL_DEBUG ok deraadt@
e5d32326 2020-09-30 14:46:02 6.8-current ok deraadt@
9c6ff59f 2020-09-29 21:05:05 Add support for A64 UART resets. ok patrick@
89a75622 2020-09-29 16:40:33 Fix mistypes within sys/smr.h LIST_END -> SMR_LIST_END TAILQ_END -> SMR_TAILQ_END ok visa@
49361fec 2020-09-29 13:59:22 Add support for the PCA9546 I2C switch to pcamux(4). In comparison to PCA9548, this variant supports only 4 instead of 8 channels. ok kettenis@
332805e1 2020-09-29 13:50:54 The pcamux(4) device tree node's children are the individual channels, which we each treat as an I2C bus. While scanning these, we need to use each channel's node as starting point instead of the pcamux(4) node. This fixes finding and attaching devices connected to these channels. ok kettenis@
27257b4a 2020-09-29 11:48:54 Move the solock() call outside of solisten(). The reason is that the so_state and splice checks were done without the proper lock which is incorrect. This is similar to sobind(), soconnect() which also require the callee to hold the socket lock. Found by, with and OK mvs@, OK mpi@
afd3b31e 2020-09-29 11:47:41 Introduce a helper to check if all available swap is in use. This reduces code duplication, reduces the diff with NetBSD and will help to introduce locks around global variables. ok cheloha@
c5ff3c33 2020-09-29 09:11:44 Set the correct length before copying to userland. Prevent copying a partial and corrupted descriptor or leaking kernel memory. ok kn@, deraadt@
bb5b75b5 2020-09-29 03:06:34 Delete dead isa_strayintr() and fakeintr() code, along with multiple dead variables, present from the fork from i386 but unused since the interrupt code on amd64 managed to divorce its ISA heritage ok deraadt@
d19edd3a 2020-09-29 01:44:40 Add TP-LINK UE300 device. Tested by Joel Carnat. ok deraadt@
1978b916 2020-09-28 18:34:45 Add support for Comet Lake I2C controllers; needed to have a working trackpad on machines such as the 8th generation Lenovo X1. This is a temporary fix that uses magic numbers instead of #defines such that this diff can be included in the upcoming release. Will be replaced by a proper fix later. ok deraadt@
f1ec5211 2020-09-28 13:16:58 Add defines for the number of frames to skip on powerpc64. ok mpi@
8f51e4cc 2020-09-27 17:25:19 In the previous commit, check tv_nsec, not tv_sec as VNOVAL is a valid valuse of tv_sec but an invalid value for tv_nsec. Noticed by guenther@. ok beck@ deraadt@
28747bd2 2020-09-27 16:46:15 Add workaround for Lenovo X1 gen 8 which has AML that tries to invoke ToHexString() on a Package. Should probably be replaced by a better solution after release. ok deraadt@
d0ef1137 2020-09-27 16:40:44 nfs_create: after an exclusive create rpc, make sure to update timestamps. This issue was iscovered after rsync 3.2 changed behaviour on an NFS mounted partition.. Change lifted from NetBSD (r 1.204). ok beck@, kn@, deraadt@
bacae592 2020-09-27 16:40:26 miod's proposal for traps was also wrong, causing one type of kernel trap to reach the userland check. as suggested, this might fix it.
42aac20c 2020-09-27 16:03:55 Make sure acpicpu(4) doesn't attach to Processor nodes that happen to have a _HID. Should fix the issues with broken AML that Janne Johansson reported. This issue should be fixed in a more generic way, but that is too risky for the upcoming release. tested by jmc@ ok deraadt@
a4fe4c27 2020-09-26 17:56:54 Do the NULL -> cpu_info_primary conversion in the interrupt controller drivers instead of the "midlayer". I had missed a couple of places in the midlayer and instead of fixing this in several places it is better to do it in the functions that get invoked in the end.
23834b0f 2020-09-26 15:16:12 Stop printing the extents for release. ok deraadt@
2659a4f5 2020-09-26 15:15:22 Remove the PR_WAITOK flag from the ucred_pool. The pool items are small enough that this pool uses the single page allocator for which PR_WAITOK is a no-op. However it presence suggests that pool_put(9) may sleep. The single page allocator will never actually do that. This makes it obvious that refreshcreds() will not sleep. ok deraadt@, visa@
1415eaef 2020-09-26 12:42:52 Add support for POWER9P "Axone" CPUs.
f8487ce0 2020-09-26 12:06:37 Make kd_claim() accept an explicit argument representing the number of entries to claim in the coverage buffer. In preparation for some upcoming changes. ok mpi@ as part of a larger diff
fdb37709 2020-09-26 12:01:57 Read curproc once in kcov_remote_enter() and kcov_remote_leave().
b98c2012 2020-09-26 11:59:59 KCOV_BUF_MAX_NMEMB is defined under _KERNEL in sys/kcov.h but only used in dev/kcov.c; therefore move it to dev/kcov.c.
925b9196 2020-09-26 11:58:17 Fix typo in comment.
d52ff6db 2020-09-25 20:24:32 setpriority(2): don't treat booleans as scalars The variable "found" in sys_setpriority() is used as a boolean. We should set it to 1 to indicate that we found the object we were looking for instead of incrementing it. deraadt@ notes that the current code is not buggy, because OpenBSD cannot support anywhere near 2^32 processes, but agrees that incrementing the variable signals the wrong thing to the reader. ok millert@ deraadt@
38552676 2020-09-25 17:31:27 Sprinkle some .type statements to help btrace(4) pick function names.