Commit Graph

278959 Commits

Author SHA1 Message Date
Ed Maste
470fb726f3 build: Use rm -fv for BATCH_DELETE_OLD_FILES
It's possible to have files with odd permissions in the tmproot (or
sysroot), causing rm to prompt for each one during e.g. buildworld.
Add -f to forcibly delete these.

Reviewed by:	brooks
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37111
2022-10-25 11:18:55 -04:00
Mark Johnston
ed72168431 bhyve: Address some signed/unsigned comparison warnings
MFC after:	1 week
2022-10-25 11:16:57 -04:00
Mark Johnston
cea34d0705 bhyve: Address signed/unsigned comparison warnings in the e1000 model
No functional change intended.

MFC after:	1 week
2022-10-25 11:16:57 -04:00
Mark Johnston
f0553616cf bhyve: Address signed/unsigned comparison warnings in the AHCI model
No functional change intended.

MFC after:	1 week
2022-10-25 11:16:57 -04:00
Mark Johnston
46f5c82896 bhyve: Address warnings in blockif_proc()
- Use unsigned types for all arithmetic.  Use a new signed variable for
  holding the return value of pread() and pwrite().
- Handle short I/O from pwrite().

MFC after:	1 week
2022-10-25 11:16:56 -04:00
Mark Johnston
e008f5be72 bhyve: Fix a typo in a function name
MFC after:	1 week
2022-10-25 11:16:56 -04:00
Mark Johnston
03f7ccab32 bhyve: Avoid arithmetic on void pointers
No functional change intended.

MFC after:	1 week
2022-10-25 11:16:56 -04:00
Mark Johnston
3b6cb9b436 bhyve: Avoid shadowing global variables in bhyverun.c
- Rename the global cores/sockets/threads to cpu_cores/sockets/threads.
  This way, num_vcpus_allowed() doesn't shadow them.
- The global maxcpus is unused, remove it for the same reason.

MFC after:	1 week
2022-10-25 11:16:56 -04:00
Kyle Evans
75c3ca1ebf split: add some tests
This should cover all of the basic functionality, as well as the recent
enhancement to use a dynamic buffer size rather than limiting patterns
and lines to MAXBSIZE.

Reviewed by:	bapt
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D36324
2022-10-25 10:05:24 -05:00
Kyle Evans
5c053aa3c5 split: switch to getline() for line/pattern matching
Get rid of split's home-grown logic for growing the buffer; arbitrarily
breaking at LONG_MAX bytes instead of 65536 bytes gives us much more
wiggle room.  Additionally, we'll actually fail out entirely if we can't
fit a line, which makes noticing this class of problem much easier.

Reviewed by:	bapt, emaste, pauamma
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D36323
2022-10-25 10:05:23 -05:00
Gordon Bergling
8ba2beacfd netmap(4): Fix a typo in a source code comment
- s/microsconds/microseconds/

MFC after:	3 days
2022-10-25 14:56:25 +02:00
Gordon Bergling
d53e97bb54 smartpqi(4): Fix two typos in kernel error messages
- s/runnning/running/

MFC after:	2 weeks
2022-10-25 13:17:20 +02:00
Gordon Bergling
7bef61eef3 dconschat(8): Fix a typo in an error message
- s/faild/failed/

MFC after:	1 week
2022-10-25 12:58:55 +02:00
Gordon Bergling
24a630de81 arcmsr(4): Fix a typo in a source code comment
- s/faild/failed/

MFC after:	3 days
2022-10-25 12:57:37 +02:00
Gordon Bergling
4bd5e6221e zfsd(8): Fix a typo in an error message
- s/faild/failed/

MFC after:	1 week
2022-10-25 12:55:42 +02:00
Gordon Bergling
c03e35accc firewire(4): Fix a typo in an error message
- s/faild/failed/

MFC after:	5 days
2022-10-25 12:54:15 +02:00
Gordon Bergling
dabebd0ba2 ocs_fc(4): Fix a typo in an error message
- s/faild/failed/

MFC after:	5 days
2022-10-25 12:52:24 +02:00
Gordon Bergling
31c472b8a6 CMSG_DATA.3: Fix a typo in the EXAMPLES section
- s/faild/failed/

MFC after:	3 days
2022-10-25 12:49:21 +02:00
Gordon Bergling
1cc4c2f90f run.4: Fix a typo in the DIAGNOSTICS section
- s/faild/failed/

MFC after:	3 days
2022-10-25 12:47:29 +02:00
Takanori Watanabe
2d00d160ae man: hook acpi_ged.4 to build.
Submittet by: yuri@astern.org

Differential Revision: https://reviews.freebsd.org/D37114
2022-10-25 19:01:58 +09:00
Gordon Bergling
558ec54da3 netpfil: Fix two typos in source code comments
- s/missmatch/mismatch/

MFC after:	3 days
2022-10-25 04:32:59 +02:00
Gordon Bergling
156ce1e51c net8021: Fix a typo in a kernel error message
- s/missmatch/mismatch/

MFC after:	1 week
2022-10-25 04:31:51 +02:00
Konstantin Belousov
fd6dd33dc0 opencrypto: fix null esp crypt
Fixes:	3e9470482a
Reviewed by:	jhb
Sponsored by:	Nvidia networking
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37113
2022-10-25 03:24:43 +03:00
Bjoern A. Zeeb
b5a8107590 LinuxKPI: seq_file add "private" versions.
Add __seq_open_private() and seq_release_private() needed by iwlwifi
debugfs support.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D37089
2022-10-24 21:39:48 +00:00
Mark Johnston
eefd863cba bhyve: Drop a bogus const qualifier
No functional change intended.

MFC after:	1 week
2022-10-24 17:35:16 -04:00
Mark Johnston
fb7ce0a95e bhyve: Use the new vm_limit_rights() interface
This addresses a compiler warning arising from the fact that bhyve
needs to cast away a const qualifier in order to call free().

No functional change intended.

Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37099
2022-10-24 17:33:13 -04:00
Mark Johnston
3e9b4532d1 libvmmapi: Provide an interface for limiting rights on the device fd
Currently libvmmapi provides a way to get a list of the allowed ioctls
on the vmm device file, so that bhyve can limit rights on the device
file fd.  The interface is rather strange: it allocates a copy of the
list but returns a const pointer, so the caller has to cast away the
const in order to free it without aggravating the compiler.

As far as I can see, there's no reason to make a copy of the array, but
changing vm_get_ioctls() to not do that would break compatibility.  So
this change just introduces a better interface: move all rights-limiting
logic into libvmmapi.

Any new operations on the fd should be wrapped by libvmmapi, so also
discourage use of vm_get_device_fd().  Currently bhyve uses it only when
limiting rights on the device fd.

No functional change intended.

Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37098
2022-10-24 17:33:13 -04:00
Bjoern A. Zeeb
16295b0a5a dpaa2: cleanup some include files
2782ed8f6c fixed the standalone module
build.  REmove the now duplicate includes for opt_acpi.h and
opt_platform.h.  Als remove the if_mdio.h again in both the Makefile
and the implementation file as it is not (currently) used.

X-MFC with:	ba7319e909
MFC after:	70 days
2022-10-24 21:24:32 +00:00
Randall Stewart
31bc602ff8 Rack and BBR broken with the new timewait state purge.
We recently got rid of the explicit INP_TIMEWAIT state, this has caused some
minor breakage to both rack and bbr. Basically the timewait check that was
in tcp_lro.c is now gone. This means that compressed_ack and mbuf_queued
packets will arrive at TCP without going through tcp_input_with_port(). We need
to expand the check that was stripped to look at the tcp_state (t_state) and
not "LRO" packets that are in the TCPS_TIMEWAIT state.

Reviewed by: tuexen, gliebus
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D37080
2022-10-24 15:47:29 -04:00
Kristof Provost
13b1d6f0c9 if_ovpn: avoid netisr_queue name conflicts
Rename the netisr_queue variable in if_ovpn.c to avoid naming conflicts.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-10-24 20:45:39 +02:00
Warner Losh
ef1851fb43 acpi_ged: Module build no longer needs to define INTRNG
Now that we properly define INTRNG generically on all the platforms that
need it in opt_global.h, we don't need to define it here.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D37110
2022-10-24 12:13:04 -06:00
Warner Losh
4355ab6f04 config.mk: All options in DEFAULTS are now defined in opt_global.h
To simplify management of all the options that should be enabled for the
different architectures, adopt the convention that all options listed in
DEFAULTS will be #defined to 1 in opt_global.h for untied builds. Except
for GEOM_* and ISAPNP, they are all in opt_global.h. ISAPNP is a
opt_dontuse.h, so only filter GEOM_*.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D37108
2022-10-24 12:13:04 -06:00
Warner Losh
d6f1e6aa11 config: Make ISAPNP be in opt_dontuse.h
Nothing uses ISAPNP today, apart from bringing in files or not. There's
really no need to ever do #ifdef ISAPNP in drivers and such. It means
use the ISA bus plug and play isolation protocol to enumerate the bus,
not the more useful 'you might have devices with isa pnp ids' which all
drivers hide behind DEV_ISA and/or an isa clause in the files files.

Sponsored by:		Netflix
Reviewed by:		kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D37109
2022-10-24 12:13:03 -06:00
Warner Losh
d4f6b11f66 DEFAULTS: move intrng to DEFAULTS for its platforms.
Sponsored by:		Netflix
Reviewed by:		manu, kevans
Differential Revision:	https://reviews.freebsd.org/D37107
2022-10-24 12:13:03 -06:00
Warner Losh
eca818c872 stand/efi: Simpler construct
Use 'sizeof(long) == 8' for a compile time constant that can be used as
an initializer rather than #ifdefs.

Sponsored by:		Netflix
2022-10-24 12:13:03 -06:00
Mark Johnston
9ca7ca92f3 man4: Hook mac_ddb.4 up to the build
Fixes:		287d467c5d ("mac: add new mac_ddb(4) policy")
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
2022-10-24 12:24:51 -04:00
Mark Johnston
6fe0a6c80a zfs: Fix a pair of bugs in zfs_fhtovp()
This cherry-picks upstream ed566bf1cd

    - Add a zfs_exit() call in an error path, otherwise a lock is
      leaked.
    - Remove the fid_gen > 1 check.  That appears to be Linux-specific:
      zfsctl_snapdir_fid() sets fid_gen to 0 or 1 depending on whether
      the snapshot directory is mounted.  On FreeBSD it fails, making
      snapshot dirs inaccessible via NFS.

PR:		266236
MFC after:	3 days
2022-10-24 12:05:17 -04:00
Gleb Smirnoff
ba23f762ec acpi_ged: fix build with ACPI_DEBUG 2022-10-24 09:00:04 -07:00
Kristof Provost
3c62f0f608 RELNOTES: Add an entry for if_bridge l3 filtering default change 2022-10-24 17:58:00 +02:00
Mateusz Guzik
d653aaec7a cache: add cache_assert_no_entries 2022-10-24 15:37:43 +00:00
Takanori Watanabe
9cf5db6369 acpi_ged: fix build, as module and non INTRNG case.
Reviewed-by: cy

Differential Revision: https://reviews.freebsd.org/D37104
2022-10-24 23:37:28 +09:00
Sergey A. Osokin
7322a6bcac bsd-family-tree: OpenBSD 7.2 and DragonFly BSD 6.0.1
Add two releases to the tree.

While I'm here correct DragonFly BSD 6.2.1 position, it's
been released after FreeBSD 12.3.

MFC after:	3 days
2022-10-24 10:12:31 -04:00
Ed Maste
c61b3f7de9 OpenBSM: fix free() in au_read_rec error case
buf is a char ** and *buf is the allocated buffer.

PR:		267050
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-10-24 09:49:30 -04:00
Takanori Watanabe
a9880bfe11 acpi_ged: New driver to ACPI generic event device
New driver to ACPI generic event device, defined in ACPI spec.
Some ACPI power button may not work without this.

In qemu arm64 with "virt" machine, with ACPI firmware,
enable devd check devd message by
and invoke following command in qemu monitor
(qemu) system_powerdown
and make sure some power button input event appear.
(setting sysctl hw.acpi.power_button_state=S5 is not work,
because ACPI tree does not have \_S5 object.)

Reviewed by: andrew, hrs
Differential Revision: https://reviews.freebsd.org/D37032
2022-10-24 18:57:36 +09:00
Kristof Provost
22893e5840 bridge: default to not filtering L3
Change the default for net.link.bridge.pfil_member and
net.link.bridge.pfil_bridge to zero.

That is, default to not calling layer 3 firewalls on the bridge or its
member interfaces.

With either of these enabled the bridge will, during L2 processing,
remove the Ethernet header from packets, feed them to L3 firewalls,
re-add the Ethernet header and send them out.

Not only does this interact very poorly with firewalls which defer
packets, or reassemble and refragment IPv6, it also causes considerable
confusion for users, because the firewall gets called in unexpected
ways.

For example, a bridge which contains a bhyve tap and the host's LAN
interface. We'd expect traffic between the LAN and bhyve VM to pass, no
matter what (layer 3) firewall rules are set on the host. That's not the
case as long as pfil_bridge or pfil_member are set.

Reviewed by:	Zhenlei Huang
MFC:		never
Differential Revision:	https://reviews.freebsd.org/D37009
2022-10-24 08:52:21 +02:00
Wei Hu
2db785aa01 arm64: Hyper-V: fix couple more commit errors caused by duplicated lines
Remove those duplicated lines.

Reported by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Fixes:		6cf00ef80c
Sponsored by:	Microsoft
2022-10-24 08:14:25 +00:00
Kristof Provost
dc12ee39b7 if_ovpn: add sysctls for netisr_queue() and crypto_dispatch_async()
Allow the choice between asynchronous and synchronous netisr and crypto
calls. These have performance implications, but depend on the specific
setup and OCF back-end.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D37017
2022-10-24 10:08:35 +02:00
Peter Holm
ee920bc903 stress2: Added a regression test for D37024 2022-10-24 09:48:09 +02:00
Peter Holm
799db59e9a stress2: Update tool to list both DATA and HOLES in a file.
Added a regression test.
2022-10-24 09:45:32 +02:00
Bjoern A. Zeeb
d3975204e4 LinuxKPI: add MSEC_PER_SEC
Sponsored by:	The FreeBSD Foundation
Reviewed by:	imp, emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D37087
2022-10-23 21:54:36 +00:00