RISCV: Activate UBSAN in testing

RISC-V has less complicated headers, so update ubsan.c to pull in everything
it needs.  Provide dump_execution_state(), and update the printk() message to
make it more obvious that it's an outstanding task.

As with commit 8ef2ac727e ("automation: enable UBSAN for debug tests"),
enable UBSAN in RISC-V testing too.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
Andrew Cooper committed 2025-02-10 23:40:12 +00:00
1 parent 99fe58e81b
commit 227e68a9bf
5 files changed
+11 -2

No files matched your search

+3
View File
@@ -359,6 +359,9 @@ debian-12-riscv64-gcc-debug:
CONTAINER: debian:12-riscv64
KBUILD_DEFCONFIG: tiny64_defconfig
HYPERVISOR_ONLY: y
EXTRA_XEN_CONFIG: |
CONFIG_UBSAN=y
CONFIG_UBSAN_FATAL=y
# Arm32 cross-build
+1
View File
@@ -4,6 +4,7 @@ config RISCV
select GENERIC_BUG_FRAME
select HAS_DEVICE_TREE
select HAS_PMAP
select HAS_UBSAN
select HAS_VMAP
config RISCV_64
+2
View File
@@ -91,6 +91,8 @@ static inline void sfence_vma(void)
asm volatile ( "sfence.vma" ::: "memory" );
}
#define dump_execution_state() run_in_exception_handler(show_execution_state)
#endif /* __ASSEMBLY__ */
#endif /* ASM__RISCV__PROCESSOR_H */
+1 -1
View File
@@ -140,7 +140,7 @@ void vcpu_show_execution_state(struct vcpu *v)
void show_execution_state(const struct cpu_user_regs *regs)
{
printk("implement show_execution_state(regs)\n");
printk("TODO: Implement show_execution_state(regs)\n");
}
void arch_hypercall_tasklet_result(struct vcpu *v, long res)
+4 -1
View File
@@ -10,8 +10,11 @@
*
*/
#include <xen/spinlock.h>
#include <xen/bitops.h>
#include <xen/kernel.h>
#include <xen/lib.h>
#include <xen/percpu.h>
#include <xen/spinlock.h>
#define __noreturn noreturn
#define pr_err(...) printk(XENLOG_ERR __VA_ARGS__)
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.