<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_events_user.c, branch v6.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-12T21:35:11Z</updated>
<entry>
<title>tracing/user_events: Fix syntax errors in comments</title>
<updated>2022-07-12T21:35:11Z</updated>
<author>
<name>Xiang wangx</name>
<email>wangxiang@cdjrlc.com</email>
</author>
<published>2022-06-06T02:30:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94c255ac676fa922df3498608ead42b0a0c85122'/>
<id>urn:sha1:94c255ac676fa922df3498608ead42b0a0c85122</id>
<content type='text'>
Delete the redundant word 'have'.

Link: https://lkml.kernel.org/r/20220606023007.23377-1-wangxiang@cdjrlc.com

Signed-off-by: Xiang wangx &lt;wangxiang@cdjrlc.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Move user_events.h temporarily out of include/uapi</title>
<updated>2022-04-02T12:40:10Z</updated>
<author>
<name>Steven Rostedt (Google)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2022-04-01T18:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cfff569cab8bf544bab62c911c5d6efd5af5e05'/>
<id>urn:sha1:5cfff569cab8bf544bab62c911c5d6efd5af5e05</id>
<content type='text'>
While user_events API is under development and has been marked for broken
to not let the API become fixed, move the header file out of the uapi
directory. This is to prevent it from being installed, then later changed,
and then have an old distro user space update with a new kernel, where
applications see the user_events being available, but the old header is in
place, and then they get compiled incorrectly.

Also, surround the include with CONFIG_COMPILE_TEST to the current
location, but when the BROKEN tag is taken off, it will use the uapi
directory, and fail to compile. This is a good way to remind us to move
the header back.

Link: https://lore.kernel.org/all/20220330155835.5e1f6669@gandalf.local.home
Link: https://lkml.kernel.org/r/20220330201755.29319-1-mathieu.desnoyers@efficios.com
Link: https://lkml.kernel.org/r/20220401143903.188384f3@gandalf.local.home

Suggested-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/user_events: Remove eBPF interfaces</title>
<updated>2022-04-02T12:40:09Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-03-29T17:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=768c1e7f1de03afd0b55e0e951efc272309eeb52'/>
<id>urn:sha1:768c1e7f1de03afd0b55e0e951efc272309eeb52</id>
<content type='text'>
Remove eBPF interfaces within user_events to ensure they are fully
reviewed.

Link: https://lore.kernel.org/all/20220329165718.GA10381@kbox/
Link: https://lkml.kernel.org/r/20220329173051.10087-1-beaub@linux.microsoft.com

Suggested-by: Alexei Starovoitov &lt;alexei.starovoitov@gmail.com&gt;
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/user_events: Hold event_mutex during dyn_event_add</title>
<updated>2022-04-02T12:40:09Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-03-28T22:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=efe34e99fc41ad2b3fd3bbe79ecd3906620ec961'/>
<id>urn:sha1:efe34e99fc41ad2b3fd3bbe79ecd3906620ec961</id>
<content type='text'>
Make sure the event_mutex is properly held during dyn_event_add call.
This is required when adding dynamic events.

Link: https://lkml.kernel.org/r/20220328223225.1992-1-beaub@linux.microsoft.com

Reported-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>user_events: Add trace event call as root for low permission cases</title>
<updated>2022-03-15T18:33:20Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-03-08T22:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=089331d47325d3f55016ed3d1f79ffd2754fb19e'/>
<id>urn:sha1:089331d47325d3f55016ed3d1f79ffd2754fb19e</id>
<content type='text'>
Tracefs by default is locked down heavily. System operators can open up
some files, such as user_events to a broader set of users. These users
do not have access within tracefs beyond just the user_event files. Due
to this restriction the trace_add_event_call/remove calls will silently
fail since the caller does not have permissions to create directories.

To fix this trace_add_event_call/remove calls will be issued with
override creds of the global root UID. Creds are reverted immediately
afterward.

