base.c (356d71e00d278d865f8c7f68adebd6ce4698a7e2) base.c (631b7abacd02b88f4b0795c08b54ad4fc3e7c7c0)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/proc/base.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 *
7 * proc base directory handling functions
8 *

--- 602 unchanged lines hidden (view full) ---

611
612 return 0;
613}
614
615#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
616static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
617 struct pid *pid, struct task_struct *task)
618{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/proc/base.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 *
7 * proc base directory handling functions
8 *

--- 602 unchanged lines hidden (view full) ---

611
612 return 0;
613}
614
615#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
616static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
617 struct pid *pid, struct task_struct *task)
618{
619 long nr;
620 unsigned long args[6], sp, pc;
619 struct syscall_info info;
620 u64 *args = &info.data.args[0];
621 int res;
622
623 res = lock_trace(task);
624 if (res)
625 return res;
626
621 int res;
622
623 res = lock_trace(task);
624 if (res)
625 return res;
626
627 if (task_current_syscall(task, &nr, args, 6, &sp, &pc))
627 if (task_current_syscall(task, &info))
628 seq_puts(m, "running\n");
628 seq_puts(m, "running\n");
629 else if (nr < 0)
630 seq_printf(m, "%ld 0x%lx 0x%lx\n", nr, sp, pc);
629 else if (info.data.nr < 0)
630 seq_printf(m, "%d 0x%llx 0x%llx\n",
631 info.data.nr, info.sp, info.data.instruction_pointer);
631 else
632 seq_printf(m,
632 else
633 seq_printf(m,
633 "%ld 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
634 nr,
634 "%d 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx\n",
635 info.data.nr,
635 args[0], args[1], args[2], args[3], args[4], args[5],
636 args[0], args[1], args[2], args[3], args[4], args[5],
636 sp, pc);
637 info.sp, info.data.instruction_pointer);
637 unlock_trace(task);
638
639 return 0;
640}
641#endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
642
643/************************************************************************/
644/* Here the fs part begins */

--- 3037 unchanged lines hidden ---
638 unlock_trace(task);
639
640 return 0;
641}
642#endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
643
644/************************************************************************/
645/* Here the fs part begins */

--- 3037 unchanged lines hidden ---