Skip to content

Commit 1cd927a

Browse files
rostedttorvalds
authored andcommitted
tracing: mark user_events as BROKEN
After being merged, user_events become more visible to a wider audience that have concerns with the current API. It is too late to fix this for this release, but instead of a full revert, just mark it as BROKEN (which prevents it from being selected in make config). Then we can work finding a better API. If that fails, then it will need to be completely reverted. To not have the code silently bitrot, still allow building it with COMPILE_TEST. And to prevent the uapi header from being installed, then later changed, and then have an old distro user space see the old version, move the header file out of the uapi directory. 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 Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 88e6c02 commit 1cd927a

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

kernel/trace/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@ config USER_EVENTS
767767
bool "User trace events"
768768
select TRACING
769769
select DYNAMIC_EVENTS
770+
depends on BROKEN || COMPILE_TEST # API needs to be straighten out
770771
help
771772
User trace events are user-defined trace events that
772773
can be used like an existing kernel trace event. User trace

kernel/trace/trace_events_user.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
#include <linux/tracefs.h>
1919
#include <linux/types.h>
2020
#include <linux/uaccess.h>
21+
/* Reminder to move to uapi when everything works */
22+
#ifdef CONFIG_COMPILE_TEST
23+
#include <linux/user_events.h>
24+
#else
2125
#include <uapi/linux/user_events.h>
26+
#endif
2227
#include "trace.h"
2328
#include "trace_dynevent.h"
2429

0 commit comments

Comments
 (0)