Link: https://lkml.kernel.org/r/20220308222807.2040-1-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/user_events: Use alloc_pages instead of kzalloc() for register pages</title>
<updated>2022-03-11T23:59:57Z</updated>
<author>
<name>Steven Rostedt (Google)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2022-03-11T23:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc47ee4844d6b7d7351536cd99d35848c4449689'/>
<id>urn:sha1:bc47ee4844d6b7d7351536cd99d35848c4449689</id>
<content type='text'>
kzalloc virtual addresses do not work with SetPageReserved, use the actual
page virtual addresses instead via alloc_pages.

The issue is reported when booting with user_events and
DEBUG_VM_PGFLAGS=y.

Also make the number of events based on the ORDER.

Link: https://lore.kernel.org/all/CADYN=9+xY5Vku3Ws5E9S60SM5dCFfeGeRBkmDFbcxX0ZMoFing@mail.gmail.com/
Link: https://lore.kernel.org/all/20220311223028.1865-1-beaub@linux.microsoft.com/

Cc: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Reported-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>user_events: Prevent dyn_event delete racing with ioctl add/delete</title>
<updated>2022-03-11T16:49:24Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-03-10T00:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e348b325bc40eb52aead4d57a1f90d33ea834fc'/>
<id>urn:sha1:7e348b325bc40eb52aead4d57a1f90d33ea834fc</id>
<content type='text'>
Find user_events always while under the event_mutex and before leaving
the lock, add a ref count to the user_event. This ensures that all paths
under the event_mutex that check the ref counts will be synchronized.

The ioctl add/delete paths are protected by the reg_mutex. However,
dyn_event is only protected by the event_mutex. The dyn_event delete
path cannot acquire reg_mutex, since that could cause a deadlock between
the ioctl delete case acquiring event_mutex after acquiring the reg_mutex.

Link: https://lkml.kernel.org/r/20220310001141.1660-1-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>user_events: Fix potential uninitialized pointer while parsing field</title>
<updated>2022-03-10T22:41:18Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-02-24T18:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=173c2049d12b441b498d6423276f5dd76b1e637b'/>
<id>urn:sha1:173c2049d12b441b498d6423276f5dd76b1e637b</id>
<content type='text'>
Ensure name is initialized by default to NULL to prevent possible edge
cases that could lead to it being left uninitialized. Add an explicit
check for NULL name to ensure edge boundaries.

Link: https://lore.kernel.org/bpf/20220224105334.GA2248@kili/
Link: https://lore.kernel.org/linux-trace-devel/20220224181637.2129-1-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>user_events: Validate user payloads for size and null termination</title>
<updated>2022-02-11T03:37:38Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-01-18T20:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2467cda1b5c97a58776a8aebfa5d76543e47479d'/>
<id>urn:sha1:2467cda1b5c97a58776a8aebfa5d76543e47479d</id>
<content type='text'>
Add validation to ensure data is at or greater than the min size for the
fields of the event. If a dynamic array is used and is a type of char,
ensure null termination of the array exists.

Link: https://lkml.kernel.org/r/20220118204326.2169-7-beaub@linux.microsoft.com

Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>user_events: Optimize writing events by only copying data once</title>
<updated>2022-02-11T03:37:31Z</updated>
<author>
<name>Beau Belgrave</name>
<email>beaub@linux.microsoft.com</email>
</author>
<published>2022-01-18T20:43:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0279400ad38d858ed68f5d787385f6122d4170b2'/>
<id>urn:sha1:0279400ad38d858ed68f5d787385f6122d4170b2</id>
<content type='text'>
Pass iterator through to probes to allow copying data directly to the
probe buffers instead of taking multiple copies. Enables eBPF user and
raw iterator types out to programs for no-copy scenarios.

Link: https://lkml.kernel.org/r/20220118204326.2169-6-beaub@linux.microsoft.com

Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
