[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7ch_mWUQGW8G221bZmCPn3wB2mjZm=ZdmhDkczhich9xZA@mail.gmail.com>
Date: Mon, 26 Jun 2023 14:31:39 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Matthieu Baerts <matthieu.baerts@...sares.net>
Cc: David Howells <dhowells@...hat.com>, netdev@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Jens Axboe <axboe@...nel.dk>,
Matthew Wilcox <willy@...radead.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, bpf@...r.kernel.org,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] tools: Fix MSG_SPLICE_PAGES build error in trace tools
Hello,
Sorry I missed the conversation and the original change.
On Mon, Jun 26, 2023 at 6:56 AM Matthieu Baerts
<matthieu.baerts@...sares.net> wrote:
>
> On 26/06/2023 15:50, David Howells wrote:
> > Matthieu Baerts <matthieu.baerts@...sares.net> wrote:
> >
> >> So another issue. When checking the differences between the two files, I
> >> see there are still also other modifications to import, e.g. it looks
> >> like you also added MSG_INTERNAL_SENDMSG_FLAGS macro in socket.h. Do you
> >> plan to fix that too?
> >
> > That's just a list of other flags that we need to prevent userspace passing
> > in - it's not a flag in its own right.
>
> I agree. This file is not even used by C files, only by scripts parsing
> it if I'm not mistaken.
>
> But if there are differences with include/linux/socket.h, the warning I
> mentioned will be visible when compiling Perf.
Right, we want to keep the headers files in the tools in sync with
the kernel ones. And they are used to generate some tables.
Full explanation from Arnaldo below.
So I'm ok for the msg_flags.c changes, but please refrain from
changing the header directly. We will update it later.
With that,
Acked-by: Namhyung Kim <namhyung@...nel.org>
Also I wonder if the tool needs to keep the original flag
(SENDPAGE_NOTLAST) for the older kernels.
In Arnaldo's explanation:
There used to be no copies, with tools/ code using kernel headers
directly. From time to time tools/perf/ broke due to legitimate kernel
hacking. At some point Linus complained about such direct usage. Then we
adopted the current model.
The way these headers are used in perf are not restricted to just
including them to compile something.
They are sometimes used in scripts that convert defines into string
tables, etc, so some change may break one of these scripts, or new MSRs
may use some different #define pattern, etc.
E.g.:
$ ls -1 tools/perf/trace/beauty/*.sh | head -5
tools/perf/trace/beauty/arch_errno_names.sh
tools/perf/trace/beauty/drm_ioctl.sh
tools/perf/trace/beauty/fadvise.sh
tools/perf/trace/beauty/fsconfig.sh
tools/perf/trace/beauty/fsmount.sh
$
$ tools/perf/trace/beauty/fadvise.sh
static const char *fadvise_advices[] = {
[0] = "NORMAL",
[1] = "RANDOM",
[2] = "SEQUENTIAL",
[3] = "WILLNEED",
[4] = "DONTNEED",
[5] = "NOREUSE",
};
$
The tools/perf/check-headers.sh script, part of the tools/ build
process, points out changes in the original files.
So its important not to touch the copies in tools/ when doing changes in
the original kernel headers, that will be done later, when
check-headers.sh inform about the change to the perf tools hackers.
Powered by blists - more mailing lists