diff options
-rw-r--r-- | fs/proc/base.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 4b74dba69a6d..81bce6791bfc 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -509,6 +509,26 @@ static int proc_pid_limits(struct task_struct *task, char *buffer) | |||
509 | return count; | 509 | return count; |
510 | } | 510 | } |
511 | 511 | ||
512 | #ifdef CONFIG_HAVE_ARCH_TRACEHOOK | ||
513 | static int proc_pid_syscall(struct task_struct *task, char *buffer) | ||
514 | { | ||
515 | long nr; | ||
516 | unsigned long args[6], sp, pc; | ||
517 | |||
518 | if (task_current_syscall(task, &nr, args, 6, &sp, &pc)) | ||
519 | return sprintf(buffer, "running\n"); | ||
520 | |||
521 | if (nr < 0) | ||
522 | return sprintf(buffer, "%ld 0x%lx 0x%lx\n", nr, sp, pc); | ||
523 | |||
524 | return sprintf(buffer, | ||
525 | "%ld 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n", | ||
526 | nr, | ||
527 | args[0], args[1], args[2], args[3], args[4], args[5], | ||
528 | sp, pc); | ||
529 | } | ||
530 | #endif /* CONFIG_HAVE_ARCH_TRACEHOOK */ | ||
531 | |||
512 | /************************************************************************/ | 532 | /************************************************************************/ |
513 | /* Here the fs part begins */ | 533 | /* Here the fs part begins */ |
514 | /************************************************************************/ | 534 | /************************************************************************/ |
@@ -2478,6 +2498,9 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2478 | #ifdef CONFIG_SCHED_DEBUG | 2498 | #ifdef CONFIG_SCHED_DEBUG |
2479 | REG("sched", S_IRUGO|S_IWUSR, pid_sched), | 2499 | REG("sched", S_IRUGO|S_IWUSR, pid_sched), |
2480 | #endif | 2500 | #endif |
2501 | #ifdef CONFIG_HAVE_ARCH_TRACEHOOK | ||
2502 | INF("syscall", S_IRUSR, pid_syscall), | ||
2503 | #endif | ||
2481 | INF("cmdline", S_IRUGO, pid_cmdline), | 2504 | INF("cmdline", S_IRUGO, pid_cmdline), |
2482 | ONE("stat", S_IRUGO, tgid_stat), | 2505 | ONE("stat", S_IRUGO, tgid_stat), |
2483 | ONE("statm", S_IRUGO, pid_statm), | 2506 | ONE("statm", S_IRUGO, pid_statm), |
@@ -2810,6 +2833,9 @@ static const struct pid_entry tid_base_stuff[] = { | |||
2810 | #ifdef CONFIG_SCHED_DEBUG | 2833 | #ifdef CONFIG_SCHED_DEBUG |
2811 | REG("sched", S_IRUGO|S_IWUSR, pid_sched), | 2834 | REG("sched", S_IRUGO|S_IWUSR, pid_sched), |
2812 | #endif | 2835 | #endif |
2836 | #ifdef CONFIG_HAVE_ARCH_TRACEHOOK | ||
2837 | INF("syscall", S_IRUSR, pid_syscall), | ||
2838 | #endif | ||
2813 | INF("cmdline", S_IRUGO, pid_cmdline), | 2839 | INF("cmdline", S_IRUGO, pid_cmdline), |
2814 | ONE("stat", S_IRUGO, tid_stat), | 2840 | ONE("stat", S_IRUGO, tid_stat), |
2815 | ONE("statm", S_IRUGO, pid_statm), | 2841 | ONE("statm", S_IRUGO, pid_statm), |