Enhance quotactl decoding

* quota.c (sys_quotactl): Decode 2nd syscall argument using printpath.
* pathtrace.c (pathtrace_match): Add quotactl support.
* linux/*/syscallent.h: Add TF flag to quotactl entry.
This commit is contained in:
Дмитрий Левин 2012-10-26 23:43:13 +00:00
parent d8d3bd3709
commit 7943966f6c
22 changed files with 34 additions and 28 deletions

View File

@ -58,7 +58,7 @@
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 60 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 3, TD, sys_lseek, "lseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */

View File

@ -174,7 +174,7 @@
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 5, 0, printargs, "osf_old_killpg" }, /* 146, not implemented */
{ 0, 0, sys_setsid, "setsid" }, /* 147 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 148 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 148 */
{ 5, 0, printargs, "osf_oldquota" }, /* 149, not implemented */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ 5, 0, NULL, NULL }, /* 151 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -142,7 +142,7 @@
{ 0, TP, sys_vfork, "vfork" }, /* 114 */
{ 3, 0, sys_init_module, "init_module" }, /* 115 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 116 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 117 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 117 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 118 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 119 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 120 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -133,7 +133,7 @@
{ 4, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -925,7 +925,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 1134 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 1135 */
{ 5, 0, sys_query_module, "query_module" }, /* 1136 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 1137 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 1137 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 1138 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 1139 */
{ 1, 0, sys_personality, "personality" }, /* 1140 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -1141,7 +1141,7 @@
{ 0, TM, printargs, "sysv_madvise" }, /* 1138 */
{ 0, 0, printargs, "sysv_pagelock" }, /* 1139 */
{ 0, 0, printargs, "sysv_getpagesize" }, /* 1140 */
{ 0, 0, printargs, "sysv_quotactl" }, /* 1141 */
{ 0, TF, printargs, "sysv_quotactl" }, /* 1141 */
{ 0, 0, printargs, "sysv_libdetach" }, /* 1142 */
{ 0, 0, printargs, "sysv_BSDgetpgrp" }, /* 1143 */
{ 0, 0, printargs, "sysv_BSDsetpgrp" }, /* 1144 */
@ -2168,7 +2168,7 @@
{ 0, 0, printargs, "bsd43_getdomainname" }, /* 2165 */
{ 0, 0, printargs, "bsd43_setdomainname" }, /* 2166 */
{ 0, 0, printargs, "bsd43_pcfs_mount" }, /* 2167 */
{ 0, 0, printargs, "bsd43_quotactl" }, /* 2168 */
{ 0, TF, printargs, "bsd43_quotactl" }, /* 2168 */
{ 0, 0, printargs, "bsd43_oldexportfs" }, /* 2169 */
{ 0, 0, printargs, "bsd43_smount" }, /* 2170 */
{ 0, 0, printargs, "bsd43_mipshwconf" }, /* 2171 */
@ -4133,7 +4133,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 4128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 4129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 4130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 4131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 4131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 4132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 4133 */
{ 2, 0, sys_bdflush, "bdflush" }, /* 4134 */
@ -4481,7 +4481,7 @@
{ 0, 0, printargs, "o32_init_module" }, /* 4128 */
{ 0, 0, printargs, "o32_delete_module" }, /* 4129 */
{ 0, 0, printargs, "o32_get_kernel_syms"}, /* 4130 */
{ 0, 0, printargs, "o32_quotactl" }, /* 4131 */
{ 0, TF, printargs, "o32_quotactl" }, /* 4131 */
{ 0, 0, printargs, "o32_getpgid" }, /* 4132 */
{ 0, 0, printargs, "o32_fchdir" }, /* 4133 */
{ 0, 0, printargs, "o32_bdflush" }, /* 4134 */
@ -5525,7 +5525,7 @@
{ 1, 0, sys_delete_module, "delete_module" }, /* 5169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 5170 */
{ 5, 0, sys_query_module, "query_module" }, /* 5171 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 5172 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 5172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 5173 */
{ 5, TN, printargs, "getpmsg" }, /* 5174 */
{ 5, TN, printargs, "putpmsg" }, /* 5175 */
@ -5832,7 +5832,7 @@
{ 0, 0, printargs, "n64_delete_module" }, /* 5169 */
{ 0, 0, printargs, "n64_get_kernel_syms" }, /* 5170 */
{ 0, 0, printargs, "n64_query_module" }, /* 5171 */
{ 0, 0, printargs, "n64_quotactl" }, /* 5172 */
{ 0, TF, printargs, "n64_quotactl" }, /* 5172 */
{ 0, 0, printargs, "n64_nfsservctl" }, /* 5173 */
{ 0, 0, printargs, "n64_getpmsg" }, /* 5174 */
{ 0, 0, printargs, "n64_putpmsg" }, /* 5175 */
@ -6836,7 +6836,7 @@
{ 1, 0, sys_delete_module, "delete_module" }, /* 6169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 6170 */
{ 5, 0, sys_query_module, "query_module" }, /* 6171 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 6172 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 6172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 6173 */
{ 5, TN, printargs, "getpmsg" }, /* 6174 */
{ 5, TN, printargs, "putpmsg" }, /* 6175 */
@ -7149,7 +7149,7 @@
{ 0, 0, printargs, "n32_delete_module" }, /* 6169 */
{ 0, 0, printargs, "n32_get_kernel_syms" }, /* 6170 */
{ 0, 0, printargs, "n32_query_module" }, /* 6171 */
{ 0, 0, printargs, "n32_quotactl" }, /* 6172 */
{ 0, TF, printargs, "n32_quotactl" }, /* 6172 */
{ 0, 0, printargs, "n32_nfsservctl" }, /* 6173 */
{ 0, 0, printargs, "n32_getpmsg" }, /* 6174 */
{ 0, 0, printargs, "n32_putpmsg" }, /* 6175 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -159,7 +159,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -158,7 +158,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -159,7 +159,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */

View File

@ -163,7 +163,7 @@
{ 2, 0, printargs, "getdomainname" }, /* 162 */
{ 2, 0, sys_setdomainname,"setdomainname" }, /* 163 */
{ 5, 0, printargs, "utrap_install" }, /* 164 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 165 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 165 */
{ 1, 0, sys_set_tid_address,"set_tid_address" }, /* 166 */
{ 5, TF, sys_mount, "mount" }, /* 167 */
{ 2, 0, sys_ustat, "ustat" }, /* 168 */

View File

@ -131,7 +131,7 @@
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 130 */
{ 3, 0, sys_init_module, "init_module" }, /* 131 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 132 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 133 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 133 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 134 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 135 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 136 */

View File

@ -177,7 +177,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
{ 1, 0, printargs, "64:get_kernel_syms" }, /* 177 */
{ 5, 0, printargs, "64:query_module" }, /* 178 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 179 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 179 */
{ 3, 0, printargs, "64:nfsservctl" }, /* 180 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */

View File

@ -177,7 +177,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 177 */
{ 5, 0, sys_query_module, "query_module" }, /* 178 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 179 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 179 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 180 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */

View File

@ -213,6 +213,12 @@ pathtrace_match(struct tcb *tcp)
upathmatch(tcp, tcp->u_arg[1]);
}
if (s->sys_func == sys_quotactl)
{
/* x, path */
return upathmatch(tcp, tcp->u_arg[1]);
}
if (s->sys_func == sys_renameat ||
s->sys_func == sys_linkat)
{

View File

@ -617,7 +617,7 @@ sys_quotactl(struct tcb *tcp)
tprints("|");
printxval(quotatypes, type, "???QUOTA");
tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
printpath(tcp, tcp->u_arg[1]);
tprints(", ");
switch (cmd) {
case Q_V1_QUOTAON: