-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CONFIG_FORTIFY_SOURCE may not be working for strcpy() and strlcpy() on LoongArch with clang #1897
Comments
This appears to be related to LoongArch's use of It has been there since LoongArch's introduction in https://git.kernel.org/linus/fa96b57c149061f71a70bd6582d995f6424fbbf4 and I see some upstream discussion around it at https://lore.kernel.org/[email protected]/. |
It make sense perhaps to see about I'd be curious if |
typedef unsigned long __kernel_size_t;
typedef __kernel_size_t size_t;
void fortify_panic(const char *);
void __write_overflow()
__attribute__((__error__("detected write beyond size of object 0")));
extern __kernel_size_t __real_strnlen(const char *,
__kernel_size_t) __asm__("strnlen");
extern inline __attribute__((__gnu_inline__))
__attribute__((patchable_function_entry(0, 0)))
__attribute__((__always_inline__)) __attribute__((__gnu_inline__))
__attribute__((__overloadable__)) __kernel_size_t
strnlen(const char *const __attribute__((__pass_dynamic_object_size__(1))) p,
__kernel_size_t maxlen)
{
const size_t p_size = __builtin_dynamic_object_size(p, 1);
const size_t p_len = ({
char *__p = (char *)(p);
size_t __ret = (~(size_t)0);
const size_t __p_size = __builtin_dynamic_object_size(p, 1);
if (__p_size != (~(size_t)0) && __builtin_constant_p(*__p)) {
size_t __p_len = __p_size - 1;
if (__builtin_constant_p(__p[__p_len]) &&
__p[__p_len] == '\0')
__ret = __builtin_strlen(__p);
}
__ret;
});
size_t ret;
if (__builtin_constant_p(maxlen) && p_len != (~(size_t)0)) {
if (maxlen >= p_size)
return p_len;
}
ret = __real_strnlen(p, maxlen < p_size ? maxlen : p_size);
if (p_size <= ret && maxlen != ret)
fortify_panic(__func__);
return ret;
}
extern inline __attribute__((__gnu_inline__))
__attribute__((patchable_function_entry(0, 0)))
__attribute__((__always_inline__)) __attribute__((__gnu_inline__))
__attribute__((__overloadable__))
__attribute__((__diagnose_as_builtin__(__builtin_strlen, 1))) __kernel_size_t
__fortify_strlen(const char *const
__attribute__((__pass_dynamic_object_size__(1))) p)
{
const size_t p_size = __builtin_dynamic_object_size(p, 1);
__kernel_size_t ret;
if (p_size == (~(size_t)0))
return __builtin_strlen(p);
ret = strnlen(p, p_size);
if (p_size <= ret)
fortify_panic(__func__);
return ret;
}
extern size_t __real_strlcpy(char *, const char *, size_t) __asm__("strlcpy");
extern inline __attribute__((__gnu_inline__))
__attribute__((patchable_function_entry(0, 0)))
__attribute__((__always_inline__)) __attribute__((__gnu_inline__))
__attribute__((__overloadable__)) size_t
strlcpy(char *const __attribute__((__pass_dynamic_object_size__(1))) p,
const char *const __attribute__((__pass_dynamic_object_size__(1))) q,
size_t size)
{
const size_t p_size = __builtin_dynamic_object_size(p, 1);
const size_t q_size = __builtin_dynamic_object_size(q, 1);
size_t q_len;
size_t len;
if (p_size == (~(size_t)0) && q_size == (~(size_t)0))
return __real_strlcpy(p, q, size);
q_len = __builtin_choose_expr(
(sizeof(int) ==
sizeof(*(8 ? ((void *)((long)(__builtin_strlen(q)) * 0l)) :
(int *)8))),
__builtin_strlen(q), __fortify_strlen(q));
len = (q_len >= size) ? size - 1 : q_len;
if (__builtin_constant_p(size) && __builtin_constant_p(q_len) && size) {
if (len >= p_size)
__write_overflow();
}
if (size) {
if (len >= p_size)
fortify_panic(__func__);
__builtin_memcpy(p, q, len);
p[len] = '\0';
}
return q_len;
}
void fortify_memset_chk(__kernel_size_t, size_t, size_t);
void do_fortify_tests(void);
struct fortify_object {
int a;
char buf[16];
int c;
};
const char small_src[16] = "AAAAAAAAAAAAAAA";
const char large_src[32] = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
char small[16];
char large[32];
struct fortify_object instance;
size_t size;
void do_fortify_tests(void)
{
({
size_t __fortify_size = (size_t)(sizeof(instance));
fortify_memset_chk(__fortify_size,
__builtin_dynamic_object_size(&instance, 0),
__builtin_dynamic_object_size(&instance, 1)),
__builtin_memset(&instance, 0x32, __fortify_size);
});
({
size_t __fortify_size = (size_t)(sizeof(small));
fortify_memset_chk(__fortify_size,
__builtin_dynamic_object_size(small, 0),
__builtin_dynamic_object_size(small, 1)),
__builtin_memset(small, 0xA5, __fortify_size);
});
({
size_t __fortify_size = (size_t)(sizeof(large));
fortify_memset_chk(__fortify_size,
__builtin_dynamic_object_size(large, 0),
__builtin_dynamic_object_size(large, 1)),
__builtin_memset(large, 0x5A, __fortify_size);
});
strlcpy(instance.buf, large_src, sizeof(instance.buf) + 1);
} Which makes it no longer strictly a LoongArch problem (although I think the use of
One of the reproducers |
Yeah, If I add: len = (q_len >= size) ? size - 1 : q_len;
+ if (__builtin_constant_p(q_len))
+ __write_overflow();
if (__builtin_constant_p(size) && __builtin_constant_p(q_len) && size) { in |
Hm, I'm not super excited about trying to make FORTIFY work perfectly on |
I'll attempt to just remove that Update: apparently removing it doesn't affect operation at all. I'll put up the patch shortly... |
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). As it turns out to be the case, removing the flag does not impact the LoongArch kernel's normal operation at all; so just remove it to restore expected libcall semantics globally on this architecture. Closes: ClangBuiltLinux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). As it turns out to be the case, only the memory operations really need to be prevented from expansion by the compiler, and this is doable with finer-grained -fno-builtin-* toggles. So only disable memcpy, memmove and memset, while leaving other builtins enabled, to fix source fortification among others. Closes: ClangBuiltLinux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
v3: https://lore.kernel.org/[email protected]/ That change is tentatively in -next, where I do not see these warnings anymore. |
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
I think this is now fixed in mainline? https://git.kernel.org/linus/3f301dc292eb122eff61b8b2906e519154b0327f |
Yeah this is now mainlined, and I think this issue can be closed now. Thanks for your help! |
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Closes: ClangBuiltLinux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexpected things such as CONFIG_FORTIFY_SOURCE not working (!). However, due to the desire for better control over unaligned accesses with respect to CONFIG_ARCH_STRICT_ALIGN, and also for avoiding the GCC bug https://gcc.gnu.org/PR109465, we do want to still disable optimizations for the memory libcalls (memcpy, memmove and memset for now). Use finer-grained -fno-builtin-* toggles to achieve this without losing source fortification and other libcall optimizations. Change-Id: I1ab73f976e878c13ea2a593137cd8533b3970846 Closes: ClangBuiltLinux/linux#1897 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
When building
ARCH=loongarch allyesconfig
with the known bad configurations disabled, I see some warnings from the fortify tests thatstrcpy()
andstrlcpy()
do not have a fortify check when they should:I don't see any warnings with GCC 13.1.0 but I also do not see these warnings with any other architecture, which is interesting. It is possible there is some bug on the toolchain side or something about the tests that allows LoongArch to avoid the checks? I'll see if I can gather more information on Monday.
cc @kees @xen0n
The text was updated successfully, but these errors were encountered: