[PATCH 2/2] riscv: kprobes: add nop and c.nop to the KUnit test
Nam Cao
namcao at linutronix.de
Wed Aug 19 04:58:09 PDT 2026
Xiaofeng Yuan <yuanxiaofeng at eswincomputing.com> writes:
> +SYM_FUNC_START(test_kprobes_nop)
> + .option push
> + .option norvc
> +test_kprobes_nop_addr:
> + nop
> + .option pop
> + li a0, KPROBE_TEST_MAGIC_LOWER
> + li a1, KPROBE_TEST_MAGIC_UPPER
I split the magic number into _LOWER and _UPPER because I wanted to
validate that two instructions in two different code paths are both
executed.
For this simple case, we can just use KPROBE_TEST_MAGIC.
Nam
More information about the linux-riscv
mailing list