* [PATCH] Revert "libbpf: Poison strlcpy()"
@ 2023-03-09 0:48 Jesus Sanchez-Palencia
2023-03-09 1:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 7+ messages in thread
From: Jesus Sanchez-Palencia @ 2023-03-09 0:48 UTC (permalink / raw)
To: bpf; +Cc: andrii, sdf, rongtao, daniel, jesussanp
This reverts commit 6d0c4b11e743("libbpf: Poison strlcpy()").
It added the pragma poison directive to libbpf_internal.h to protect
against accidental usage of strlcpy but ended up breaking the build for
toolchains based on libcs which provide the strlcpy() declaration from
string.h (e.g. uClibc-ng). The include order which causes the issue is:
string.h,
from Iibbpf_common.h:12,
from libbpf.h:20,
from libbpf_internal.h:26,
from strset.c:9:
Signed-off-by: Jesus Sanchez-Palencia <jesussanp@google.com>
---
tools/lib/bpf/libbpf_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
index fbaf68335394..e4d05662a96c 100644
--- a/tools/lib/bpf/libbpf_internal.h
+++ b/tools/lib/bpf/libbpf_internal.h
@@ -20,8 +20,8 @@
/* make sure libbpf doesn't use kernel-only integer typedefs */
#pragma GCC poison u8 u16 u32 u64 s8 s16 s32 s64
-/* prevent accidental re-addition of reallocarray()/strlcpy() */
-#pragma GCC poison reallocarray strlcpy
+/* prevent accidental re-addition of reallocarray() */
+#pragma GCC poison reallocarray
#include "libbpf.h"
#include "btf.h"
--
2.40.0.rc0.216.gc4246ad0f0-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 0:48 [PATCH] Revert "libbpf: Poison strlcpy()" Jesus Sanchez-Palencia
@ 2023-03-09 1:40 ` patchwork-bot+netdevbpf
2023-03-09 16:06 ` Jesus Sanchez-Palencia
0 siblings, 1 reply; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-09 1:40 UTC (permalink / raw)
To: Jesus Sanchez-Palencia; +Cc: bpf, andrii, sdf, rongtao, daniel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Wed, 8 Mar 2023 16:48:36 -0800 you wrote:
> This reverts commit 6d0c4b11e743("libbpf: Poison strlcpy()").
>
> It added the pragma poison directive to libbpf_internal.h to protect
> against accidental usage of strlcpy but ended up breaking the build for
> toolchains based on libcs which provide the strlcpy() declaration from
> string.h (e.g. uClibc-ng). The include order which causes the issue is:
>
> [...]
Here is the summary with links:
- Revert "libbpf: Poison strlcpy()"
https://git.kernel.org/bpf/bpf-next/c/3b83591e32dd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 1:40 ` patchwork-bot+netdevbpf
@ 2023-03-09 16:06 ` Jesus Sanchez-Palencia
2023-03-09 17:26 ` Andrii Nakryiko
0 siblings, 1 reply; 7+ messages in thread
From: Jesus Sanchez-Palencia @ 2023-03-09 16:06 UTC (permalink / raw)
To: andrii; +Cc: bpf, sdf, rongtao, daniel
On Wed, Mar 8, 2023 at 5:40 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
>
> Hello:
>
> This patch was applied to bpf/bpf-next.git (master)
> by Andrii Nakryiko <andrii@kernel.org>:
Andrii, are you planning to send this patch to 6.3-rc* since the build
is broken there?
Just double-checking since it was applied to bpf-next.
Thanks,
Jesus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 16:06 ` Jesus Sanchez-Palencia
@ 2023-03-09 17:26 ` Andrii Nakryiko
2023-03-09 17:31 ` Jesus Sanchez-Palencia
0 siblings, 1 reply; 7+ messages in thread
From: Andrii Nakryiko @ 2023-03-09 17:26 UTC (permalink / raw)
To: Jesus Sanchez-Palencia; +Cc: andrii, bpf, sdf, rongtao, daniel
On Thu, Mar 9, 2023 at 8:06 AM Jesus Sanchez-Palencia
<jesussanp@google.com> wrote:
>
> On Wed, Mar 8, 2023 at 5:40 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
> >
> > Hello:
> >
> > This patch was applied to bpf/bpf-next.git (master)
> > by Andrii Nakryiko <andrii@kernel.org>:
>
> Andrii, are you planning to send this patch to 6.3-rc* since the build
> is broken there?
> Just double-checking since it was applied to bpf-next.
I didn't intend to, feel free to do that.
But just curious, why are you building libbpf from kernel sources
instead of Github repo? Is it through perf build?
>
> Thanks,
> Jesus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 17:26 ` Andrii Nakryiko
@ 2023-03-09 17:31 ` Jesus Sanchez-Palencia
2023-03-09 18:50 ` Daniel Borkmann
0 siblings, 1 reply; 7+ messages in thread
From: Jesus Sanchez-Palencia @ 2023-03-09 17:31 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: andrii, bpf, sdf, rongtao, daniel
On Thu, Mar 9, 2023 at 9:27 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Thu, Mar 9, 2023 at 8:06 AM Jesus Sanchez-Palencia
> <jesussanp@google.com> wrote:
> >
> > On Wed, Mar 8, 2023 at 5:40 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
> > >
> > > Hello:
> > >
> > > This patch was applied to bpf/bpf-next.git (master)
> > > by Andrii Nakryiko <andrii@kernel.org>:
> >
> > Andrii, are you planning to send this patch to 6.3-rc* since the build
> > is broken there?
> > Just double-checking since it was applied to bpf-next.
>
> I didn't intend to, feel free to do that.
Oh I always thought that fixes for the rc-* iterations had to come
from the maintainer
trees. Should I just send it to lkml directly?
>
> But just curious, why are you building libbpf from kernel sources
> instead of Github repo? Is it through perf build?
Yes, through the perf build. We build it altogether as part of our kernel build.
Thanks,
Jesus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 17:31 ` Jesus Sanchez-Palencia
@ 2023-03-09 18:50 ` Daniel Borkmann
2023-03-09 19:03 ` Andrii Nakryiko
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2023-03-09 18:50 UTC (permalink / raw)
To: Jesus Sanchez-Palencia, Andrii Nakryiko; +Cc: andrii, bpf, sdf, rongtao
On 3/9/23 6:31 PM, Jesus Sanchez-Palencia wrote:
> On Thu, Mar 9, 2023 at 9:27 AM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
>> On Thu, Mar 9, 2023 at 8:06 AM Jesus Sanchez-Palencia
>> <jesussanp@google.com> wrote:
>>> On Wed, Mar 8, 2023 at 5:40 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
>>>>
>>>> Hello:
>>>>
>>>> This patch was applied to bpf/bpf-next.git (master)
>>>> by Andrii Nakryiko <andrii@kernel.org>:
>>>
>>> Andrii, are you planning to send this patch to 6.3-rc* since the build
>>> is broken there?
>>> Just double-checking since it was applied to bpf-next.
>>
>> I didn't intend to, feel free to do that.
>
> Oh I always thought that fixes for the rc-* iterations had to come
> from the maintainer
> trees. Should I just send it to lkml directly?
>
>> But just curious, why are you building libbpf from kernel sources
>> instead of Github repo? Is it through perf build?
>
> Yes, through the perf build. We build it altogether as part of our kernel build.
Ok, just moved over to bpf tree in that case where it will land in -rc's.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "libbpf: Poison strlcpy()"
2023-03-09 18:50 ` Daniel Borkmann
@ 2023-03-09 19:03 ` Andrii Nakryiko
0 siblings, 0 replies; 7+ messages in thread
From: Andrii Nakryiko @ 2023-03-09 19:03 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: Jesus Sanchez-Palencia, andrii, bpf, sdf, rongtao
On Thu, Mar 9, 2023 at 10:50 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> On 3/9/23 6:31 PM, Jesus Sanchez-Palencia wrote:
> > On Thu, Mar 9, 2023 at 9:27 AM Andrii Nakryiko
> > <andrii.nakryiko@gmail.com> wrote:
> >> On Thu, Mar 9, 2023 at 8:06 AM Jesus Sanchez-Palencia
> >> <jesussanp@google.com> wrote:
> >>> On Wed, Mar 8, 2023 at 5:40 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
> >>>>
> >>>> Hello:
> >>>>
> >>>> This patch was applied to bpf/bpf-next.git (master)
> >>>> by Andrii Nakryiko <andrii@kernel.org>:
> >>>
> >>> Andrii, are you planning to send this patch to 6.3-rc* since the build
> >>> is broken there?
> >>> Just double-checking since it was applied to bpf-next.
> >>
> >> I didn't intend to, feel free to do that.
> >
> > Oh I always thought that fixes for the rc-* iterations had to come
> > from the maintainer
> > trees. Should I just send it to lkml directly?
> >
> >> But just curious, why are you building libbpf from kernel sources
> >> instead of Github repo? Is it through perf build?
> >
> > Yes, through the perf build. We build it altogether as part of our kernel build.
>
> Ok, just moved over to bpf tree in that case where it will land in -rc's.
>
Thanks, Daniel, for taking care of this!
> Thanks,
> Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-09 19:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 0:48 [PATCH] Revert "libbpf: Poison strlcpy()" Jesus Sanchez-Palencia
2023-03-09 1:40 ` patchwork-bot+netdevbpf
2023-03-09 16:06 ` Jesus Sanchez-Palencia
2023-03-09 17:26 ` Andrii Nakryiko
2023-03-09 17:31 ` Jesus Sanchez-Palencia
2023-03-09 18:50 ` Daniel Borkmann
2023-03-09 19:03 ` Andrii Nakryiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox