Commit graph

287812 commits

Author SHA1 Message Date
Elliott Mitchell c7368ccb68 xen: remove xen_domain_type enum/variable
The vm_guest variable readily covers all uses of xen_domain_type, so
merge them together.  Since support for PV domains has been removed
hard-core xen_pv_domain() to return false.

Reviewed by: royger
2023-11-28 13:40:19 +01:00
Elliott Mitchell d48760ffe9 xen/dev: remove __unused from driver argument of identify functions
The driver argument is most certainly now used by these functions.  When
originally implemented it might have been unused, but not now.

Reviewed by: royger
2023-11-28 13:32:57 +01:00
Elliott Mitchell 3e5e0e2f16 xen/dev: switch to DEVMETHOD_END
Switch to the preferred end of the device method table.  These hadn't
been updated previously.

Reviewed by: royger
2023-11-28 13:31:47 +01:00
Elliott Mitchell c5c26f15f8 xen/x86: move x86-only variable out of common
Commit 27c36a12f1 is an x86-only feature.  As such xen_evtchn_needs_ack
should only exist on x86.

Differential Revision: https://reviews.freebsd.org/D29913
Reviewed by: royger
[royger]: adjust comment.
2023-11-28 13:30:40 +01:00
Elliott Mitchell 1b43b74963 xen/intr: remove xenpci headers
These were needed in the past, since that time the interrupt code has
been successfully isolated from the Xen/PCI code.  As such a bit of
straightforward cleanup.

Differential Revision: https://reviews.freebsd.org/D32923
Reviewed by: royger
2023-11-28 13:26:29 +01:00
Elliott Mitchell b37a180f01 xen: remove declaration of evtchn_device_upcall()
This function was removed at 5779d8ad57.  Long past time to remove the
declaration to ensure people aren't confused.

Differential Revision: https://reviews.freebsd.org/D30865
Reviewed by: royger
2023-11-28 13:25:35 +01:00
Elliott Mitchell 54a0b7203c xen/apic: remove passing trapframe as argument
While otherwise a handy potential approach, getting the trapframe via the
argument isn't documented and isn't supposed to be used.  While
ipi_bitmap_handler() and ipi_swi_handler() need to be passed the
trapframe as their arguments, the Xen functions can retrieve it from
curthread->td_intr_frame, which is the proper way.

Reviewed by: royger
2023-11-28 13:22:30 +01:00
Elliott Mitchell c880f12f5a xen/intr: correct misuses of Xen handle pointer type
Fix a few spots where handle pointers were incorrectly used.  Luckily
these appear rarely triggered given how long they've been lurking.

Fixes: 76acc41fb7 ("Implement vector callback for PVHVM and unify event channel implementations")
Fixes: 9f40021f28 ("Introduce a new, HVM compatible, paravirtualized timer driver for Xen.")
MFC after: 2 weeks
Reviewed by: royger
2023-11-28 12:51:19 +01:00
Elliott Mitchell b3195ed2a3 xen: correct spacing in hypercall.h headers
A precursor to merging them.  The spacing differs quite a bit between
the i386 and amd64 hypercall headers, despite very similar content.
Consistently use tabs instead of spaces.

Reviewed by: royger
2023-11-28 12:23:18 +01:00
Emmanuel Vadot 1148518afe Revert "sys/mutex.h: Include sys/lock.h instead of sys/_lock.h"
This reverts commit 2a35f3cdf6.

Doesn't appears to be needed anymore and if it is at some point I'll
fix the driver.
2023-11-28 09:39:59 +01:00
Emmanuel Vadot 7b4b05d889 Revert "sys/mutex.h: Reorder includes"
This reverts commit 50335b1ae4.
2023-11-28 09:39:53 +01:00
Gleb Smirnoff d2de66a90d ng_socket: with getsockname() return node ID for unnamed node
Reviewed by:		afedorov
Differential Revision:	https://reviews.freebsd.org/D42691
2023-11-27 20:11:38 -08:00
Gleb Smirnoff 4064a1108b netgraph: increase size of sockaddr_ng to match maximum node name
The ng_socket(4) node already writes more than declared size of the
struct at least in the in ng_getsockaddr().  Make size match size of
a node name.  The value is pasted instead of including ng_message.h
into ng_socket.h.  This is external API and we want to keep it stable
even if NG_NODESIZ is redefined in a kernel build.

Reviewed by:		afedorov
Differential Revision:	https://reviews.freebsd.org/D42690
2023-11-27 20:10:52 -08:00
Warner Losh c596126a5d pmbr: Only load the first 545k rather than error out
It would be nice to have larger boot partitions for ESPs to live in one
day. It's trivial to carve out 5M 10M or 200M when provisioning, but
logistical issues may make it hard to do it after the fact. So only warn
when the partition is > 545k. If we ever grow the boot loader larger
than that, then it will be responsible for loading the rest anyway.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D42774
2023-11-27 15:45:56 -07:00
Warner Losh a5c2781934 cdefs: Remove __func__ stub.
Redo 17a238a15f. Remove the __func__ crutch for gcc 2.95 and earlier.
We don't need it today to build the tree (since gcc < 12 is unlikely to
work). And it's not used in any system header that's part of the
standard interfaces today (so we don't need it for compatibility). And
we have other issues that make gcc < 4.2 unlikely to work today with
system headers.

Sponsored by:		Netflix
2023-11-27 14:59:54 -07:00
Warner Losh 8b923102f9 Revert "cdefs: Remove __func__ define"
This reverts commit 17a238a15f. There were
too many other changes accidentally mixed in.

Sponsored by:		Netflix
2023-11-27 14:59:54 -07:00
Colin Percival 97bd53ef4d Makefile.vm: Fix duplicate rc.conf files
Two bugs in Makefile.vm resulted in disk images being "built" multiple
times, resulting in lines added to /etc/rc.conf being duplicated:

1. The vm-image target reused the same "staging tree" directory for all
of its builds (multiple disk image types and multiple filesystem types).

2. The cw-type-flavour-fs target depends on emulator-portinstall, which
did not have a 'touch ${.TARGET}' and thus re-ran every time -- and
caused the cw-type-flavour-fs target to be re-run.  This was triggered
by release builds running `make cloudware-release` (creating the disk
images) followed by `make ec2amis` (which re-created the disk images
prior to uploading them).

MFC After:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2023-11-27 13:35:41 -08:00
Gleb Smirnoff 96950419f1 tests: don't run atf_* in a subshell
Shell limitation is that a classic function call via $() is a subshell
and atf-sh(3) commands won't work as epxected there.  Subsequently,
atf_skip inside a function won't skip a test.  The test will fail later.

A working approach is to pass desired variable name as argument to
a function and don't run subshell.

Reviewed by:		ngie
Differential Revision:	https://reviews.freebsd.org/D42646
Fixes:			ea82362219
2023-11-27 13:15:59 -08:00
Kristof Provost 1d723c1e56 pf tests: test recursive printing of labels
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-27 21:37:33 +01:00
Luiz Amaral 0187875a6c pfctl: Fix recursive printing of anchor labels
We recently noticed that the recursive printing of labels wasn't working
like the recursive printing of rules.

When running pfctl -sr -a* we get a listing of all rules, including the
ones inside anchors. On the other hand, when running pfctl -sl -a*, it
would only print the labels in the root level, just like without the
-a* argument.

As in our use-case we are interested on labels only and our labels are
unique even between anchors, we didn't add indentation or hierarchy to
the printing.

Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42728
2023-11-27 21:37:33 +01:00
Kristof Provost 44f323ecde pf: implement DIOCGETRULES via netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-27 21:36:49 +01:00
Kristof Provost 2905d10b39 snmp_pf: use libpfctl's pfctl_get_rules_info() rather than DIOCGETRULES
Prefer libpfctl functions over direct access to the ioctl whenever
possible.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-27 21:36:48 +01:00
Kristof Provost 47a0b59379 pfctl: use libpfctl instead of DIOCGETRULES directly
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-27 21:36:48 +01:00
Randall Stewart 6a79e48076 Fix two latent bugs in hpts. One where a static is put on
a local variable, the other an initialization bug where
we should be setting tv.tv_sec to 0.

PR:	275482
2023-11-27 14:38:06 -05:00
Mike Karels 1a7c9e1585 pwait.1: add missing prompt and command in examples
Two examples showed '$?' alone on a line, which should be '$ echo $?'.
The third example got it right.  Fix the first two.
2023-11-27 10:59:52 -06:00
Brooks Davis 3faba3002f x86emu: remove localy added __FBSDID
This partially reverts 0a2e9846fd.

Reviewed by:	imp, delphij
Differential Revision:	https://reviews.freebsd.org/D42705
2023-11-27 16:47:41 +00:00
Brooks Davis a3c858005c telnet: remove locally added __FBSDID
This partially reverts 77b7cdf199.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42704
2023-11-27 16:47:37 +00:00
Brooks Davis a159b74a5d smbfs: remove locally added __FBSDID
Differential Revision:	https://reviews.freebsd.org/D42703
2023-11-27 16:47:33 +00:00
Brooks Davis 78e6a1bd06 pnpinfo: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42702
2023-11-27 16:47:30 +00:00
Brooks Davis 3f944f3bb7 ee: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42701
2023-11-27 16:47:26 +00:00
Brooks Davis ae477ca7da bzip2: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42700
2023-11-27 16:47:22 +00:00
Vladimir Kondratyev 789ffce392 ig4: Add PCI IDs for Intel Ice Lake I2C controller.
PR:		275115
Tested by:	Sam <sam3423.yntmr_AT_slmail_DOT_me>
MFC after:	2 weeks
2023-11-27 18:25:48 +03:00
Warner Losh 21fce617d1 param.h: Bump FreeBSD_version to 1500005
String of mechancial changes to the tree: sccs id removed, if 0'd
copyright strings removed, mechanical style fix after htis churn and
some macros removes from sys/cdefs.h. None of these should need a bump,
but bump anyway out of an abundance of caution (and everything is going
to rebuild anyway).

Sponsored by:		Netflix
2023-11-26 22:24:03 -07:00
Warner Losh 17a238a15f cdefs: Remove __func__ define
We require an ANSI-C compiler to build the base system. It's required
that __func__ work. Remove this define since the only known problem
compilers are ancient history (gcc 2.6 from 1994, almost pre-dating the
project). 3rd party code that used this define will now need to provide
it via some other means when using non-ansi-c compilers.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh 042f0f00c2 cdefs: Move GNUC_PREREQ to top of file
It really should be closer to the the top of the file, so move it to the
start of the compiler specific section.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh b88ca6ee16 cdefs: Remove CC_SUPPORTS macros, they are unused
Remove __CC_SUPPORTS_INLINE, __CC_SUPPORTS___INLINE__,
__CC_SUPPORTS___FUNC__, __CC_SUPPORTS_WARNING,
__CC_SUPPORTS_VARADIC_XXX, __CC_SUPPORTS_DYNAMIC_ARRAY_INIT: they are
unused. Also remove them from the generated cryptodevh.py script.

Retain, for the moment, __CC_SUPPORTS___INLINE, since it's used in this
file.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh a83d4fe9cb cdefs: Remove some builtin defines, they are unused
Remove __GNUCLIKE_BUILTIN_NEXT_ARG, __GNUCLIKE_MATH_BUILTIN_RELOPS,
__GNUCLIKE_BUILTIN_MEMCPY: they are unused. Also remove them from the
generated cryptodevh.py script.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh 9e55552208 cdefs: Remove vararg related defines, they are unused.
Remove __GNUCLIKE_BUILTIN_VARARGS, __GNUCLIKE_BUILTIN_STDARG,
__GNUCLIKE_BUILTIN_VAALIST, __GNUC_VA_LIST_COMPATIBILITY: they are
unused. Also remove them from the generated cryptodevh.py script.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh eaaa7ca0c3 cdefs: Remove __GNUCLIKE_BUILTIN_CONSTANT_P, it's unused
__GNUCLIKE_BUILTIN_CONSTANT_P is unused, remove it. Also remove it from
the generated cryptodevh.py script.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh d2ec42ca57 cdefs: Remove __GNUCLIKE_CTOR_SECTION_HANDLING, it's unused
__GNUCLIKE_CTOR_SECTION_HANDLING is unused, remove it. Also remove it
from the generated cryptodevh.py script.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:02 -07:00
Warner Losh 45aa39f884 cdefs: Remove __GNUCLIKE___SECTION, it's unused.
__GNUCLIKE___SECTION is unused, remove it. Also remove it from the
generated cryptodevh.py script.

PR: 275221 (exp-run)
Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 5e3934b15a usr.bin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 6bfca4dcab tools: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 6dced2c635 tests: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh fdafd315ad sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:00 -07:00
Warner Losh 7c43148a97 stand: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:00 -07:00
Warner Losh 0044e9124e share: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:00 -07:00
Warner Losh c8813424c9 secure: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:23:59 -07:00
Warner Losh 32e86a82f5 sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:23:59 -07:00