PPC: Activate UBSAN in testing

Also enable -fno-sanitize=alignment like x86 since support for unaligned
accesses is guaranteed by the ISA and the existing OPAL setup code
relies on it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
(cherry picked from commit 7cf163879c)
This commit is contained in:
Andrew Cooper committed 2025-02-26 14:54:46 +00:00
1 parent ac8198c532
commit 48c7aff2f4
5 files changed
+13 -1

No files matched your search

+3
View File
@@ -352,6 +352,9 @@ debian-12-ppc64le-gcc-debug:
CONTAINER: debian:12-ppc64le
KBUILD_DEFCONFIG: ppc64_defconfig
HYPERVISOR_ONLY: y
EXTRA_XEN_CONFIG: |
CONFIG_UBSAN=y
CONFIG_UBSAN_FATAL=y
debian-12-riscv64-gcc-debug:
extends: .gcc-riscv64-cross-build-debug
+1
View File
@@ -2,6 +2,7 @@ config PPC
def_bool y
select FUNCTION_ALIGNMENT_4B
select HAS_DEVICE_TREE
select HAS_UBSAN
select HAS_VMAP
config PPC64
+6
View File
@@ -7,3 +7,9 @@ CFLAGS += -m64 -mlittle-endian -mcpu=$(ppc-march-y)
CFLAGS += -mstrict-align -mcmodel=medium -mabi=elfv2 -fPIC -mno-altivec -mno-vsx -msoft-float
LDFLAGS += -m elf64lppc
ifeq ($(CONFIG_UBSAN),y)
# Don't enable alignment sanitisation since Power ISA guarantees hardware
# support for unaligned accesses.
$(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=alignment)
endif
+2
View File
@@ -219,6 +219,8 @@ static inline void noreturn die(void)
*/
#define cpu_relax() asm volatile ( "or %r1, %r1, %r1; or %r2, %r2, %r2" )
#define dump_execution_state() run_in_exception_handler(show_execution_state)
#endif /* __ASSEMBLY__ */
#endif /* _ASM_PPC_PROCESSOR_H */
+1 -1
View File
@@ -47,7 +47,7 @@ void send_timer_event(struct vcpu *v)
void show_execution_state(const struct cpu_user_regs *regs)
{
BUG_ON("unimplemented");
printk("TODO: Implement show_execution_state(regs)\n");
}
void arch_hypercall_tasklet_result(struct vcpu *v, long res)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.