2 * SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes, unsigned int flags)
3 * SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags, loff_t offset, loff_t nbytes)
15 static void sanitise_sync_file_range(int childno
)
22 off
= rand64() & 0x0fffffffffffffffUL
;
23 nbytes
= rand64() & 0x0fffffffffffffffUL
;
24 endbyte
= off
+ nbytes
;
28 if (off
>= (0x100000000LL
<< PAGE_SHIFT
))
31 if (this_syscallname("sync_file_range2", childno
) == FALSE
) {
32 shm
->syscall
[childno
].a2
= off
;
33 shm
->syscall
[childno
].a3
= nbytes
;
35 shm
->syscall
[childno
].a3
= off
;
36 shm
->syscall
[childno
].a4
= nbytes
;
40 struct syscallentry syscall_sync_file_range
= {
41 .name
= "sync_file_range",
43 .sanitise
= sanitise_sync_file_range
,
53 .values
= { SYNC_FILE_RANGE_WAIT_BEFORE
, SYNC_FILE_RANGE_WRITE
, SYNC_FILE_RANGE_WAIT_AFTER
},
60 * ARM & PowerPC have different argument order.
61 * See edd5cd4a9424f22b0fa08bef5e299d41befd5622 in kernel tree.
63 struct syscallentry syscall_sync_file_range2
= {
64 .name
= "sync_file_range2",
66 .sanitise
= sanitise_sync_file_range
,
73 .values
= { SYNC_FILE_RANGE_WAIT_BEFORE
, SYNC_FILE_RANGE_WRITE
, SYNC_FILE_RANGE_WAIT_AFTER
},