lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241106162342.3c44a8e9@gandalf.local.home>
Date: Wed, 6 Nov 2024 16:23:42 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Marco Elver <elver@...gle.com>
Cc: Kees Cook <keescook@...omium.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Oleg Nesterov <oleg@...hat.com>,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Dmitry
 Vyukov <dvyukov@...gle.com>, kasan-dev@...glegroups.com
Subject: Re: [PATCH] tracing: Add task_prctl_unknown tracepoint

On Wed, 6 Nov 2024 19:12:42 +0100
Marco Elver <elver@...gle.com> wrote:

> No other events should be traced. This is the test program I've used:
> 
> 	#include <sys/prctl.h>
> 	#include <unistd.h>
> 
> 	int main(int argc, char *argv[])
> 	{
> 	  prctl(1234, 101, 102, 103, 104);
> 	  if (argc > 1)
> 	    usleep(1000);
> 	  return 0;
> 	}
> 
> Kernel config is x86_64 default + CONFIG_FUNCTION_TRACER=y +
> CONFIG_FTRACE_SYSCALLS=y. For the test, once booted all I do is:
> 
> 	% echo 1 > /sys/kernel/debug/tracing/events/task/task_prctl_unknown/enable
> 	% cat /sys/kernel/debug/tracing/trace_pipe
> 	... wait for output ...
> 
> That's pretty much it. I've attached my kernel config just in case I
> missed something.

OK, it's because you are using trace_pipe (which by the way should not be
used for anything serious). The read of trace_pipe flushes the buffer
before the task is scheduled out and the comm saved, so it prints the
"<...>". If you instead do the cat of trace_pipe *after* running the
command, you'll see the comm.

So this is just because you are using the obsolete trace_pipe.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