Skip to contentSkip to conversation

tracing: Fixes for v6.6-rc3

GIT PULL Merged Steven Rostedt 2 participants 2 messages Sep 30, 2023 – Oct 1, 2023

Subsystems (2)
lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

Beau Belgrave <[email protected]>, Clément Léger <[email protected]>

Linus,

Tracing fixes for v6.6-rc3:

- Make sure 32 bit applications using user events have aligned access when running on a 64 bit kernel.

- Add cond_resched in the loop that handles converting enums in print_fmt string is trace events.

- Fix premature wake ups of polling processes in the tracing ring buffer. When a task polls waiting for a percentage of the ring buffer to be filled, the writer still will wake it up at every event. Add the polling's percentage to the "shortest_full" list to tell the writer when to wake it up.

- For eventfs dir lookups on dynamic events, an event system's only event could be removed, leaving its dentry with no children. This is totally legitimate. But in eventfs_release() it must not access the children array, as it is only allocated when the dentry has children.

Please pull the latest trace-v6.6-rc3 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-v6.6-rc3

Tag SHA1: 805f65c2b5fbd7357e47a1808fcad8629dda9f07 Head SHA1: 2598bd3ca8dcf5bbca1161ee5b271b432398da37

Beau Belgrave (1):
tracing/user_events: Align set_bit() address for all archs

Clément Léger (1):
tracing: relax trace_event_eval_update() execution with cond_resched()

Steven Rostedt (Google) (2):
ring-buffer: Update "shortest_full" in polling
eventfs: Test for dentries array allocated in eventfs_release()

----

 fs/tracefs/event_inode.c         |  2 +-
 kernel/trace/ring_buffer.c       |  3 +++
 kernel/trace/trace_events.c      |  1 +
 kernel/trace/trace_events_user.c | 58 +++++++++++++++++++++++++++++++++++-----
 4 files changed, 56 insertions(+), 8 deletions(-)

---------------------------

fs/tracefs/event_inode.c +1 -1
index 5f1714089884..8c8d64e76103 100644
@@ -421,7 +421,7 @@ static int eventfs_release(struct inode *inode, struct file *file)
 	if (WARN_ON_ONCE(!dlist))
 		return -EINVAL;
 
-	for (i = 0; dlist->dentries[i]; i++) {
+	for (i = 0; dlist->dentries && dlist->dentries[i]; i++) {
 		dput(dlist->dentries[i]);
 	}
 
kernel/trace/ring_buffer.c +3 -0
index 28daf0ce95c5..515cafdb18d9 100644
@@ -1137,6 +1137,9 @@ __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
 	if (full) {
 		poll_wait(filp, &work->full_waiters, poll_table);
 		work->full_waiters_pending = true;
+		if (!cpu_buffer->shortest_full ||
+		    cpu_buffer->shortest_full > full)
+			cpu_buffer->shortest_full = full;
 	} else {
 		poll_wait(filp, &work->waiters, poll_table);
 		work->waiters_pending = true;
kernel/trace/trace_events.c +1 -0
index 91951d038ba4..f49d6ddb6342 100644
@@ -2770,6 +2770,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)
 				update_event_fields(call, map[i]);
 			}
 		}
+		cond_resched();
 	}
 	up_write(&trace_event_sem);
 }
kernel/trace/trace_events_user.c +51 -7

131 lines not on this page · raw message

merge bot Merged
#1 lore raw
The pull request you sent on Sat, 30 Sep 2023 16:47:07 -0400:

The pull request you sent on Sat, 30 Sep 2023 16:47:07 -0400:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v6.6-rc3

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3b347e403210c63d0ba01adf7530da08bc2929f9

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html