]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 months agolinuxkpi: Define `debugfs_initialized()`
Jean-Sébastien Pédron [Tue, 14 Feb 2023 23:38:59 +0000 (00:38 +0100)]
linuxkpi: Define `debugfs_initialized()`

It always return true on FreeBSD, at least for now, because all DRM
drivers using it depend on lindebugfs.

Reviewed by: manu
Approved by: manu

16 months agocxgbe: Don't leak memory resource if t4iov attach fails.
John Baldwin [Wed, 15 Feb 2023 21:34:00 +0000 (13:34 -0800)]
cxgbe: Don't leak memory resource if t4iov attach fails.

Co-authored by: np
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D38580

16 months agoaio: Fix more synchronization issues in aio_biowakeup.
John Baldwin [Wed, 15 Feb 2023 21:32:52 +0000 (13:32 -0800)]
aio: Fix more synchronization issues in aio_biowakeup.

- Use atomic_store to set job->error.  atomic_set does an or
  operation, not assignment.

- Use refcount_* to manage job->nbio.

  This ensures proper memory barriers are present so that the last bio
  won't see a possibly stale value of job->error.

- Don't re-read job->error after reading it via atomic_load.

Reported by: markj (1)
Reviewed by: mjg, markj
Differential Revision: https://reviews.freebsd.org/D38611

16 months agonproc: denote an incompatiblity with Linux
Mateusz Guzik [Wed, 15 Feb 2023 20:17:27 +0000 (20:17 +0000)]
nproc: denote an incompatiblity with Linux

On Linux _NPROCESSORS_CONF reports CPU threads disabled by the kernel,
while it does not on FreeBSD.

Flip _NPROCESSORS_ONLN to _NPROCESSORS_CONF. While it keeps reporting
the same value, it will automagically unbreak should someone change the
above.

16 months agonetlink: use ifmedia to provide vlan interface operstate.
Alexander V. Chernikov [Wed, 15 Feb 2023 20:22:47 +0000 (20:22 +0000)]
netlink: use ifmedia to provide vlan interface operstate.

Netlink customers rely on admin and operational state when
 working with interfaces. The current implementation retuns
 "unknown" operstate for all interface types except IFT_ETHER
 and IFT_LOOP.

This change updates the code to fetch vlan operstate in the same way
 as for the ether interfaces. For the rest of the interface types,
 operstate is now mapped to the admin state.

Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days

16 months agoprofil(2): profil(II) was in the v3 sources
Warner Losh [Wed, 4 Jan 2023 16:41:16 +0000 (09:41 -0700)]
profil(2): profil(II) was in the v3 sources

profil(II) is in the scanned 3rd edition manual that we have. We don't
have the 3rd edition sources, nor do we have the 4th edition souces. We
have a mostly complete (missing pipes) 4th edition C rewrite where
profil system call number is reserved, but it's not implemented (it's in
the manx section for things that apeared to have been in 3rd edition but
weren't yet part of the reimplemented 4th edition). The 5th edition
sources we have do have it, however. For other items that have appeared
in earlier manuals, we've added the simple verbage to the manual and
relegated the rest of the data for that file to the commit message.

16 months agoaio_biowakeup: Various style fixes.
John Baldwin [Wed, 15 Feb 2023 18:57:08 +0000 (10:57 -0800)]
aio_biowakeup: Various style fixes.

16 months agoaio: Fix a test and set race in aio_biowakeup.
Keith Reynolds [Wed, 15 Feb 2023 18:56:39 +0000 (10:56 -0800)]
aio: Fix a test and set race in aio_biowakeup.

Use atomic_fetchadd in place of separate atomic_subtract / atomic_load.

Reviewed by: markj
Sponsored by: HPE TidalScale
Differential Revision: https://reviews.freebsd.org/D38559

16 months agoinpcb: use family specific sockaddr argument for bind functions
Gleb Smirnoff [Wed, 15 Feb 2023 18:30:16 +0000 (10:30 -0800)]
inpcb: use family specific sockaddr argument for bind functions

Do the cast from sockaddr to either IPv4 or IPv6 sockaddr in the
protocol's pr_bind method and from there on go down the call
stack with family specific argument.

Reviewed by: zlei, melifaro, markj
Differential Revision: https://reviews.freebsd.org/D38601

17 months agoMechanically convert mlx5en(4) to IfAPI
Justin Hibbits [Mon, 19 Sep 2022 20:58:00 +0000 (16:58 -0400)]
Mechanically convert mlx5en(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38595

17 months agokrpc: Add macros so that rpc.tlsservd can run in vnet prison
Rick Macklem [Wed, 15 Feb 2023 13:58:21 +0000 (05:58 -0800)]
krpc: Add macros so that rpc.tlsservd can run in vnet prison

Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
This patch adds similar macros named KRPC_VNETxxx so that
the rpc.tlsservd(8) daemon can run in a vnet prison, once the
macros front end the vnet ones.  For now, they are null macros.

MFC after: 3 months

17 months agoDrop space in "vm object" lock name to improve wchan
Ed Maste [Wed, 15 Feb 2023 13:31:17 +0000 (08:31 -0500)]
Drop space in "vm object" lock name to improve wchan

Lock names are shown in top as a `*` followed by the first five
characters of the name.  `*vmobj` a little more obvious and easier to
search for than `*vm ob`.

Differential Revision: https://reviews.freebsd.org/D36264

17 months agoAdd an example using /etc/rc.conf syntax
Poul-Henning Kamp [Wed, 15 Feb 2023 11:39:15 +0000 (11:39 +0000)]
Add an example using /etc/rc.conf syntax

17 months agocpuset: Add compat shim to the sched_affinity functions
Dmitry Chagin [Wed, 15 Feb 2023 09:23:15 +0000 (12:23 +0300)]
cpuset: Add compat shim to the sched_affinity functions

To allow to run a newer world on a pre-1400079 kernel a compat shims to
the sched_affinity functions has beed added.

Reported by: antoine
Tested by: antoine
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D38555
MFC after: 3 days

17 months agousb: Remove unused member in struct mos_softc
Zhenlei Huang [Wed, 15 Feb 2023 05:07:19 +0000 (13:07 +0800)]
usb: Remove unused member in struct mos_softc

Spotted by jhibbits in D37812.

Reviewed by: #network, glebius
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38581

17 months agotarfs: Don't panic if the parent of a new node is not a directory.
Dag-Erling Smørgrav [Wed, 15 Feb 2023 02:12:45 +0000 (02:12 +0000)]
tarfs: Don't panic if the parent of a new node is not a directory.

PR: 269519
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D38587

17 months agotmpfs: remove IFF macro
Konstantin Belousov [Mon, 13 Feb 2023 23:47:44 +0000 (01:47 +0200)]
tmpfs: remove IFF macro

Requested by: mjg
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38576

17 months agotmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts
Konstantin Belousov [Mon, 13 Feb 2023 23:23:24 +0000 (01:23 +0200)]
tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts

VOP_ISLOCKED() does not return bool, its only reliable use it to check
that the vnode is exclusively locked by the calling thread.  Almost all
asserts of this form repeated auto-generated assertions from
vnode_if.src for VOPs, in the incorrect way.

In two places where the assertions would be meaningful, convert them to
ASSERT_VOP_LOCKED() statements.

Reviewed by: markj, mjg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38576

17 months agosys/param.h: Add _WANT_P_OSREL
Konstantin Belousov [Tue, 14 Feb 2023 08:52:14 +0000 (10:52 +0200)]
sys/param.h: Add _WANT_P_OSREL

Use it instead of defining IN_RTLD by base sources that want P_OSREL_
defines in userspace, but are not rtld.
This allows to remove abuse of IN_RTLD from userspace.

Reviewed by: dchagin, markj, imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38585

17 months agolinuxkpi: Move `IS_ENABLED()` and friends to <linux/kconfig.h>
Jean-Sébastien Pédron [Mon, 13 Feb 2023 20:52:08 +0000 (21:52 +0100)]
linuxkpi: Move `IS_ENABLED()` and friends to <linux/kconfig.h>

The header is included in <linux/xarray.h> like it is on Linux. Some DRM
code depends on this header "pollution".

Reviewed by: bz
Approved by: bz
Differential Revision: https://reviews.freebsd.org/D38567

17 months agowc: Clean up and modernize.
Dag-Erling Smørgrav [Tue, 14 Feb 2023 22:26:34 +0000 (22:26 +0000)]
wc: Clean up and modernize.

* Drop <err.h>, which is unnecessary since we use libxo.

* As per POSIX, report an error if output fails.

* Fix some type mismatches.

* Use bool instead of int where appropriate.

* Avoid repeatedly checking for a null filename.

* Miscellaneous other tidying.

* Add tests (partly derived from work performed by SHENG-YI HONG <i19780219111@kimo.com>).

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D38496

17 months agolinuxkpi: Add <linux/cc_platform.h>
Jean-Sébastien Pédron [Tue, 14 Feb 2023 21:44:21 +0000 (22:44 +0100)]
linuxkpi: Add <linux/cc_platform.h>

It defines the `cc_platform_has()` function.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38596

17 months agolinuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16
Jean-Sébastien Pédron [Mon, 13 Feb 2023 22:22:54 +0000 (23:22 +0100)]
linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16

It gains new `struct ww_acquire_ctx *` argument we don't use currently.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38568

17 months agolinuxkpi: Declare `struct fwnode_handle` in <linux/fwnode.h>
Jean-Sébastien Pédron [Mon, 13 Feb 2023 20:51:00 +0000 (21:51 +0100)]
linuxkpi: Declare `struct fwnode_handle` in <linux/fwnode.h>

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38566

17 months agolinuxkpi: Add `synchronize_shrinkers()`
Jean-Sébastien Pédron [Mon, 13 Feb 2023 20:49:28 +0000 (21:49 +0100)]
linuxkpi: Add `synchronize_shrinkers()`

It takes the lock and release it immediately to make sure no shrinkers
are running in parallel.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38565

17 months agolinuxkpi: Define `totalram_pages()`
Jean-Sébastien Pédron [Wed, 8 Feb 2023 17:52:43 +0000 (18:52 +0100)]
linuxkpi: Define `totalram_pages()`

It returns `physmem`.

`__FreeBSD_version` is bumped to 1400080. We need that to remove a copy
of this function in the i915 DRM driver, maintained outside of base.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38531

17 months agolinuxkpi: Accept NULL as a value in `linux_xarray`
Jean-Sébastien Pédron [Sat, 11 Feb 2023 10:12:08 +0000 (11:12 +0100)]
linuxkpi: Accept NULL as a value in `linux_xarray`

Linux' XArray allows to store a NULL pointer as a value. `xa_load()`
would return NULL for both an unused index and an index set to NULL. But
it impacts `xa_alloc()` which needs to find the next available index.

However, our implementation relies on a radix tree (see `linux_radix.c`)
which does not accept NULL pointers as values. I'm not sure if this is a
limitation or a feature, so to work around this, a NULL value is
replaced by `NULL_VALUE`, an unlikely address, when we pass it to
linux_radix.

Reviewed by: emaste, manu
Approved by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D38543

17 months agokrpc: Remove VNET_NFSD #ifdefs
Rick Macklem [Tue, 14 Feb 2023 21:53:39 +0000 (13:53 -0800)]
krpc: Remove VNET_NFSD #ifdefs

The consensus is that the VNET_NFSD kernel option is not
needed, so this commit removes its use from the kernel RPC.

MFC after: 3 months

17 months agonfsd: Continue adding macros so nfsd can run in a vnet prison
Rick Macklem [Tue, 14 Feb 2023 21:33:35 +0000 (13:33 -0800)]
nfsd: Continue adding macros so nfsd can run in a vnet prison

Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
This patch adds some more, to allow the nfsuserd(8) daemon to
run in vnet prison, once the macros map to vnet ones.
This is the last commit for NFSD_VNET_xxx macros, but there are
still some for KRPC_VNET_xxx and KGSS_VNET_xx to allow the
rpc.tlsservd(8) and gssd(8) daemons to run in a vnet prison.

MFC after: 3 months

17 months agofusefs: fix some resource leaks
Alan Somers [Sat, 11 Feb 2023 23:43:30 +0000 (16:43 -0700)]
fusefs: fix some resource leaks

fusefs would leak tickets in three cases:
* After FUSE_CREATE, if the server returned a bad inode number.
* After a FUSE_FALLOCATE operation during VOP_ALLOCATE
* After a FUSE_FALLOCATE operation during VOP_DEALLOCATE

MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38526

17 months agoCirrus-CI: use makefs if root size exceeds QEMU's virtual FAT limit
Ed Maste [Mon, 13 Feb 2023 17:39:39 +0000 (12:39 -0500)]
Cirrus-CI: use makefs if root size exceeds QEMU's virtual FAT limit

We use QEMU's virtual FAT support to avoid having to create a disk
image because it is much faster, but it has a limit of about 500MB.
Artifacts produced by the GCC 12 CI job exceeded this size.

Add support for creating a FAT partition image and MBR-partitioned disk
image and use it when the file system is too large for QEMU.

In one run the Cirrus-CI LLVM test task took 1m33s using QEMU's virtual
FAT while the GCC task took 6m48s using makefs+mkimg.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38589

17 months agointrng: track counter allocation with a bitmap
Mitchell Horne [Tue, 14 Feb 2023 18:02:12 +0000 (14:02 -0400)]
intrng: track counter allocation with a bitmap

Crucially, this allows releasing counters, and interrupt sources by
extension. Where before we were incrementing intrcnt_index with atomics,
now we protect the bitmap using the existing isrc_table_lock mutex.

Reviewed by: mmel
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38437

17 months agointrng: sort includes
Mitchell Horne [Sat, 4 Feb 2023 17:04:30 +0000 (13:04 -0400)]
intrng: sort includes

MFC after: 3 days

17 months agopfil: add pfil_mem_{in,out}() and retire pfil_run_hooks()
Gleb Smirnoff [Tue, 14 Feb 2023 18:02:49 +0000 (10:02 -0800)]
pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks()

The 0b70e3e78b0 changed the original design of a single entry point
into pfil(9) chains providing separate functions for the filtering
points that always provide mbufs and know the direction of a flow.
The motivation was to reduce branching.  The logical continuation
would be to do the same for the filtering points that always provide
a memory pointer and retire the single entry point.

o Hooks now provide two functions: one for mbufs and optional for
  memory pointers.
o pfil_hook_args() has a new member and pfil_add_hook() has a
  requirement to zero out uninitialized data. Bump PFIL_VERSION.
o As it was before, a hook function for a memory pointer may realloc
  into an mbuf.  Such mbuf would be returned via a pointer that must
  be provided in argument.
o The only hook that supports memory pointers is ipfw:default-link.
  It is rewritten to provide two functions.
o All remaining uses of pfil_run_hooks() are converted to
  pfil_mem_in().
o Transparent union of pfil_packet_t and tricks to fix pointer
  alignment are retired. Internal pfil_realloc() reduces down to
  m_devget() and thus is retired, too.

Reviewed by: mjg, ocochard
Differential revision: https://reviews.freebsd.org/D37977

17 months agonet: use pfil_mbuf_{in,out} where we always have an mbuf
Gleb Smirnoff [Tue, 14 Feb 2023 18:02:49 +0000 (10:02 -0800)]
net: use pfil_mbuf_{in,out} where we always have an mbuf

This finalizes what has been started in 0b70e3e78b0.

Reviewed by: kp, mjg
Differential revision: https://reviews.freebsd.org/D37976

17 months agosys/_endian.h: Move powerpc workaround into _endian.h
Warner Losh [Tue, 14 Feb 2023 17:48:05 +0000 (10:48 -0700)]
sys/_endian.h: Move powerpc workaround into _endian.h

Powerpc compilers often define _BIG_ENDIAN or _LITTLE_ENDIAN depending
on the byte order of the target. This interfers with the endian.h and
sys/endian.h APIs which expect those two to be 4321 or 1234.
Unconditionally undefine these two before we define them to work around
this issue. By including endian.h, the programmer is saying they want
this API not the native one. This matches historic practice as well.

Fixes: e35448a901aa
Sponsored by: Netflix
Noticed by: powerpc, powerpc64 CI jobs

17 months agoatkbd: correct bogus character in #ifdef
Ed Maste [Tue, 14 Feb 2023 16:54:12 +0000 (11:54 -0500)]
atkbd: correct bogus character in #ifdef

Fixes: f20058955c9d ("sys/kbio.h: make pre-unicode keymap...")
Sponsored by: The FreeBSD Foundation

17 months agobsd.cpu.mk: Simplify armv[67] support
Warner Losh [Tue, 14 Feb 2023 16:49:26 +0000 (09:49 -0700)]
bsd.cpu.mk: Simplify armv[67] support

Drop a clause that's no longer relevant to v4/v5. Drop support for
softfloat for v[45]. Simplify soft float expression by assuming we're
always either armv6 or armv7.

Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38584

17 months agoarmv5: Remove dead code
Warner Losh [Tue, 14 Feb 2023 16:49:00 +0000 (09:49 -0700)]
armv5: Remove dead code

No need to mark anything as broken on armv5 anymore.

Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38583

17 months agolibc: Simplify soft-float on 32-bit arm
Warner Losh [Tue, 14 Feb 2023 16:48:51 +0000 (09:48 -0700)]
libc: Simplify soft-float on 32-bit arm

Simplify the tests for 32-bit arm soft float support. For the files
included only on arm, drop the test entirely. For others, test
MACHINE_CPUARCH against arm.

No functional change intended. File lists appear the same before / after
the change.

Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38582

17 months agoarm: Remove armv5 supprt
Warner Losh [Tue, 14 Feb 2023 16:48:37 +0000 (09:48 -0700)]
arm: Remove armv5 supprt

This can only be true on armv5, so we can GC it.

Sponsored by: Netflix
Reviewed by: fuz@fuz.su, brooks, emaste
Differential Revision: https://reviews.freebsd.org/D38563

17 months agopowerpc: Drop old workaround for old gcc
Warner Losh [Tue, 14 Feb 2023 16:47:08 +0000 (09:47 -0700)]
powerpc: Drop old workaround for old gcc

Very old versions of gcc defined _BIG_ENDIAN and _LITTLE_ENDIAN. So to
work around that, we undefined them here. However, that causes problems
for programs that do:

(and many other variations on that theme). Since this often is the
result of weirdly nested includes in the ports world that are hard to
unwind, drop this workaround to help more ports build out of the box.
If there's still an issue here (and my testing hasn't shown it), we'll
fix the issue in a brand-new way once I have a reproducer.

