Re: [PATCH RFC bpf-next v1 4/4] selftests/bpf: Add selftests for load-acquire and store-release instructions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> --- /dev/null
> +++ b/tools/testing/selftests/bpf/verifier/atomic_load.c
> @@ -0,0 +1,71 @@
> +{
> +	"BPF_ATOMIC load-acquire, 8-bit",
> +	.insns = {
> +		BPF_MOV64_IMM(BPF_REG_0, 0),
> +		/* Write 1 to stack. */
                         ~
                /* Write 0x12 to stack. */
                         ~~~~
> +		BPF_ST_MEM(BPF_B, BPF_REG_10, -1, 0x12),
> +		/* Load-acquire it from stack to R1. */
> +		BPF_ATOMIC_OP(BPF_B, BPF_LOAD_ACQ, BPF_REG_1, BPF_REG_10, -1),
> +		/* Check loaded value is 0x12. */

Will be fixed in the next version.

Thanks,
Peilin Ye





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux