note a leak that needs fixing eventually
[trinity.git] / syscalls / pwrite64.c
blobae5a90cd30d6ddbf684ba6573137a28a22d5d407
1 /*
2 * SYSCALL_DEFINE(pwrite64)(unsigned int fd, const char __user *buf, size_t count, loff_t po>
3 */
4 #include "random.h"
5 #include "sanitise.h"
6 #include "shm.h"
8 static void sanitise_pwrite64(int childno)
11 retry_pos:
12 if ((int) shm->syscall[childno].a4 < 0) {
13 shm->syscall[childno].a4 = rand64();
14 goto retry_pos;
18 struct syscallentry syscall_pwrite64 = {
19 .name = "pwrite64",
20 .num_args = 4,
21 .sanitise = sanitise_pwrite64,
22 .arg1name = "fd",
23 .arg1type = ARG_FD,
24 .arg2name = "buf",
25 .arg2type = ARG_ADDRESS,
26 .arg3name = "count",
27 .arg3type = ARG_LEN,
28 .arg4name = "pos",
29 .flags = NEED_ALARM,