This fixes the mesa-devel build, and others

Sponsored by: Netflix
Tested by: pkubaj
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D38564

17 months agoPort Linuxulator to IfAPI
Justin Hibbits [Wed, 1 Feb 2023 21:30:22 +0000 (16:30 -0500)]
Port Linuxulator to IfAPI

Reviewed by: dchagin
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38349

17 months agoFinish mechanical conversion of axgbe(4) to IfAPI.
Justin Hibbits [Tue, 7 Feb 2023 18:40:06 +0000 (13:40 -0500)]
Finish mechanical conversion of axgbe(4) to IfAPI.

Sponsored by: Juniper Networks, Inc.

17 months agoIfAPI: Style cleanup
Justin Hibbits [Fri, 10 Feb 2023 21:33:30 +0000 (16:33 -0500)]
IfAPI: Style cleanup

Summary:
Clean up style issues from IfAPI additions.

Casts to (struct ifnet *) made sense when `if_t` was a `void *`, but
since it's a `struct ifnet *` it no longer makes sense.  Fix whitespace
errors, among others.

Reviewed by: kib, glebius
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38499

17 months agoIfAPI: Add capabilities2/capenable2 accessors
Justin Hibbits [Fri, 10 Feb 2023 15:45:44 +0000 (10:45 -0500)]
IfAPI: Add capabilities2/capenable2 accessors

