[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <602770698.200731.1648742848915.JavaMail.zimbra@efficios.com>
Date: Thu, 31 Mar 2022 12:07:28 -0400 (EDT)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: rostedt <rostedt@...dmis.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Beau Belgrave <beaub@...ux.microsoft.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-trace-devel <linux-trace-devel@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, netdev <netdev@...r.kernel.org>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Michal Marek <michal.lkml@...kovi.net>,
ndesaulniers <ndesaulniers@...gle.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] tracing: do not export user_events uapi
----- On Mar 31, 2022, at 8:13 AM, rostedt rostedt@...dmis.org wrote:
> On Thu, 31 Mar 2022 16:29:30 +0900
> Masahiro Yamada <masahiroy@...nel.org> wrote:
>
>> Well, the intended usage of no-export-headers is to
>> cater to the UAPI supported by only some architectures.
>> We have kvm(_para).h here because not all architectures
>> support kvm.
>>
>> If you do not want to export the UAPI,
>> you should not put it in include/uapi/.
>>
>> After the API is finalized, you can move it to
>> include/uapi.
>
> So a little bit of background. I and a few others thought it was done, and
> pushed it to Linus. Then when it made it into his tree (and mentioned on
> LWN) it got a wider audience that had concerns. After they brought up those
> concerns, we agreed that this needs a bit more work. I was hoping not to do
> a full revert and simply marked the change for broken so that it can be
> worked on upstream with the wider audience. Linus appears to be fine with
> this approach, as he helped me with my "mark for BROKEN" patch.
>
> Mathieu's concern is that this header file could be used in older distros
> with newer kernels that have it implemented and added this to keep out of
> those older distros.
>
> The options to make Mathieu sleep better at night are:
>
> 1) this patch
>
> 2) move this file out of uapi.
I would be fine with this approach as well. This is simple enough:
git mv include/uapi/linux/user_events.h include/linux/
and:
diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index 8b3d241a31c2..823d7b09dcba 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -18,7 +18,7 @@
#include <linux/tracefs.h>
#include <linux/types.h>
#include <linux/uaccess.h>
-#include <uapi/linux/user_events.h>
+#include <linux/user_events.h>
#include "trace.h"
#include "trace_dynevent.h"
Including <linux/user_events.h> will continue to work even when the header is
moved to uapi in the future.
Thanks,
Mathieu
>
> 3) revert the entire thing.
>
> I really do not want to do #3 but I am willing to do 1 or 2.
>
> -- Steve
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Powered by blists - more mailing lists