aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* kinst: hide KINST_TRAMPCHUNK_SIZE from ISA-specific headersChristos Margiolis2023-06-132-1/+1
| | | | | | | Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40505
* proc.h: capitalize letter in TD_LOCKS_DECChristos Margiolis2023-06-131-1/+1
| | | | | | | | | | The other related macros capitalize "thread" as well, so use the same style. No functional change intended. Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40506
* namei: Reset the lookup to start from the real root for abs symlink targetDmitry Chagin2023-06-131-0/+8
| | | | | | | | | | | | | | | Since fd745e1d Linux ABI specifies alternative root directory to reroot lookups. First, an attempt is made to lookup the file in /ABI/original-path. If that fails, the lookup is done in /original-path. In case of lookup symbolic link with leading / in target namei() fails due to reroot reloads original file name. To avoid this handle restart in a special maner, without origin path name reloading. Reported by: Goran Mekić, Vincent Milum Jr Tested by: Goran Mekić Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40479
* namei: Add a comment explaining ISRESTARTED flagDmitry Chagin2023-06-131-0/+5
| | | | | Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40494
* linuxkpi: advance platform_deviceCorvin Köhne2023-06-131-0/+10
| | | | | | | | | | These are required by some linux driver like: https://github.com/beckhoff/bbapi Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39554
* Write out corrected superblock when creating a UFS/FFS snapshot.Kirk McKusick2023-06-131-3/+5
| | | | | | | | | | | | When taking a snapshot on a UFS version 1 filesystem we need to call ffs_oldfscompat_write() to unwind any in-memory changes that were made to the superblock before writing it. The cause of this bug was that the trimmed down maximum file size was not being reverted. PR: 271352 Tested-by: Peter Holm MFC-after: 1 week Sponsored-by: The FreeBSD Foundation
* ktest: make ktest work with Netlink loaded as a module.Alexander V. Chernikov2023-06-132-1/+3
| | | | MFC after: 2 weeks
* nvme: Switch to nda by defaultWarner Losh2023-06-131-1/+1
| | | | | | | | | We already run nda by default on all the !x86 architectures. Switch the default to nda. nda created nvd compatibility links by default, so this should be a nop. If this causes problems for your application, set hw.nvme.use_nvd=1 in your loader.conf. Sponsored by: Netflix
* amd64/arm64 pmap: Stop requiring the accessed bit for superpage promotionAlan Cox2023-06-123-73/+205
| | | | | | | | | | | | | | | | | | Stop requiring all of the PTEs to have the accessed bit set for superpage promotion to occur. Given that change, add support for promotion to pmap_enter_quick(), which does not set the accessed bit in the PTE that it creates. Since the final mapping within a superpage-aligned and sized region of a memory-mapped file is typically created by a call to pmap_enter_quick(), we now achieve promotions in circumstances where they did not occur before, for example, the X server's read-only mapping of libLLVM-15.so. See also https://www.usenix.org/system/files/atc20-zhu-weixi_0.pdf Reviewed by: kib, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40478
* qatfw: Don't build if WITH_SOURCELESS_UCODE is definedMark Johnston2023-06-121-0/+2
|
* qat: Add Intel® 4xxx Series VF driver supportKrzysztof Zdziarski2023-06-12103-5748/+16507
| | | | | | | | | | | | | | | | | | | | | | | Overview: Intel(R) QuickAssist Technology (Intel(R) QAT) provides hardware acceleration for offloading security, authentication and compression services from the CPU, thus significantly increasing the performance and efficiency of standard platform solutions. This commit introduces: - Intel® 4xxx Series VF driver support. - Device configurability via sysctls. - UIO support for Intel® 4xxx Series devices. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39850
* qat: Stop building on i386Mark Johnston2023-06-121-2/+2
| | | | The driver isn't tested on i386, so don't spend effort compiling it.
* crypto: Advance the correct pointer in crypto_cursor_copydata()Mark Johnston2023-06-121-1/+1
| | | | | | | | PR: 271766 Reported by: Michael Laß <bevan@bi-co.net> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40468
* opencrypto: Handle end-of-cursor conditions in crypto_cursor_segment()Mark Johnston2023-06-121-7/+27
| | | | | | | | | | | | | | | | | | | | | | Some consumers, e.g., swcr_encdec(), may call crypto_cursor_segment() after having advanced the cursor to the end of the buffer. In this case I believe the right behaviour is to return NULL and a length of 0. When this occurs with a CRYPTO_BUF_VMPAGE buffer, the cc_vmpage pointer will point past the end of the page pointer array, so crypto_cursor_segment() ends up dereferencing a random pointer before the function returns a length of 0. The uio-backed cursor has a similar problem. Address this by keeping track of the residual buffer length and returning immediately once the length is zero. PR: 271766 Reported by: Andrew "RhodiumToad" Gierth <andrew@tao11.riddles.org.uk> Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40428
* hwpstate_amd: calculate power if P-state info comes from MSRJohannes Totz2023-06-121-4/+28
| | | | | | Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40140
* uipc_syscalls: removed unnecessary check in accept1() functionDmitriy Alexandrov2023-06-121-7/+5
| | | | | | Signed-off-by: Dmitriy Alexandrov <d06alexandrov@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/773
* fix qcom_cpu_kpssv2 compile on ASUS_AC1300Mina Galić2023-06-121-1/+1
| | | | | | | | | Complete afdb42987ca8 by changing the return type from boolean_t to bool for the definition for qcom_cpu_kpssv2_regulator_start. PR: 271932 Fixes: afdb42987ca82869eeaecf6dc25c2b6fb7b8370e Pull Request: https://github.com/freebsd/freebsd-src/pull/776
* Add more arm64 special register valuesAndrew Turner2023-06-121-0/+16
| | | | | | These will be used to simplify the kernel special register handling. Sponsored by: Arm Ltd
* Revert "linux(4): The futex_wait operation should restart."Dmitry Chagin2023-06-111-0/+2
| | | | | This reverts commit 5eec19c8eb0e1afafd7290325c61611c9a13b621 due to its wrong. Linux interrupts futex syscall on signal and return EINTR.
* LinuxKPI: 802.11: correct HE_MAC_CAP3 valuesBjoern A. Zeeb2023-06-101-8/+7
| | | | | | | | | While we had assigned dummy values so far to HE, correct the HW_MAC_CAP3 values to avoid compile time errors of drivers when shifting values out of range. Sponsored by: The FreeBSD Foundation MFC after: 10 days
* LinuxKPI: qcom: update QMI and MHIBjoern A. Zeeb2023-06-103-4/+12
| | | | | | | Minor updates to QMI and MHI (mostly making arguments const) in order to facilitate porting the next generation athk driver. MFC after: 10 days
* LinuxKPI: add dummy of.hBjoern A. Zeeb2023-06-101-0/+0
| | | | | | | | Given https://reviews.freebsd.org/D34318 was abandoned add an empty of.h dummy header file to at least avoid #include errors and avoid covering those #include with CONFIG_OF. MFC after: 10 days
* LinuxKPI: 802.11: initialize txqBjoern A. Zeeb2023-06-101-0/+5
| | | | | | | | | In 5a9a0d7803382321b5f9fff1deae5fb08463cf1a we omitted the initialization of the per-hw txq settings. Fix this. Sponsored by: The FreeBSD Foundation MFC after: 10 days Fixes: 5a9a0d7803382321b5f9fff1deae5fb08463cf1a
* LinuxKPI: 802.11: improve scan handlingBjoern A. Zeeb2023-06-102-21/+72
| | | | | | | | | | | | | | | | Under certain circumstances a hw_scan may be downgraded to a software scan. Handle these situations better and make sure we free resources in all cases once. [1] Also leave a note about scanning all bands (or we would have to switch bands manually). In both cases hardware doing and driver saying seem not entirely consistent for all and all firmware. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reported by: imp [1]
* zfs: merge openzfs/zfs@feff9dfedMartin Matuska2023-06-1096-1216/+1690
| | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #14833 Update compatibility.d files #14841 ZIL: Reduce scope of per-dataset zl_issuer_lock #14863 zil: Add some more statistics #14866 btree: Implement faster binary search algorithm #14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg #14892 Fix concurrent resilvers initiated at same time #14903 Fix NULL pointer dereference when doing concurrent 'send' operations #14910 ZIL: Allow to replay blocks of any size #14939 Fix the L2ARC write size calculating logic #14934 Introduce zfs_refcount_(add|remove)_few() #14946 Improve l2arc reporting in arc_summary #14953 Finally drop long disabled vdev cache #14954 Fix the L2ARC write size calculating logic (2) #14955 Use list_remove_head() where possible #14959 ZIL: Fix race introduced by f63811f0721 Obtained from: OpenZFS OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb
* mvs: Eliminate unused variable.Warner Losh2023-06-091-3/+1
| | | | | | | ccim is unused. Just remove it. PR: 271920 Sponsored by: Netflix
* LinuxKPI: implement timer_{delete,shutdown}_sync()Bjoern A. Zeeb2023-06-092-0/+16
| | | | | | | | | | Implement timer_{delete,shutdown}_sync(), which do not seem to require anything additional to the already existing del_timer_sync(). Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40124
* kern_ntptime: Fix undefined behavior of the shift operatorDmitriy Alexandrov2023-06-091-1/+7
| | | | | | | | | | | L_LINT macro is used with negative numbers [i.e. L_LINT(time_freq, -MAXFREQ)], it could cause undefined behavior. It should be similar to the L_RSHIFT(v, n) macro. MFC after: 2 weeks Reviewed by: cy Pull Request: https://github.com/freebsd/freebsd-src/pull/769 Signed-off-by: Dmitriy Alexandrov <d06alexandrov@gmail.com>
* Add more arm64 ID registers to the user_regs arrayAndrew Turner2023-06-091-0/+8
| | | | | | | | This is a mapping from ID register value to offset in struct cpu_desc. These registers may be needed with future architecture revisions either by userspace or by bhyve. Sponsored by: Arm Ltd
* nlsysevent: remove useless CFLAGSBaptiste Daroussin2023-06-091-1/+0
|
* veriexec: Do not save error from file info in fingerprint statusStephen J. Kiernan2023-06-091-3/+3
| | | | | | | | We do not want or need to propagate the error from fetching file info when determining the file status. It could cause open(2) and similar calls to fail when trying to access devices. Obtained from: Juniper Networks, Inc.
* tcp: Rack fixes and misc updatesRandall Stewart2023-06-093-90/+389
| | | | | | | | | | | | | | So over the past few weeks we have found several bugs and updated hybrid pacing to have more data in the low-level logging. We have also moved more of the BBlogs to "verbose" mode so that we don't generate a lot of the debug data unless you put verbose/debug on. There were a couple of notable bugs, one being the incorrect passing of percentage for reduction to timely and the other the incorrect use of 20% timely Beta instead of 80%. This also expands a simply idea to be able to pace a cwnd (fillcw) as an alternate pacing mechanism combining that with timely reduction/increase. Reviewed by: tuexen Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D40391
* Regenerate sysent stuff after $FreeBSD$ removalWarner Losh2023-06-0931-31/+0
| | | | Sponsored by: Netflix
* makesyscall: Stop generating $FreeBSD$Warner Losh2023-06-091-14/+8
| | | | | | | | | With 14 coming, we no longer need to generate the $FreeBSD$. We can likely MFC that to 13 as well. MFC After: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39879
* e1000: Format em_txrxKevin Bowling2023-06-091-31/+46
| | | | | | | | No functional changes intended. Reviewed by: markj (prior version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30072
* e1000: Add SPDX tag to em_txrxKevin Bowling2023-06-091-0/+2
| | | | | | Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30072
* linux(4): Preserve fpu xsave state across signal delivery on amd64Dmitry Chagin2023-06-082-5/+114
| | | | | | | PR: 270247 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40444 MFC after: 2 weeks
* linux(4): In preparation for xsave refactor fxsave code on amd64Dmitry Chagin2023-06-082-59/+76
| | | | | | | | | Due to fxsave area is os independent reimplement fxsave handmade code using copying of a whole area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40443 MFC after: 2 weeks
* LinuxKPI: add dummy rhashtable implementationBjoern A. Zeeb2023-06-081-0/+89
| | | | | | | | | | Add a skeleton implementation of rhashtable in order to keep an upcoming wireless driver compiling. We'll implement it as soon as we get there. MFC after: 10 days Reviewed by: emaste (previous version before his suggested changes) Differential Revision: https://reviews.freebsd.org/D40176
* LinuxKPI: add devm_ioremap()Bjoern A. Zeeb2023-06-081-0/+7
| | | | | | | | | | | Given we do not seem to support ioremap() do not support the "devm" version either and simply return NULL, which means we do not have to keep track of the memory to be freed on device free later. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40173
* LinuxKPI: pci: update struct msi_descBjoern A. Zeeb2023-06-082-3/+7
| | | | | | | | | | | It seems struct msi_desc is setup differently (or was changed) compared to how we added it a while ago. Catch up in order to keep drivers directly accessing fields compiling. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40175
* LinuxKPI: pci: add PCI_COMMAND_MEMORYBjoern A. Zeeb2023-06-081-0/+1
| | | | | | | | Add another PCI alias to our native defines for a wireless driver. MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40247
* LinuxKPI: add struct_group(...)Bjoern A. Zeeb2023-06-081-0/+6
| | | | | | | | | Add a struct_group() macro needed by a wireless driver. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40138
* LinuxKPI: add ktime_get_real_ts64()Bjoern A. Zeeb2023-06-081-0/+1
| | | | | | | | Add a wrapper for ktime_get_real_ts64() used by a wireless driver. MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40246
* kern: Move devctl_systems[] out of sys/sys/devctl.hEd Maste2023-06-082-23/+23
| | | | | | | | The amd64-gcc12 build was failing with `error: 'devctl_systems' defined but not used`. Just move it to the C file where it's used. PR: 271903 Sponsored by: The FreeBSD Foundation
* arm64: Malloc the cpu_desc arrayAndrew Turner2023-06-083-5/+42
| | | | | | | | | We only need this during boot. Allocate the array before starting CPUs to reduce the memory usage. Reviewed by: Zach Leaf <zachary.leaf@arm.com> Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40433
* arm64: Reduce the direct use of cpu_descAndrew Turner2023-06-081-83/+96
| | | | | | | | | | To help moving to a dynamically allocated cpu_desc array reduce the places we use it directly and create a pointer that is passed in to functions that read it. Reviewed by: Zach Leaf <zachary.leaf@arm.com> Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40392
* ptrace: Clear TDB_BORN during PT_DETACH.John Baldwin2023-06-073-3/+3
| | | | | | | | | | | | | | | | If a debugger detaches from a process that has a new thread that has not yet executed, the new thread will raise a SIGTRAP signal to report it's thread birth event even after the detach. With the debugger detached, this results in a SIGTRAP sent to the process and typically a core dump. Fix this by clearing TDB_BORN from any new threads during detach. Bump __FreeBSD_version for debuggers to notice when the fix is present. Reported by: GDB's testsuite Reviewed by: kib, markj (previous version) Differential Revision: https://reviews.freebsd.org/D39856
* ipmi: add Block Transfer interface supportAndrey V. Elsukov2023-06-079-33/+353
| | | | | | | | Reviewed by: ambrisko Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D40421
* arm64 Hyper-V: enable Hyper-V SMP for ARM64Wei Hu2023-06-071-22/+6
| | | | | | | | | | | | | | | | | | Vmbus_synic_setup() is invoked via vmbus_intrhook -> vmbus_doattach -> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't functional in intrhooks and smp_rendezvous() will just call vmbus_synic_setup() on the boot processor. There's nothing that will initialize the pcpu data on every other AP. To fix it we need to use SI_SUB_SMP for vmbus_doattach(). With this patch the vmbus interrupt should work on all arm64 cpus on HyperV. Reported by: kevans Reviewed by: kevans, whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Obtained from: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D40279