* mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow'
@ 2021-10-11 11:38 Naresh Kamboju
2021-10-11 12:32 ` [PATCH] mm: kasan: Fix " Kefeng Wang
2021-10-11 12:42 ` mm/kasan/init.c:282:20: error: " Naresh Kamboju
0 siblings, 2 replies; 6+ messages in thread
From: Naresh Kamboju @ 2021-10-11 11:38 UTC (permalink / raw)
To: Linux-Next Mailing List, open list, linux-mm, kasan-dev
Cc: Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
Dmitry Vyukov, Andrew Morton, Stephen Rothwell
Regression found on x86_64 gcc-11 built with KASAN enabled.
Following build warnings / errors reported on linux next 20211011.
metadata:
git_describe: next-20211011
git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
git_short_log: d3134eb5de85 (\"Add linux-next specific files for 20211011\")
target_arch: x86_64
toolchain: gcc-11
build error :
--------------
mm/kasan/init.c:282:20: error: redefinition of
'kasan_populate_early_vm_area_shadow'
282 | void __init __weak kasan_populate_early_vm_area_shadow(void *start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/memblock.h:13,
from mm/kasan/init.c:9:
include/linux/kasan.h:463:20: note: previous definition of
'kasan_populate_early_vm_area_shadow' with type 'void(void *, long
unsigned int)'
463 | static inline void kasan_populate_early_vm_area_shadow(void *start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:288: mm/kasan/init.o] Error 1
make[3]: Target '__build' not remade because of errors.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
build link:
-----------
https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/build.log
build config:
-------------
https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
# To install tuxmake on your system globally
# sudo pip3 install -U tuxmake
tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
--kconfig defconfig --kconfig-add
https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: kasan: Fix redefinition of 'kasan_populate_early_vm_area_shadow'
2021-10-11 12:32 ` [PATCH] mm: kasan: Fix " Kefeng Wang
@ 2021-10-11 12:22 ` Kefeng Wang
0 siblings, 0 replies; 6+ messages in thread
From: Kefeng Wang @ 2021-10-11 12:22 UTC (permalink / raw)
To: naresh.kamboju, Andrew Morton
Cc: andreyknvl, dvyukov, glider, kasan-dev, linux-kernel, linux-mm,
linux-next, ryabinin.a.a, sfr, Linux Kernel Functional Testing,
Catalin Marinas
On 2021/10/11 20:32, Kefeng Wang wrote:
> Move kasan_populate_early_vm_area_shadow() from mm/kasan/init.c to
> mm/kasan/shadow.c, make it under CONFIG_KASAN_VMALLOC to fix the
> redefinition issue.
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: kasan-dev@googlegroups.com
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> Hi Andrew,
> Could you help to merge this into previos patch
> "kasan: arm64: fix pcpu_page_first_chunk crash with KASAN_VMALLOC",
> sorry for the build error.
Correct Andrew's mail.
>
> mm/kasan/init.c | 5 -----
> mm/kasan/shadow.c | 5 +++++
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/mm/kasan/init.c b/mm/kasan/init.c
> index d39577d088a1..cc64ed6858c6 100644
> --- a/mm/kasan/init.c
> +++ b/mm/kasan/init.c
> @@ -279,11 +279,6 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,
> return 0;
> }
>
> -void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> - unsigned long size)
> -{
> -}
> -
> static void kasan_free_pte(pte_t *pte_start, pmd_t *pmd)
> {
> pte_t *pte;
> diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c
> index 8d95ee52d019..4a4929b29a23 100644
> --- a/mm/kasan/shadow.c
> +++ b/mm/kasan/shadow.c
> @@ -254,6 +254,11 @@ core_initcall(kasan_memhotplug_init);
>
> #ifdef CONFIG_KASAN_VMALLOC
>
> +void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> + unsigned long size)
> +{
> +}
> +
> static int kasan_populate_vmalloc_pte(pte_t *ptep, unsigned long addr,
> void *unused)
> {
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] mm: kasan: Fix redefinition of 'kasan_populate_early_vm_area_shadow'
2021-10-11 11:38 mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow' Naresh Kamboju
@ 2021-10-11 12:32 ` Kefeng Wang
2021-10-11 12:22 ` Kefeng Wang
2021-10-11 12:42 ` mm/kasan/init.c:282:20: error: " Naresh Kamboju
1 sibling, 1 reply; 6+ messages in thread
From: Kefeng Wang @ 2021-10-11 12:32 UTC (permalink / raw)
To: naresh.kamboju, akpm
Cc: andreyknvl, dvyukov, glider, kasan-dev, linux-kernel, linux-mm,
linux-next, ryabinin.a.a, sfr, Kefeng Wang,
Linux Kernel Functional Testing, Catalin Marinas
Move kasan_populate_early_vm_area_shadow() from mm/kasan/init.c to
mm/kasan/shadow.c, make it under CONFIG_KASAN_VMALLOC to fix the
redefinition issue.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: kasan-dev@googlegroups.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
Hi Andrew,
Could you help to merge this into previos patch
"kasan: arm64: fix pcpu_page_first_chunk crash with KASAN_VMALLOC",
sorry for the build error.
mm/kasan/init.c | 5 -----
mm/kasan/shadow.c | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/kasan/init.c b/mm/kasan/init.c
index d39577d088a1..cc64ed6858c6 100644
--- a/mm/kasan/init.c
+++ b/mm/kasan/init.c
@@ -279,11 +279,6 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,
return 0;
}
-void __init __weak kasan_populate_early_vm_area_shadow(void *start,
- unsigned long size)
-{
-}
-
static void kasan_free_pte(pte_t *pte_start, pmd_t *pmd)
{
pte_t *pte;
diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c
index 8d95ee52d019..4a4929b29a23 100644
--- a/mm/kasan/shadow.c
+++ b/mm/kasan/shadow.c
@@ -254,6 +254,11 @@ core_initcall(kasan_memhotplug_init);
#ifdef CONFIG_KASAN_VMALLOC
+void __init __weak kasan_populate_early_vm_area_shadow(void *start,
+ unsigned long size)
+{
+}
+
static int kasan_populate_vmalloc_pte(pte_t *ptep, unsigned long addr,
void *unused)
{
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow'
2021-10-11 11:38 mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow' Naresh Kamboju
2021-10-11 12:32 ` [PATCH] mm: kasan: Fix " Kefeng Wang
@ 2021-10-11 12:42 ` Naresh Kamboju
2021-10-11 20:53 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: Naresh Kamboju @ 2021-10-11 12:42 UTC (permalink / raw)
To: Linux-Next Mailing List, open list, linux-mm, kasan-dev
Cc: Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
Dmitry Vyukov, Stephen Rothwell, Andrew Morton
+ Andrew Morton <akpm@linux-foundation.org>
On Mon, 11 Oct 2021 at 17:08, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> Regression found on x86_64 gcc-11 built with KASAN enabled.
> Following build warnings / errors reported on linux next 20211011.
>
> metadata:
> git_describe: next-20211011
> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> git_short_log: d3134eb5de85 (\"Add linux-next specific files for 20211011\")
> target_arch: x86_64
> toolchain: gcc-11
>
> build error :
> --------------
> mm/kasan/init.c:282:20: error: redefinition of
> 'kasan_populate_early_vm_area_shadow'
> 282 | void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from include/linux/mm.h:34,
> from include/linux/memblock.h:13,
> from mm/kasan/init.c:9:
> include/linux/kasan.h:463:20: note: previous definition of
> 'kasan_populate_early_vm_area_shadow' with type 'void(void *, long
> unsigned int)'
> 463 | static inline void kasan_populate_early_vm_area_shadow(void *start,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[3]: *** [scripts/Makefile.build:288: mm/kasan/init.o] Error 1
> make[3]: Target '__build' not remade because of errors.
>
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> build link:
> -----------
> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/build.log
>
> build config:
> -------------
> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
>
> # To install tuxmake on your system globally
> # sudo pip3 install -U tuxmake
> tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
> --kconfig defconfig --kconfig-add
> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
>
> --
> Linaro LKFT
> https://lkft.linaro.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow'
2021-10-11 12:42 ` mm/kasan/init.c:282:20: error: " Naresh Kamboju
@ 2021-10-11 20:53 ` Andrew Morton
2021-10-12 1:03 ` Kefeng Wang
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2021-10-11 20:53 UTC (permalink / raw)
To: Naresh Kamboju
Cc: Linux-Next Mailing List, open list, linux-mm, kasan-dev,
Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
Dmitry Vyukov, Stephen Rothwell, Kefeng Wang
On Mon, 11 Oct 2021 18:12:44 +0530 Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> + Andrew Morton <akpm@linux-foundation.org>
>
> On Mon, 11 Oct 2021 at 17:08, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> >
> > Regression found on x86_64 gcc-11 built with KASAN enabled.
> > Following build warnings / errors reported on linux next 20211011.
> >
> > metadata:
> > git_describe: next-20211011
> > git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> > git_short_log: d3134eb5de85 (\"Add linux-next specific files for 20211011\")
> > target_arch: x86_64
> > toolchain: gcc-11
> >
> > build error :
> > --------------
> > mm/kasan/init.c:282:20: error: redefinition of
> > 'kasan_populate_early_vm_area_shadow'
> > 282 | void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from include/linux/mm.h:34,
> > from include/linux/memblock.h:13,
> > from mm/kasan/init.c:9:
> > include/linux/kasan.h:463:20: note: previous definition of
> > 'kasan_populate_early_vm_area_shadow' with type 'void(void *, long
> > unsigned int)'
> > 463 | static inline void kasan_populate_early_vm_area_shadow(void *start,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > make[3]: *** [scripts/Makefile.build:288: mm/kasan/init.o] Error 1
> > make[3]: Target '__build' not remade because of errors.
> >
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > build link:
> > -----------
> > https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/build.log
> >
> > build config:
> > -------------
> > https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
> >
> > # To install tuxmake on your system globally
> > # sudo pip3 install -U tuxmake
> > tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
> > --kconfig defconfig --kconfig-add
> > https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
Presumably "kasan: arm64: fix pcpu_page_first_chunk crash with
KASAN_VMALLOC". Let's cc Kefeng.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow'
2021-10-11 20:53 ` Andrew Morton
@ 2021-10-12 1:03 ` Kefeng Wang
0 siblings, 0 replies; 6+ messages in thread
From: Kefeng Wang @ 2021-10-12 1:03 UTC (permalink / raw)
To: Andrew Morton, Naresh Kamboju
Cc: Linux-Next Mailing List, open list, linux-mm, kasan-dev,
Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
Dmitry Vyukov, Stephen Rothwell
On 2021/10/12 4:53, Andrew Morton wrote:
> On Mon, 11 Oct 2021 18:12:44 +0530 Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
>> + Andrew Morton <akpm@linux-foundation.org>
>>
>> On Mon, 11 Oct 2021 at 17:08, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>>>
>>> Regression found on x86_64 gcc-11 built with KASAN enabled.
>>> Following build warnings / errors reported on linux next 20211011.
>>>
>>> metadata:
>>> git_describe: next-20211011
>>> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
>>> git_short_log: d3134eb5de85 (\"Add linux-next specific files for 20211011\")
>>> target_arch: x86_64
>>> toolchain: gcc-11
>>>
>>> build error :
>>> --------------
>>> mm/kasan/init.c:282:20: error: redefinition of
>>> 'kasan_populate_early_vm_area_shadow'
>>> 282 | void __init __weak kasan_populate_early_vm_area_shadow(void *start,
>>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> In file included from include/linux/mm.h:34,
>>> from include/linux/memblock.h:13,
>>> from mm/kasan/init.c:9:
>>> include/linux/kasan.h:463:20: note: previous definition of
>>> 'kasan_populate_early_vm_area_shadow' with type 'void(void *, long
>>> unsigned int)'
>>> 463 | static inline void kasan_populate_early_vm_area_shadow(void *start,
>>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> make[3]: *** [scripts/Makefile.build:288: mm/kasan/init.o] Error 1
>>> make[3]: Target '__build' not remade because of errors.
>>>
>>>
>>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>>
>>> build link:
>>> -----------
>>> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/build.log
>>>
>>> build config:
>>> -------------
>>> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
>>>
>>> # To install tuxmake on your system globally
>>> # sudo pip3 install -U tuxmake
>>> tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
>>> --kconfig defconfig --kconfig-add
>>> https://builds.tuxbuild.com/1zLv2snHfZN8QV01yA9MB8NhUZt/config
>
> Presumably "kasan: arm64: fix pcpu_page_first_chunk crash with
> KASAN_VMALLOC". Let's cc Kefeng.
Yes, I send a fix patch, and reply this mail, see
https://lore.kernel.org/linux-mm/5077aa7e-0167-33b6-35f0-0ea7df8f2375@huawei.com/
>
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-12 1:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 11:38 mm/kasan/init.c:282:20: error: redefinition of 'kasan_populate_early_vm_area_shadow' Naresh Kamboju
2021-10-11 12:32 ` [PATCH] mm: kasan: Fix " Kefeng Wang
2021-10-11 12:22 ` Kefeng Wang
2021-10-11 12:42 ` mm/kasan/init.c:282:20: error: " Naresh Kamboju
2021-10-11 20:53 ` Andrew Morton
2021-10-12 1:03 ` Kefeng Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).