[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fVjeDzJOGsDeVxtc=DFLpNPCi3KW4-3VkZENTkT=G6ZGg@mail.gmail.com>
Date: Thu, 20 Mar 2025 15:08:02 -0700
From: Ian Rogers <irogers@...gle.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman <eddyz87@...il.com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Mykyta Yatsenko <yatsenko@...a.com>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] libbpf: Add namespace for errstr making it libbpf_errstr
On Thu, Mar 20, 2025 at 2:37 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Thu, Mar 20, 2025 at 11:00 AM Ian Rogers <irogers@...gle.com> wrote:
> >
> > When statically linking symbols can be replaced with those from other
> > statically linked libraries depending on the link order and the hoped
> > for "multiple definition" error may not appear. To avoid conflicts it
> > is good practice to namespace symbols, this change renames errstr to
> > libbpf_errstr.
> >
> > Fixes: 1633a83bf993 ("libbpf: Introduce errstr() for stringifying errno")
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > ---
> > I feel like this patch shouldn't be strictly necessary, it turned out
> > for a use-case it was and people who know better than me say the
> > linker is working as intended. The conflicting errstr was from:
> > https://sourceforge.net/projects/linuxquota/
> > The fixes tag may not be strictly necessary.
> > ---
>
> sigh, I do like short errstr(). How about we avoid all this churn by
> naming the function libbpf_errstr() as you did, but then also
> defining:
>
> #define errstr(err) libbpf_errstr(err)
>
> and leaving all existing invocations as is
>
> ?
Works for me. I'll send a v2.
Thanks,
Ian
Powered by blists - more mailing lists