Summary:
As a stopgap measure add basic accessors for the if_capabilities2 and
if_capenable2 members to further hide the ifnet details.

Sponsored by: Juniper Networks, Inc.
Reviewed by: glebius, kib
Differential Revision: https://reviews.freebsd.org/D38487

17 months agoIfAPI: More accessors
Justin Hibbits [Fri, 10 Feb 2023 15:53:19 +0000 (10:53 -0500)]
IfAPI: More accessors

Summary:
Add the following accessors needed by infiniband drivers:
* if_getaddrlen()
* if_setbroadcastaddr()
* if_resolvemulti()

With these accessors, and additional changes on the drivers' side, an
amd64 kernel can be compiled with `struct ifnet` completely hidden.

Reviewed by: melifaro
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38488

17 months agoIfAPI: Finish changes of ice(4).
Justin Hibbits [Mon, 23 Jan 2023 15:42:13 +0000 (10:42 -0500)]
IfAPI: Finish changes of ice(4).

Reviewed by: erj
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38423

17 months agoMechanically convert netmap(4) to IfAPI
Justin Hibbits [Thu, 12 Jan 2023 18:38:37 +0000 (13:38 -0500)]
Mechanically convert netmap(4) to IfAPI

Reviewed by: vmaffione, zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37814

17 months agomlx4: Finish conversion to IfAPI
Justin Hibbits [Thu, 9 Feb 2023 02:36:11 +0000 (21:36 -0500)]
mlx4: Finish conversion to IfAPI

Fix a few stragglers found with further IfAPI work.

Sponsored by: Juniper Networks, Inc.

17 months agoetherswitch: Fix leftovers from IfAPI conversion
Justin Hibbits [Fri, 10 Feb 2023 14:57:29 +0000 (09:57 -0500)]
etherswitch: Fix leftovers from IfAPI conversion

Sponsored by: Juniper Networks, Inc.

17 months agotcp: Disallow re-connection of a connected socket
Mark Johnston [Tue, 14 Feb 2023 14:27:47 +0000 (09:27 -0500)]
tcp: Disallow re-connection of a connected socket

soconnectat() tries to ensure that one cannot connect a connected
socket.  However, the check is racy and does not really prevent two
threads from attempting to connect the same TCP socket.

Modify tcp_connect() and tcp6_connect() to perform the check again, this
time synchronized by the inpcb lock, under which we call
soisconnecting().

Reported by: syzkaller
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D38507

17 months agolinux(4): Trim unused opt_usb.h from modules Makefiles
Dmitry Chagin [Tue, 14 Feb 2023 14:46:33 +0000 (17:46 +0300)]
linux(4): Trim unused opt_usb.h from modules Makefiles

MFC after: 2 weeks

17 months agolinux(4): Rename linux_timer.h to linux_time.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:33 +0000 (17:46 +0300)]
linux(4): Rename linux_timer.h to linux_time.h

To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c contains implementation of all stuff declared
in linux_time.h.

MFC after: 2 weeks

17 months agolinux(4): Cleanup includes under arm64/linux
Dmitry Chagin [Tue, 14 Feb 2023 14:46:33 +0000 (17:46 +0300)]
linux(4): Cleanup includes under arm64/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks

17 months agolinux(4): Cleanup includes under x86/linux
Dmitry Chagin [Tue, 14 Feb 2023 14:46:33 +0000 (17:46 +0300)]
linux(4): Cleanup includes under x86/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks

17 months agolinux(4): Cleanup includes under amd64/linux
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Cleanup includes under amd64/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks

17 months agolinux(4): Cleanup includes under i386/linux
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Cleanup includes under i386/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks

17 months agolinux(4): Cleanup includes under compat/linux
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Cleanup includes under compat/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks

17 months agolinux(4): Cleanup sys/sysctl.h from linux_misc.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Cleanup sys/sysctl.h from linux_misc.h

Leftover after c5156c77 (r374538).

MFC after: 2 weeks

17 months agolinux(4): Fix brackets of local include opt_inet6
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Fix brackets of local include opt_inet6

MFC after: 2 weeks

17 months agolinux(4): Move use_real_names knob to the linux.c
Dmitry Chagin [Tue, 14 Feb 2023 14:46:32 +0000 (17:46 +0300)]
linux(4): Move use_real_names knob to the linux.c

MI linux.[c|h] are the module independent in terms of the Linux emulation
layer (ie, intended for both ISA - 32 & 64 bit), analogue of MD linux.h.
There must be a code here that cannot be placed into the corresponding by
common sense MI source and header files, i.e., code is machine independent,
but ISA dependent.
For the use_real_names knob, the code must be placed into the
linux_socket.[c|h], however linux_socket is ISA dependent.

MFC after: 2 weeks

17 months agolinux(4): Cleanup sys/uio.h where linux_uitl.h is included
Dmitry Chagin [Tue, 14 Feb 2023 14:46:31 +0000 (17:46 +0300)]
linux(4): Cleanup sys/uio.h where linux_uitl.h is included

MFC after: 2 weeks

17 months agolinux(4): Move uselib() to i386
Dmitry Chagin [Tue, 14 Feb 2023 14:46:31 +0000 (17:46 +0300)]
linux(4): Move uselib() to i386

This obsolete system call is not supported by glibc. In ancient libc
versions (before glibc 2.0), uselib() was used to load the shared
libraries with names found in an array of names in the binary.
On Linux, since 3.15, this system call is available only when
the kernel is configured with the CONFIG_USELIB option.

It doesn't look like anyone needs this syscall for others Linuxulators,
so move it to the corresponding MD Linuxulator.

MFC after: 2 weeks

17 months agolinux(4): Cleanup abi_compat.h include from linux_timer.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:31 +0000 (17:46 +0300)]
linux(4): Cleanup abi_compat.h include from linux_timer.h

Leftover after timespec copyin/copyout routines was implemented.

MFC after: 2 weeks

17 months agolinux(4): Cleanup sys/queue.h from linux.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:31 +0000 (17:46 +0300)]
linux(4): Cleanup sys/queue.h from linux.h

Leftover after converting futexes to the umtx API.

NFC after: 2 weeks

17 months agolinux(4): Cleanup sys/sysent.h from linux_util
Dmitry Chagin [Tue, 14 Feb 2023 14:46:31 +0000 (17:46 +0300)]
linux(4): Cleanup sys/sysent.h from linux_util

