crypto: avoid warnings about too-long initializer strings
Mark `sigma` and `tau` as `__non_string`, to avoid warnings from clang
21 similar to:
sys/crypto/chacha20/chacha.c:53:31: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
53 | static const char sigma[16] = "expand 32-byte k";
| ^~~~~~~~~~~~~~~~~~
sys/crypto/chacha20/chacha.c:54:29: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
54 | static const char tau[16] = "expand 16-byte k";
| ^~~~~~~~~~~~~~~~~~
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54364
(cherry picked from commit 710ec409dffed3306ced253bba85dbdc7758510b)
ncurses: avoid warnings about too-long initializer strings
Increase the size of `assoc::from` to 8 bytes, to avoid warnings from
clang 21 similar to:
contrib/ncurses/progs/infocmp.c:702:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
702 | DATA("\033[2J", "ED2"), /* clear page */
| ^~~~~~~~~
contrib/ncurses/progs/infocmp.c:716:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
716 | DATA("\033[!p", "DECSTR"), /* soft reset */
| ^~~~~~~~~
Reviewed by: markj
Obtained from: https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241207.patch.gz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54371
(cherry picked from commit 667259b392ec0a86d066ccc6ba0f4025b3d2a083)
compat: linux: use appropriate variables for copying out old timers
We copyout &l_oval but do the conversions into &l_val, leaving us with
stack garbage. A build with an LLVM21 cross-toolchain seems to catch
this.
Reported by: Florian Limberger <flo purplekraken com>
Reviewed by: markj
Fixes: a1fd2911ddb06 ("linux(4): Implement timer_settime64 syscall.")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52985
(cherry picked from commit 541a98d7e28a8e4697ac2fa78dd4c4203c2c3a9c)
bsd.sys.mk: suppress some new clang 21 warnings for C++
Otherwise, these lead to many -Werror warnings in libc++ headers, due to
our use of -Wsystem-headers, which is not officially supported upstream:
Suppress -Wc++20-extensions, due to:
/usr/include/c++/v1/__algorithm/simd_utils.h:96:50: error: explicit template parameter list for lambdas is a C++20 extension [-Werror,-Wc++20-extensions]
96 | inline constexpr size_t __simd_vector_size_v = []<bool _False = false>() -> size_t {
| ^
Suppress -Wc++23-lambda-attributes, due to:
/usr/include/c++/v1/__format/format_functions.h:462:32: error: an attribute specifier sequence in this position is a C++23 extension [-Werror,-Wc++23-lambda-attributes]
462 | if (bool __is_identity = [&] [[__gnu__::__pure__]] // Make sure the compiler knows this call can be eliminated
| ^
Suppress -Wnullability-completeness, due to:
[7 lines not shown]
sh: avoid warnings about too-long initializer strings
Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid
warnings from clang 21 similar to:
bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
| ^~~~~~~~~~~~~~~~~~~~~
bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
153 | {"==", STREQ},
| ^~~~
MFC after: 3 days
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D54362
(cherry picked from commit e6546807f4c1a8a6a6fa53fceab7b8c80e3ed802)
OptionalObsoleteFiles.inc: fix up WITH_LLVM_LINK_STATIC_LIBRARIES cases
In commit cf1eaaf41cef I added the WITH_LLVM_LINK_STATIC_LIBRARIES
src.conf(5) build knob, which also affects OptionalObsoleteFiles.inc.
However, the checks were incorrect: when WITH_LLVM_LINK_STATIC_LIBRARIES
is active, the OLD_LIBS libprivatellvm.so.19, libprivateclang.so.19 and
libprivatelldb.so.19 should always be cleaned up.
Fixes: cf1eaaf41cef
MFC after: 1 week
(cherry picked from commit 160077a4d75186a979f28f0778259c66d8cac8be)
src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob
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, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).
Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.
PR: 287447
Reviewed by: emaste
MFC after: 1 week
[3 lines not shown]
zfs: rename several printf attribute declarations to __printf__
For kernel builds, we redefine `__printf__` to `__freebsd_kprintf__`, to
support FreeBSD kernel printf(9) extensions with clang.
In OpenZFS various printf related functions are declared with
__attribute__((format(printf, X, Y))), so these won't work with the
above redefinition. With clang 21 and higher, this leads to errors
similar to:
sys/contrib/openzfs/module/zfs/spa_misc.c:414:38: error: passing 'printf' format string where 'freebsd_kprintf' format string is expected [-Werror,-Wformat]
414 | (void) vsnprintf(buf, sizeof (buf), fmt, adx);
| ^
Since attribute names can always be spelled with leading and trailing
double underscores, rename these instances.
Note that in FreeBSD proper we usually use `__printflike` from
<sys/cdefs.h>, but that does not apply to OpenZFS.
[6 lines not shown]
crypto: avoid warnings about too-long initializer strings
Mark `sigma` and `tau` as `__non_string`, to avoid warnings from clang
21 similar to:
sys/crypto/chacha20/chacha.c:53:31: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
53 | static const char sigma[16] = "expand 32-byte k";
| ^~~~~~~~~~~~~~~~~~
sys/crypto/chacha20/chacha.c:54:29: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
54 | static const char tau[16] = "expand 16-byte k";
| ^~~~~~~~~~~~~~~~~~
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54364
(cherry picked from commit 710ec409dffed3306ced253bba85dbdc7758510b)
ncurses: avoid warnings about too-long initializer strings
Increase the size of `assoc::from` to 8 bytes, to avoid warnings from
clang 21 similar to:
contrib/ncurses/progs/infocmp.c:702:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
702 | DATA("\033[2J", "ED2"), /* clear page */
| ^~~~~~~~~
contrib/ncurses/progs/infocmp.c:716:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
716 | DATA("\033[!p", "DECSTR"), /* soft reset */
| ^~~~~~~~~
Reviewed by: markj
Obtained from: https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241207.patch.gz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54371
(cherry picked from commit 667259b392ec0a86d066ccc6ba0f4025b3d2a083)
compat: linux: use appropriate variables for copying out old timers
We copyout &l_oval but do the conversions into &l_val, leaving us with
stack garbage. A build with an LLVM21 cross-toolchain seems to catch
this.
Reported by: Florian Limberger <flo purplekraken com>
Reviewed by: markj
Fixes: a1fd2911ddb06 ("linux(4): Implement timer_settime64 syscall.")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52985
(cherry picked from commit 541a98d7e28a8e4697ac2fa78dd4c4203c2c3a9c)
bsd.sys.mk: suppress some new clang 21 warnings for C++
Otherwise, these lead to many -Werror warnings in libc++ headers, due to
our use of -Wsystem-headers, which is not officially supported upstream:
Suppress -Wc++20-extensions, due to:
/usr/include/c++/v1/__algorithm/simd_utils.h:96:50: error: explicit template parameter list for lambdas is a C++20 extension [-Werror,-Wc++20-extensions]
96 | inline constexpr size_t __simd_vector_size_v = []<bool _False = false>() -> size_t {
| ^
Suppress -Wc++23-lambda-attributes, due to:
/usr/include/c++/v1/__format/format_functions.h:462:32: error: an attribute specifier sequence in this position is a C++23 extension [-Werror,-Wc++23-lambda-attributes]
462 | if (bool __is_identity = [&] [[__gnu__::__pure__]] // Make sure the compiler knows this call can be eliminated
| ^
Suppress -Wnullability-completeness, due to:
[7 lines not shown]
sh: avoid warnings about too-long initializer strings
Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid
warnings from clang 21 similar to:
bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
| ^~~~~~~~~~~~~~~~~~~~~
bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
153 | {"==", STREQ},
| ^~~~
MFC after: 3 days
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D54362
(cherry picked from commit e6546807f4c1a8a6a6fa53fceab7b8c80e3ed802)
OptionalObsoleteFiles.inc: fix up WITH_LLVM_LINK_STATIC_LIBRARIES cases
In commit cf1eaaf41cef I added the WITH_LLVM_LINK_STATIC_LIBRARIES
src.conf(5) build knob, which also affects OptionalObsoleteFiles.inc.
However, the checks were incorrect: when WITH_LLVM_LINK_STATIC_LIBRARIES
is active, the OLD_LIBS libprivatellvm.so.19, libprivateclang.so.19 and
libprivatelldb.so.19 should always be cleaned up.
Fixes: cf1eaaf41cef
MFC after: 1 week
(cherry picked from commit 160077a4d75186a979f28f0778259c66d8cac8be)
src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob
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, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).
Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.
PR: 287447
Reviewed by: emaste
MFC after: 1 week
[3 lines not shown]
[clang-doc] Add friends to class template (#173960)
This patch also allows comments to be associated with friend
declarations. Currently, it seems like the comments for friend `RecordDecl`
are taken from the actual class declaration, while a friend
function's comments are taken from the actual `friend` declaration.
zfs: rename several printf attribute declarations to __printf__
For kernel builds, we redefine `__printf__` to `__freebsd_kprintf__`, to
support FreeBSD kernel printf(9) extensions with clang.
In OpenZFS various printf related functions are declared with
__attribute__((format(printf, X, Y))), so these won't work with the
above redefinition. With clang 21 and higher, this leads to errors
similar to:
sys/contrib/openzfs/module/zfs/spa_misc.c:414:38: error: passing 'printf' format string where 'freebsd_kprintf' format string is expected [-Werror,-Wformat]
414 | (void) vsnprintf(buf, sizeof (buf), fmt, adx);
| ^
Since attribute names can always be spelled with leading and trailing
double underscores, rename these instances.
Note that in FreeBSD proper we usually use `__printflike` from
<sys/cdefs.h>, but that does not apply to OpenZFS.
[6 lines not shown]
crypto: avoid warnings about too-long initializer strings
Mark `sigma` and `tau` as `__non_string`, to avoid warnings from clang
21 similar to:
sys/crypto/chacha20/chacha.c:53:31: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
53 | static const char sigma[16] = "expand 32-byte k";
| ^~~~~~~~~~~~~~~~~~
sys/crypto/chacha20/chacha.c:54:29: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
54 | static const char tau[16] = "expand 16-byte k";
| ^~~~~~~~~~~~~~~~~~
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54364
(cherry picked from commit 710ec409dffed3306ced253bba85dbdc7758510b)
ncurses: avoid warnings about too-long initializer strings
Increase the size of `assoc::from` to 8 bytes, to avoid warnings from
clang 21 similar to:
contrib/ncurses/progs/infocmp.c:702:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
702 | DATA("\033[2J", "ED2"), /* clear page */
| ^~~~~~~~~
contrib/ncurses/progs/infocmp.c:716:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
716 | DATA("\033[!p", "DECSTR"), /* soft reset */
| ^~~~~~~~~
Reviewed by: markj
Obtained from: https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241207.patch.gz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54371
(cherry picked from commit 667259b392ec0a86d066ccc6ba0f4025b3d2a083)
compat: linux: use appropriate variables for copying out old timers
We copyout &l_oval but do the conversions into &l_val, leaving us with
stack garbage. A build with an LLVM21 cross-toolchain seems to catch
this.
Reported by: Florian Limberger <flo purplekraken com>
Reviewed by: markj
Fixes: a1fd2911ddb06 ("linux(4): Implement timer_settime64 syscall.")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52985
(cherry picked from commit 541a98d7e28a8e4697ac2fa78dd4c4203c2c3a9c)
bsd.sys.mk: suppress some new clang 21 warnings for C++
Otherwise, these lead to many -Werror warnings in libc++ headers, due to
our use of -Wsystem-headers, which is not officially supported upstream:
Suppress -Wc++20-extensions, due to:
/usr/include/c++/v1/__algorithm/simd_utils.h:96:50: error: explicit template parameter list for lambdas is a C++20 extension [-Werror,-Wc++20-extensions]
96 | inline constexpr size_t __simd_vector_size_v = []<bool _False = false>() -> size_t {
| ^
Suppress -Wc++23-lambda-attributes, due to:
/usr/include/c++/v1/__format/format_functions.h:462:32: error: an attribute specifier sequence in this position is a C++23 extension [-Werror,-Wc++23-lambda-attributes]
462 | if (bool __is_identity = [&] [[__gnu__::__pure__]] // Make sure the compiler knows this call can be eliminated
| ^
Suppress -Wnullability-completeness, due to:
[7 lines not shown]
sh: avoid warnings about too-long initializer strings
Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid
warnings from clang 21 similar to:
bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
| ^~~~~~~~~~~~~~~~~~~~~
bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
153 | {"==", STREQ},
| ^~~~
MFC after: 3 days
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D54362
(cherry picked from commit e6546807f4c1a8a6a6fa53fceab7b8c80e3ed802)
OptionalObsoleteFiles.inc: fix up WITH_LLVM_LINK_STATIC_LIBRARIES cases
In commit cf1eaaf41cef I added the WITH_LLVM_LINK_STATIC_LIBRARIES
src.conf(5) build knob, which also affects OptionalObsoleteFiles.inc.
However, the checks were incorrect: when WITH_LLVM_LINK_STATIC_LIBRARIES
is active, the OLD_LIBS libprivatellvm.so.19, libprivateclang.so.19 and
libprivatelldb.so.19 should always be cleaned up.
Fixes: cf1eaaf41cef
MFC after: 1 week
(cherry picked from commit 160077a4d75186a979f28f0778259c66d8cac8be)
src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob
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, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).
Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.
PR: 287447
Reviewed by: emaste
MFC after: 1 week
[3 lines not shown]
NAS-139156 / 26.04 / Revert "NAS-139145 / 26.04 / remove python3-remote-pdb (#17938)" (#17947)
This reverts commit 2af6936abeacbb1aeb8952a08aa89a808777d9fd. Truly no
idea how I missed THE VERY OBVIOUS USAGE of this module..... brain rot.
Merge tag 'pm-6.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki:
"Fix a recent regression that affects system suspend testing
at the 'core' level (Rafael Wysocki)"
* tag 'pm-6.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM: sleep: Fix suspend_test() at the TEST_CORE level
[VPlan] Simplify ~VPDef (NFCI).
Slightly simplify ~VPDef to avoid setting Def to nullptr, which is done
when remove the VPValue from VPDef, via VPValue's destructor.
Also use to_vector() instead of make_early_inc_range; as this is a
vector that may get modified, to_vector is appropriate.