Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d20b92ab authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

userns: Teach trace to use from_kuid



- When tracing capture the kuid.
- When displaying the data to user space convert the kuid into the
  user namespace of the process that opened the report file.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent f8f3d4de
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -927,7 +927,6 @@ config UIDGID_CONVERTED
	# Features
	depends on IMA = n
	depends on EVM = n
	depends on TRACING = n
	depends on FS_POSIX_ACL = n
	depends on QUOTA = n
	depends on QUOTACTL = n
+2 −1
Original line number Diff line number Diff line
@@ -2060,7 +2060,8 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
	seq_puts(m, "#    -----------------\n");
	seq_printf(m, "#    | task: %.16s-%d "
		   "(uid:%d nice:%ld policy:%ld rt_prio:%ld)\n",
		   data->comm, data->pid, data->uid, data->nice,
		   data->comm, data->pid,
		   from_kuid_munged(seq_user_ns(m), data->uid), data->nice,
		   data->policy, data->rt_priority);
	seq_puts(m, "#    -----------------\n");

+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ struct trace_array_cpu {
	unsigned long		skipped_entries;
	cycle_t			preempt_timestamp;
	pid_t			pid;
	uid_t			uid;
	kuid_t			uid;
	char			comm[TASK_COMM_LEN];
};