GCE: Don't .error on unsupported targets
We ingest Makefile.gce even when we're not trying to create GCE images
so we don't want to .error here. Instead, set GCE_ARCH to a dummy
value which should make the problem clear to anyone who attempts to
create GCE images on an unsupported architecture.
Reported by: Jenkins
Fixes: 0a8ecca4e315 ("GCE: Specify the architecture of images")
(cherry picked from commit 787d09753f70bb382a7cbfba742a612fa54069e6)
GCE: Specify the architecture of images
Without a specified architecture, a user can attempt to create an
arm64 instance with an amd64 image or vice versa. With the change
the API will prevent that mismatch.
(cherry picked from commit 0a8ecca4e3156bcd4ebbfcb24d968e67a3a09434)
GCE: Add TARGET and FS to image family
GCE image family is meant to be unique per set of image characteristics
so that a user can create instances using the image family instead of the
image name to reliably get a similar image with updated software, but no
other changes.
Without this change, the instances create API would select the most recent
non-deprecated image matching the name, regardless of architecture or
filesystem.
(cherry picked from commit fc83e6c5e1f20087314dc52b63e485db87a98b86)
LinuxKPI: 802.11: reset hdr after crypto in lkpi_80211_txq_tx_one()
When lkpi_80211_txq_tx_one() calls into the crypto offloading parts to
possibly make space in the headroom, the beginning of our frame moves.
We have to reset hdr after that call as otherwise later classifications
based on the hdr->frame_control will fail or cause wrong classificaiton
of packets.
This makes sure frames will either be directly sent using (*mo_tx)()
or use the correct tid for the correct queue. This helps to get
rtwx8 packets flowing after BA was negotiated.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 11db70b6057e4
LinuxKPI: 802.11: fix rx_nss with VHT
When fixing single-stream chipsets, like iwlwifi(4) AX101, we started
masking the announced with the hardware supported values. This would
probably limit, e.g., rx_nss. During these works we fixed a loop
checking from the highest nss=7 to lowest nss=0 (8..1) and would set
rx_nss if the stream was supported. This left us with always setting
rx_nss on nss=0 to nss + 1 = 1. Instead only update once when we hit
the first supported MCS value (highest number of supported streams).
Looking at the diff of the mentioned commit hash which gets fixed it
looks like even the old code was not correct either.
This only fixes the logic to calculate rx_nss. This does not yet help
with modern drivers to actually update the value. Code for this will
come in a later commit.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: adb4901ac9ae
LinuxKPI: 802.11: assign sequence numbers to frames
While all native drivers were converted to call
ieee80211_output_seqno_assign() after changes to net80211 if needed,
LinuxKPI 802.11 was not fixed. Add the missing call.
Given we are currently only supporting STA mode, we can provide
sequence numbers for all frames (mgmt/beacon would be a problem in
AP mode).
This greatly helps LinuxKPI based drivers other than iwlwifi(4).
If drivers do their own sequence numbers, they will overwrite what we
pre-set unless we would pass a txflag not to do so (beware the
consequences).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: eabcd1773fa3, 785edcc2af5a
LinuxKPI: 802.11: add compat.linuxkpi.80211.IF.dump_stas_queues
Extend the normal compat.linuxkpi.80211.IF.dump_stas sysctl by
queue information. This was helpful for debugging various issues,
like selecting the outbound queue, stopping queues for BAR and helped
finding multiple bugs.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
HBSD: Always build both the distsets and pkgbase
We want to be able to experiment with pkgbase while also still providing
the tried and true method. Note that pkgbase support in the installer is
still broken.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
pmcannotate: avoid accessing uninitialized local variables
Initialize `tbfl` and `tofl` to NULL, and check whether they are
non-NULL before calling remove(3) on them, to avoid warnings from clang
21 similar to:
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tbfl' is uninitialized when used here [-Werror,-Wuninitialized]
746 | FATAL(exec, "%s: Impossible to locate the binary file\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
747 | exec);
| ~~~~~
usr.sbin/pmcannotate/pmcannotate.c:57:9: note: expanded from macro 'FATAL'
57 | remove(tbfl); \
| ^~~~
usr.sbin/pmcannotate/pmcannotate.c:695:12: note: initialize the variable 'tbfl' to silence this warning
695 | char *tbfl, *tofl, *tmpdir;
| ^
| = NULL
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tofl' is uninitialized when used here [-Werror,-Wuninitialized]
[15 lines not shown]
Reduce number of external symbols in libllvm, libclang and liblldb
In commit 2e47f35be5dc libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.
However, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.
On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)
Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.
[4 lines not shown]
pmcannotate: avoid accessing uninitialized local variables
Initialize `tbfl` and `tofl` to NULL, and check whether they are
non-NULL before calling remove(3) on them, to avoid warnings from clang
21 similar to:
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tbfl' is uninitialized when used here [-Werror,-Wuninitialized]
746 | FATAL(exec, "%s: Impossible to locate the binary file\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
747 | exec);
| ~~~~~
usr.sbin/pmcannotate/pmcannotate.c:57:9: note: expanded from macro 'FATAL'
57 | remove(tbfl); \
| ^~~~
usr.sbin/pmcannotate/pmcannotate.c:695:12: note: initialize the variable 'tbfl' to silence this warning
695 | char *tbfl, *tofl, *tmpdir;
| ^
| = NULL
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tofl' is uninitialized when used here [-Werror,-Wuninitialized]
[15 lines not shown]
Reduce number of external symbols in libllvm, libclang and liblldb
In commit 2e47f35be5dc libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.
However, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.
On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)
Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.
[4 lines not shown]
cross-build: Avoid adding <sys/cdefs.h> to SYSINCS
Summary:
The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so
cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This
commit adds a guard around that to only do that when building on FreeBSD. This
should fix github CI.
Test Plan:
Ran buildkernel using tools/build/make.py on linux in github CI and
locally on FreeBSD to double check nothing broke.
Reviewed by: dim
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54385
exterr_test: loosen the error string pattern
After addition of the prot and max_prot values, the old error substring
no longer satisfy the check.
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
exterror: add support for the format specifiers in the extended error msg
Note that we trust kernel code to only request the printout of integer
types, and use the 'j' modifier always.
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
exterr: in verbose mode, print the source file name
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
Add a script to auto-generate mapping from exterr category to source file
Reviewed by: emaste, mkusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
man pages: provide some description for extended errors
, related functions, and the EXTERROR_VERBOSE environment variable.
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380