2022-09-06 07:42:58

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the slab tree

Hi all,

After merging the slab tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/bpf/memalloc.c: In function 'bpf_mem_free':
kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
| ^~~~~~~
| ksize

Caused by commit

8dfa9d554061 ("mm/slab_common: move declaration of __ksize() to mm/slab.h")

interacting with commit

7c8199e24fa0 ("bpf: Introduce any context BPF specific memory allocator.")

from the bpf-next tree.

I have reverted the slab tree commit for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-09-06 08:10:55

by Vlastimil Babka

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the slab tree

On 9/6/22 08:51, Stephen Rothwell wrote:
> Hi all,

Hi,

> After merging the slab tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> kernel/bpf/memalloc.c: In function 'bpf_mem_free':
> kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
> 613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
> | ^~~~~~~
> | ksize

Could you use ksize() here? I'm guessing you picked __ksize() because
kasan_unpoison_element() in mm/mempool.c did, but that's to avoid
kasan_unpoison_range() in ksize() as this caller does it differently.
AFAICS your function doesn't handle kasan differently, so ksize() should
be fine.

> Caused by commit
>
> 8dfa9d554061 ("mm/slab_common: move declaration of __ksize() to mm/slab.h")
>
> interacting with commit
>
> 7c8199e24fa0 ("bpf: Introduce any context BPF specific memory allocator.")
>
> from the bpf-next tree.
>
> I have reverted the slab tree commit for today.
>

2022-09-06 18:40:13

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the slab tree

On Tue, Sep 6, 2022 at 12:53 AM Vlastimil Babka <[email protected]> wrote:
>
> On 9/6/22 08:51, Stephen Rothwell wrote:
> > Hi all,
>
> Hi,
>
> > After merging the slab tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > kernel/bpf/memalloc.c: In function 'bpf_mem_free':
> > kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
> > 613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
> > | ^~~~~~~
> > | ksize
>
> Could you use ksize() here? I'm guessing you picked __ksize() because
> kasan_unpoison_element() in mm/mempool.c did, but that's to avoid
> kasan_unpoison_range() in ksize() as this caller does it differently.
> AFAICS your function doesn't handle kasan differently, so ksize() should
> be fine.

Ok. Will change to use ksize().

2022-09-07 03:51:04

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the slab tree

On Tue, Sep 6, 2022 at 11:37 AM Alexei Starovoitov
<[email protected]> wrote:
>
> On Tue, Sep 6, 2022 at 12:53 AM Vlastimil Babka <[email protected]> wrote:
> >
> > On 9/6/22 08:51, Stephen Rothwell wrote:
> > > Hi all,
> >
> > Hi,
> >
> > > After merging the slab tree, today's linux-next build (powerpc
> > > ppc64_defconfig) failed like this:
> > >
> > > kernel/bpf/memalloc.c: In function 'bpf_mem_free':
> > > kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
> > > 613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
> > > | ^~~~~~~
> > > | ksize
> >
> > Could you use ksize() here? I'm guessing you picked __ksize() because
> > kasan_unpoison_element() in mm/mempool.c did, but that's to avoid
> > kasan_unpoison_range() in ksize() as this caller does it differently.
> > AFAICS your function doesn't handle kasan differently, so ksize() should
> > be fine.
>
> Ok. Will change to use ksize().

Just pushed the following commit to address the issue:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=1e660f7ebe0ff6ac65ee0000280392d878630a67

It will get to net-next soon.

2022-09-07 06:49:00

by Vlastimil Babka

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the slab tree

On 9/7/22 05:05, Alexei Starovoitov wrote:
> On Tue, Sep 6, 2022 at 11:37 AM Alexei Starovoitov
> <[email protected]> wrote:
>>
>> On Tue, Sep 6, 2022 at 12:53 AM Vlastimil Babka <[email protected]> wrote:
>> >
>> > On 9/6/22 08:51, Stephen Rothwell wrote:
>> > > Hi all,
>> >
>> > Hi,
>> >
>> > > After merging the slab tree, today's linux-next build (powerpc
>> > > ppc64_defconfig) failed like this:
>> > >
>> > > kernel/bpf/memalloc.c: In function 'bpf_mem_free':
>> > > kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
>> > > 613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
>> > > | ^~~~~~~
>> > > | ksize
>> >
>> > Could you use ksize() here? I'm guessing you picked __ksize() because
>> > kasan_unpoison_element() in mm/mempool.c did, but that's to avoid
>> > kasan_unpoison_range() in ksize() as this caller does it differently.
>> > AFAICS your function doesn't handle kasan differently, so ksize() should
>> > be fine.
>>
>> Ok. Will change to use ksize().
>
> Just pushed the following commit to address the issue:
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=1e660f7ebe0ff6ac65ee0000280392d878630a67
>
> It will get to net-next soon.

Thanks!

2022-09-07 07:50:41

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the slab tree

Hi all,

On Tue, 6 Sep 2022 20:05:44 -0700 Alexei Starovoitov <[email protected]> wrote:
>
> On Tue, Sep 6, 2022 at 11:37 AM Alexei Starovoitov
> <[email protected]> wrote:
> >
> > On Tue, Sep 6, 2022 at 12:53 AM Vlastimil Babka <[email protected]> wrote:
> > >
> > > On 9/6/22 08:51, Stephen Rothwell wrote:
> > > > Hi all,
> > >
> > > Hi,
> > >
> > > > After merging the slab tree, today's linux-next build (powerpc
> > > > ppc64_defconfig) failed like this:
> > > >
> > > > kernel/bpf/memalloc.c: In function 'bpf_mem_free':
> > > > kernel/bpf/memalloc.c:613:33: error: implicit declaration of function '__ksize'; did you mean 'ksize'? [-Werror=implicit-function-declaration]
> > > > 613 | idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ));
> > > > | ^~~~~~~
> > > > | ksize
> > >
> > > Could you use ksize() here? I'm guessing you picked __ksize() because
> > > kasan_unpoison_element() in mm/mempool.c did, but that's to avoid
> > > kasan_unpoison_range() in ksize() as this caller does it differently.
> > > AFAICS your function doesn't handle kasan differently, so ksize() should
> > > be fine.
> >
> > Ok. Will change to use ksize().
>
> Just pushed the following commit to address the issue:
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=1e660f7ebe0ff6ac65ee0000280392d878630a67
>
> It will get to net-next soon.

I replaced my revert with that patch for today (and will discard that
when it arrives via some other tree).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature