riscv: selftests: Fix warnings pointer masking testWhen compiling the pointer masking tests with -Wall this warningis present:pointer_masking.c: In function ‘test_tagged_addr_abi_sysctl’:pointe
riscv: selftests: Fix warnings pointer masking testWhen compiling the pointer masking tests with -Wall this warningis present:pointer_masking.c: In function ‘test_tagged_addr_abi_sysctl’:pointer_masking.c:203:9: warning: ignoring return value of ‘pwrite’declared with attribute ‘warn_unused_result’ [-Wunused-result] 203 | pwrite(fd, &value, 1, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~ pointer_masking.c:208:9: warning:ignoring return value of ‘pwrite’ declared with attribute‘warn_unused_result’ [-Wunused-result] 208 | pwrite(fd, &value, 1, 0);I came across this on riscv64-linux-gnu-gcc (Ubuntu11.4.0-1ubuntu1~22.04).Fix this by checking that the number of bytes written equal the expectednumber of bytes written.Fixes: 7470b5afd150 ("riscv: selftests: Add a pointer masking test")Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>Reviewed-by: Andrew Jones <ajones@ventanamicro.com>Link: https://lore.kernel.org/r/20241211-fix_warnings_pointer_masking_tests-v6-1-c7ae708fbd2f@rivosinc.comSigned-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
riscv: selftests: Add a pointer masking testThis test covers the behavior of the PR_SET_TAGGED_ADDR_CTRL andPR_GET_TAGGED_ADDR_CTRL prctl() operations, their effects on theuserspace ABI, and thei
riscv: selftests: Add a pointer masking testThis test covers the behavior of the PR_SET_TAGGED_ADDR_CTRL andPR_GET_TAGGED_ADDR_CTRL prctl() operations, their effects on theuserspace ABI, and their effects on the system call ABI.Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>Tested-by: Charlie Jenkins <charlie@rivosinc.com>Signed-off-by: Samuel Holland <samuel.holland@sifive.com>Link: https://lore.kernel.org/r/20241016202814.4061541-8-samuel.holland@sifive.comSigned-off-by: Palmer Dabbelt <palmer@rivosinc.com>