Re: [PATCH 2/2] riscv: kprobes: add nop and c.nop to the KUnit test

Nam Cao <[email protected]>
Newsgroups org.infradead.lists.linux-riscv
Message-ID <[email protected]>
Xiaofeng Yuan <[email protected]> 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

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.