tests: fill higher bits of integer arguments of fcntl* syscalls
Check that integer arguments of fcntl and fcntl64 syscalls are decoded properly by casting them to kernel_ulong_t and filling higher bits. * tests/struct_flock.c (invoke_test_syscall): Cast "fd" and "cmd" syscall arguments to kernel_ulong_t, fill their higher 32 bits.
This commit is contained in:
parent
ec75764697
commit
1d5e810ce8
@ -44,9 +44,10 @@
|
||||
static long
|
||||
invoke_test_syscall(const unsigned int cmd, void *const p)
|
||||
{
|
||||
const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd;
|
||||
const kernel_ulong_t fd = F8ILL_KULONG_MASK;
|
||||
const kernel_ulong_t op = F8ILL_KULONG_MASK | cmd;
|
||||
|
||||
return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p);
|
||||
return syscall(TEST_SYSCALL_NR, fd, op, (unsigned long) p);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user