// 164
// NYI quotactl 165
// old exportfs
-// NYI mount 167
+DECL_TEMPLATE(darwin, mount); // 167
// old ustat
DECL_TEMPLATE(darwin, csops); // 169
// old table
}
}
+PRE(mount)
+{
+ // Nb: depending on 'flags', the 'type' and 'data' args may be ignored.
+ // We are conservative and check everything, except the memory pointed to
+ // by 'data'.
+ *flags |= SfMayBlock;
+ PRINT("sys_mount( %#lx(%s), %#lx(%s), %#lx, %#lx )",
+ ARG1,(Char*)ARG1, ARG2,(Char*)ARG2, ARG3, ARG4);
+ PRE_REG_READ4(long, "mount",
+ const char *, type, const char *, dir,
+ int, flags, void *, data);
+ PRE_MEM_RASCIIZ( "mount(type)", ARG1);
+ PRE_MEM_RASCIIZ( "mount(dir)", ARG2);
+}
+
static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList,
void *attrBuf, SizeT attrBufSize,
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(164)), // ???
// _____(__NR_quotactl),
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(166)), // old exportfs
-// _____(__NR_mount),
+ MACX_(__NR_mount, mount),
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(168)), // old ustat
MACXY(__NR_csops, csops), // code-signing ops
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(170)), // old table
// We are conservative and check everything, except the memory pointed to
// by 'data'.
*flags |= SfMayBlock;
- PRINT( "sys_mount( %#lx, %#lx, %#lx, %#lx, %#lx )" ,ARG1,ARG2,ARG3,ARG4,ARG5);
+ PRINT("sys_mount( %#lx(%s), %#lx(%s), %#lx(%s), %#lx, %#lx )",
+ ARG1,(Char*)ARG1, ARG2,(Char*)ARG2, ARG3,(Char*)ARG3, ARG4, ARG5);
PRE_REG_READ5(long, "mount",
char *, source, char *, target, char *, type,
unsigned long, flags, void *, data);
GO_UNIMP(166, "old exportfs");
- // __NR_mount 167
+ GO(__NR_mount, 167, "4s 2m");
+ SY(__NR_mount, x0, x0, x0, x0); FAIL;
GO_UNIMP(168, "old ustat");
(166): old exportfs
-----------------------------------------------------
-----------------------------------------------------
+x20000a7(167): __NR_mount 4s 2m
+-----------------------------------------------------
+
+Syscall param mount(type) contains uninitialised byte(s)
+ ...
+
+Syscall param mount(dir) contains uninitialised byte(s)
+ ...
+
+Syscall param mount(flags) contains uninitialised byte(s)
+ ...
+
+Syscall param mount(data) contains uninitialised byte(s)
+ ...
+
+Syscall param mount(type) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+Syscall param mount(dir) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
(168): old ustat
-----------------------------------------------------
-----------------------------------------------------
x2000113(275): __NR_sem_init 3s 1m
-----------------------------------------------------
+More than 100 errors detected. Subsequent errors
+will still be recorded, but in less detail than before.
+
Syscall param sem_init(sem) contains uninitialised byte(s)
...
x2000117(279): __NR_stat_extended 4s 4m
-----------------------------------------------------
-More than 100 errors detected. Subsequent errors
-will still be recorded, but in less detail than before.
-
Syscall param stat_extended(file_name) contains uninitialised byte(s)
...