Include sys/sysent.h directly where it needed. The linux_util.h included
in a most source files of the Linuxulator, avoid collecting a rarely used
includes here.

MFC after: 2 weeks

17 months agolinux(4): Cleanup vm includes from linux_util.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:30 +0000 (17:46 +0300)]
linux(4): Cleanup vm includes from linux_util.h

Include vm headers directly where they needed. The linux_util.h included
in a most source files of the Linuxulator, avoid collecting a rarely used
includes here.

MFC after: 2 weeks

17 months agolinux(4): Cleanup unneeded includes from linux_util.h
Dmitry Chagin [Tue, 14 Feb 2023 14:46:30 +0000 (17:46 +0300)]
linux(4): Cleanup unneeded includes from linux_util.h

MFC after: 2 weeks

17 months agosys/kbio.h: make pre-unicode keymap support optional
Stefan Eßer [Tue, 14 Feb 2023 13:03:28 +0000 (14:03 +0100)]
sys/kbio.h: make pre-unicode keymap support optional

FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.

This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.

New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.

This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.

The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).

This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.

Approved by: imp
Differential Revision: https://reviews.freebsd.org/D38465

17 months agokbdcontrol: enable pre-Unicode dead key table compatibility
Stefan Eßer [Tue, 14 Feb 2023 12:49:06 +0000 (13:49 +0100)]
kbdcontrol: enable pre-Unicode dead key table compatibility

The definition of pre-Unicode keymap ioctls will be made optional and
dependent on COMPAT_FREEBSD13 in a follow-up commit to 14-CURRENT.

While we generally provide ABI compatibility for older binaries on
a new kernel, but not functionally extended userland programs on an
old kernel, it has been specifically requested to preserve ABI
compatibility for the kbdcontrol program for both these cases.

Passing the kernel configuration option COMPAT_FREEBSD13 to the build
of kbdcontrol will make ioctls visible to the build that are normally
hidden, but required to implement compatibility with kernels that only
support 8 bit characters in dead key maps.

This commit is not to be merged to any previous FreeBSD version and
it shall be reverted as soon as this type of ABI compatibility is no
longer deemed necessary (probably before 14-STABLE is branched).

This commit is a part of review D38465 and split off to allow it to be
reverted using the commit ID.

17 months agokbdcontrol.c: make pre-Unicode compatibility conditional
Stefan Eßer [Tue, 14 Feb 2023 12:27:27 +0000 (13:27 +0100)]
kbdcontrol.c: make pre-Unicode compatibility conditional

Support for the full range of Unicode character codes has been added
to the main keymap back in 2009, with compatibility shims added in
2011 (to support an older kbdcontrol command on a new kernel during
an upgrade from FreeBSD-8 to FreeBSD-9).

Unicode support for accented characters that are reached via dead key
combinations has been added just recently, again with compatibility
shims to allow all combinations of old/new kernel and old/new
kbdcontrol command to load and display the keymaps including the dead
key table. (But full Unicode in the dead key table requires both a new
kernel and kbdcontrol command.)

This commit makes the compatibility shims depend on the respective
compatibility ioctls (OGIO_KEYMAP, OPIO_KEYMAP, OGIO_DEADKEYMAP, and
OPIO_DEADKEYMAP) being defined in sys/kbio.h. This is true for all of
them in 13-STABLE, none in 12-STABLE (as of now), and will become
optional due to a follow-up commit to sys/kbio.h in -CURRENT.

This commit is the only part of review D38465 that should be merged
back to 12-STABLE and 13-STABLE.

MFC after: 1 month

17 months agostress2: Add UFS+SU test scenario
Peter Holm [Tue, 14 Feb 2023 10:48:18 +0000 (11:48 +0100)]
stress2: Add UFS+SU test scenario

17 months agostress2: Add a regression test for D38549
Peter Holm [Tue, 14 Feb 2023 08:44:58 +0000 (09:44 +0100)]
stress2: Add a regression test for D38549

17 months agobhyve: add emulation for qemu's fwcfg data port
Corvin Köhne [Wed, 11 Aug 2021 08:00:34 +0000 (10:00 +0200)]
bhyve: add emulation for qemu's fwcfg data port

The data port returns the data of the fwcfg item.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38333

17 months agobhyve: add emulation for the qemu fwcfg selector port
Corvin Köhne [Wed, 11 Aug 2021 07:59:16 +0000 (09:59 +0200)]
bhyve: add emulation for the qemu fwcfg selector port

The selector port is used to select the desired fwcfg item.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38332

17 months agobhyve: add basic qemu fwcfg implementation
Corvin Köhne [Wed, 11 Aug 2021 07:58:15 +0000 (09:58 +0200)]
bhyve: add basic qemu fwcfg implementation

qemu's fwcfg and bhyve's fwctl are both used to configure ovmf. qemu's
fwcfg is much more powerfull than bhyve's fwctl. For that reason, add
support for qemu's fwcfg.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38331

17 months agobhyve: maintain a list of acpi devices
Corvin Köhne [Thu, 7 Oct 2021 14:14:31 +0000 (16:14 +0200)]
bhyve: maintain a list of acpi devices

The list is used to generate the dsdt entry for every acpi device.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D3830

17 months agobhyve: add helper func to write a dsdt entry
Corvin Köhne [Thu, 7 Oct 2021 13:58:27 +0000 (15:58 +0200)]
bhyve: add helper func to write a dsdt entry

The guest will check the dsdt to detect acpi devices. Therefore, add a
helper function to create such a dsdt entry for an acpi device.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38329

17 months agobhyve: add helper func to add acpi resources
Corvin Köhne [Thu, 7 Oct 2021 13:57:01 +0000 (15:57 +0200)]
bhyve: add helper func to add acpi resources

These helper function can be used to assign acpi resources to an
acpi_device.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38328

17 months agobhyve: add helper struct for acpi device handling
Corvin Köhne [Thu, 7 Oct 2021 13:54:46 +0000 (15:54 +0200)]
bhyve: add helper struct for acpi device handling

To simplify the handling of different acpi devices like qemu fwcfg or a
tpm, add a helper struct. It will handle the reporting of acpi
resources.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38327

17 months agoice(4): Update to 1.37.7-k
Piotr Kubaj [Tue, 14 Feb 2023 01:29:44 +0000 (17:29 -0800)]
ice(4): Update to 1.37.7-k

Notable changes include:

- DSCP QoS Support (leveraging support added in
  rG9c950139051298831ce19d01ea5fb33ec6ea7f89)
- Improved PFC handling and TC queue assignments (now all remaining
  queues are assigned to TC 0 when more than one TC is enabled and the
  number of available queues does not evenly divide between them)
- Support for dumping the internal FW state for additional debugging by
  Intel support
- Support for allowing "No FEC" to be a valid state for the LESM to
  negotiate when using non-standard compliant modules

Also includes various bug fixes and smaller enhancements, too.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Tested by: Jeff Pieper <jeffrey.pieper@intel.com>
MFC after: 3 days
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38109

17 months agotmpfs_rename(): use tmpfs_access_locked instead of VOP_ACCESS()
Konstantin Belousov [Sun, 12 Feb 2023 23:20:25 +0000 (01:20 +0200)]
tmpfs_rename(): use tmpfs_access_locked instead of VOP_ACCESS()

Protect the call with the node lock. We cannot lock the fvp vnode
sleepable there, because we already own other participating vnode's
locks. Taking it without sleeping require unwinding the whole locking
state in one more place.

Note that the liveness of the node is guaranteed by the lock on the
parent directory vnode.

Reported and tested by: pho
Fixes: cbac1f3464956185cf95955344b6009e2cc3ae40ESC
Reviewed by: markj, mjg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38557

17 months agoExtract tmpfs-specific part of tmpfs_access() into a helper
Konstantin Belousov [Sun, 12 Feb 2023 22:25:25 +0000 (00:25 +0200)]
Extract tmpfs-specific part of tmpfs_access() into a helper

The helper tmpfs_access_locked() requires either the vnode or node
locked for consistency of the access check, unlike the pure vnode op.

Reviewed by: markj, mjg
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38557

17 months agotmpfs_access(): style fixes and remove redundand assertions
Konstantin Belousov [Sun, 12 Feb 2023 22:15:00 +0000 (00:15 +0200)]
tmpfs_access(): style fixes and remove redundand assertions

Note that MPASS(VOP_ISLOCKED(vp)) is simply broken.

Reviewed by: markj, mjg
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38557

17 months agonfsd: Continue adding macros so nfsd can run in a vnet prison
Rick Macklem [Mon, 13 Feb 2023 23:07:17 +0000 (15:07 -0800)]
nfsd: Continue adding macros so nfsd can run in a vnet prison

Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
This patch adds some more of them and also a lot of uses of
nfsstatsv1_p instead of nfsstatsv1. nfsstatsv1_p points to
nfsstatsv1 for prison0, but will point to a malloc'd structure
for other prisons.

It also puts nfsstatsv1_p in nfscommon.ko instead of nfsd.ko.

MFC after: 3 months

17 months agomsdosfs deextend: validate pages of the partial buffer
Konstantin Belousov [Sat, 11 Feb 2023 18:09:30 +0000 (20:09 +0200)]
msdosfs deextend: validate pages of the partial buffer

Suppose that the cluster size is larger than page size. If the buffer
at the old EOF (before extending) was partial and dirty, it cannot be
automatically neither written out nor validated by the buffer cache,
since extending buffer adds invalid pages at the end.

Correct the buffer state by calling vfs_bio_clrbuf() on it, to mark
newly added and zeroed pages as valid.

Note that UFS is immune to the problem because ffs_truncate() always
allocate the block and buffer for the last byte of the file.

PR: 269341
Reported by: asomers
In collaboration with: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38549

17 months agomsdosfs deextend(): memoize DETOV(dep)
Konstantin Belousov [Sat, 11 Feb 2023 18:05:14 +0000 (20:05 +0200)]
msdosfs deextend(): memoize DETOV(dep)

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38549

17 months agomsdosfs: correct handling of vnode pager size on file extension error
Konstantin Belousov [Fri, 10 Feb 2023 04:58:43 +0000 (06:58 +0200)]
msdosfs: correct handling of vnode pager size on file extension error

If extension fails, vnode pager recorded size might be left increased.
Only update vnode pager when extension is past the point of no rollback.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38549

17 months agoallocbuf(): convert direct panic() calls to KASSERT()s
Konstantin Belousov [Sat, 11 Feb 2023 18:03:22 +0000 (20:03 +0200)]
allocbuf(): convert direct panic() calls to KASSERT()s

