2 * SYSCALL_DEFINE6(splice, int, fd_in, loff_t __user *, off_in,
3 int, fd_out, loff_t __user *, off_out,
4 size_t, len, unsigned int, flags)
11 # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
12 # define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
13 (but we may still block on the fd
14 we splice from/to). */
15 # define SPLICE_F_MORE 4 /* Expect more data. */
16 # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
18 static void sanitise_splice(int childno
)
20 if ((rand() % 10) < 3)
24 shm
->syscall
[childno
].a1
= shm
->pipe_fds
[rand() % MAX_PIPE_FDS
];
25 shm
->syscall
[childno
].a2
= 0;
29 shm
->syscall
[childno
].a3
= shm
->pipe_fds
[rand() % MAX_PIPE_FDS
];
30 shm
->syscall
[childno
].a4
= 0;
34 struct syscallentry syscall_splice
= {
40 .arg2type
= ARG_ADDRESS
,
43 .arg4name
= "off_out",
44 .arg4type
= ARG_ADDRESS
,
51 .values
= { SPLICE_F_MOVE
, SPLICE_F_NONBLOCK
, SPLICE_F_MORE
, SPLICE_F_GIFT
},
53 .sanitise
= sanitise_splice
,