Also do minor style adjustments.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38549

17 months agovm_fault: Fix a race in vm_fault_soft_fast()
Mark Johnston [Mon, 13 Feb 2023 21:24:40 +0000 (16:24 -0500)]
vm_fault: Fix a race in vm_fault_soft_fast()

When vm_fault_soft_fast() creates a mapping, it release the VM map lock
before unbusying the top-level object.  Without the map lock, however,
nothing prevents the VM object from being deallocated while still busy.

Fix the problem by unbusying the object before releasing the VM map
lock.  If vm_fault_soft_fast() fails to create a mapping, the VM map
lock is not released, so those cases don't need to change.

Reported by: syzkaller
Reviewed by: kib (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38527

17 months agoinpcb: refcount_release() returns a bool
Mark Johnston [Mon, 13 Feb 2023 21:26:36 +0000 (16:26 -0500)]
inpcb: refcount_release() returns a bool

No functional change intended.

MFC after: 1 week
Sponsored by: Klara, Inc.

17 months agotcp: Remove a redundant net_epoch entry in tcp6_connect()
Mark Johnston [Mon, 13 Feb 2023 21:21:10 +0000 (16:21 -0500)]
tcp: Remove a redundant net_epoch entry in tcp6_connect()

tcp6_connect() is always called in a net_epoch read section.

Fixes: 3d76be28ec60 ("netinet6: require network epoch for in6_pcbconnect()")
Reviewed by: tuexen, glebius
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38506

17 months agoarm64 pmap: Fix a buffer overrun initializing per-superpage locks.
John Baldwin [Mon, 13 Feb 2023 21:19:03 +0000 (13:19 -0800)]
arm64 pmap: Fix a buffer overrun initializing per-superpage locks.

pmap_init_pv_table makes a first pass over the memory segments to
compute the amount of address space needed to allocate per-superpage
locks.  It then makes a second pass over each segment allocating
domain-local memory to back the pages for the locks belonging to each
segment.  This second pass rounds each segment's allocation up to a
page size since the domain-local allocation has to be a multiple of
pages.  However, the first pass was only doing a single round of the
total page counts up at the end not accounting for the padding present
in each segment.  To fix, apply the rounding in each segment in the
first pass instead of just at the end.

While here, tidy the second pass a bit by trimming some
not-quite-right logic copied from amd64.  In particular, compute pages
directly at the start of the loop iteration to more closely match the
first loop.  Then, drop an always-false condition as 'end' was
computed as 'start + pages' where 'start == highest + 1'.  Thus, the
actual condition being tested was 'if (highest >= highest + 1 +
pages)'.  Finally, remove 'highest' entirely by keep the result of the
'pvd' increment in the existing loop.

Reported by: CHERI (overflow)
Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D38377

17 months agoRemove support for the base/* toolchain ports.
John Baldwin [Mon, 13 Feb 2023 21:16:24 +0000 (13:16 -0800)]
Remove support for the base/* toolchain ports.

These ports have been removed so these knobs are no longer meaningful.

This reverts commit 608289394f655d0635c71233248b734010fb4d2f.
This reverts commit 39eb07f172921a581ee9b33ca2765905f4235202.

Reviewed by: imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D38562

17 months agolinuxkpi: Define `cpu_data(cpu)`
Jean-Sébastien Pédron [Fri, 10 Feb 2023 15:38:43 +0000 (16:38 +0100)]
linuxkpi: Define `cpu_data(cpu)`

`cpu_data(cpu)` evaluates to a `struct cpuinfo_x86` filled with
attributes of the given CPU number. The CPU number is an index in the
`__cpu_data[]` array with MAXCPU entries. On FreeBSD, we simply
initialize all of them like we do with `boot_cpu_data`.

While here, we add the `x86_model` field to the `struct cpuinfo_x86`. We
use `CPUID_TO_MODEL()` to set it.

At the same time, we fix the value of `x86` which should have been set
to the CPU family. It was using the same implementation as
`CPUID_TO_MODEL()` before. It now uses `CPUID_TO_FAMILY()`.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38542

17 months agolinuxkpi: Add `sg_alloc_table_from_pages_segment()`
Jean-Sébastien Pédron [Fri, 10 Feb 2023 15:37:31 +0000 (16:37 +0100)]
linuxkpi: Add `sg_alloc_table_from_pages_segment()`

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38541

17 months agolinuxkpi: Add <linux/stdarg.h> + include it from <linux/string.h>
Jean-Sébastien Pédron [Fri, 10 Feb 2023 10:52:12 +0000 (11:52 +0100)]
linuxkpi: Add <linux/stdarg.h> + include it from <linux/string.h>

The <stdarg.h> header was moved in Linux 5.15.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38540

17 months agolinuxkpi: Define `IRQ_NOTCONNECTED`
Jean-Sébastien Pédron [Fri, 10 Feb 2023 10:26:17 +0000 (11:26 +0100)]
linuxkpi: Define `IRQ_NOTCONNECTED`

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38539

17 months agolinuxkpi: Define `lockdep_assert{,_once}()`
Jean-Sébastien Pédron [Thu, 9 Feb 2023 22:04:26 +0000 (23:04 +0100)]
linuxkpi: Define `lockdep_assert{,_once}()`

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38538