[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202406271127.CEAE5F4E@keescook>
Date: Thu, 27 Jun 2024 11:27:53 -0700
From: Kees Cook <kees@...nel.org>
To: Mirsad Todorovac <mtodorovac69@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kernel Build System <linux-kbuild@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Andy Shevchenko <andy@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, Song Liu <song@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Zhen Lei <thunder.leizhen@...wei.com>,
Ard Biesheuvel <ardb@...nel.org>, Xin Li <xin3.li@...el.com>,
Michael Roth <michael.roth@....com>, linux-mm@...ck.org,
linux-hardening@...r.kernel.org
Subject: Re: [PROBLEM] randconfig: ./include/linux/fortify-string.h:122:33: error: ‘__builtin_strcpy’ source argument
is the same as destination [-Werror=restrict]
On Thu, Jun 27, 2024 at 08:25:01PM +0200, Mirsad Todorovac wrote:
> Hi all,
>
> I hope it will catch your attention, for I couldn't sort out what is wrong with this:
>
> KCONFIG_SEED=0xD859674
>
> on vanilla torvalds tree, commit v6.10-rc4-366-gafcd48134c58
>
> _______________________________________________________________
> $ time nice make -j 36 bindeb-pkg |& tee ../err-6.10-rc5-08.log; date
> GEN debian
> dpkg-buildpackage --build=binary --no-pre-clean --unsigned-changes -R'make -f debian/rules' -j1 -a$(cat debian/arch)
> dpkg-buildpackage: info: source package linux-upstream
> dpkg-buildpackage: info: source version 6.10.0-rc5-gafcd48134c58-34
> dpkg-buildpackage: info: source distribution jammy
> dpkg-buildpackage: info: source changed by marvin <marvin@...iant>
> dpkg-architecture: warning: specified GNU system type i686-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
> dpkg-source --before-build .
> dpkg-buildpackage: info: host architecture i386
> make -f debian/rules binary
> #
> # No change to .config
> #
> CALL scripts/checksyscalls.sh
> UPD init/utsversion-tmp.h
> CC init/version.o
> AR init/built-in.a
> CC kernel/kallsyms.o
> In file included from ./include/linux/string.h:374,
> from ./arch/x86/include/asm/page_32.h:18,
> from ./arch/x86/include/asm/page.h:14,
> from ./arch/x86/include/asm/thread_info.h:12,
> from ./include/linux/thread_info.h:60,
> from ./include/linux/spinlock.h:60,
> from ./include/linux/mmzone.h:8,
> from ./include/linux/gfp.h:7,
> from ./include/linux/mm.h:7,
> from ./include/linux/kallsyms.h:13,
> from kernel/kallsyms.c:15:
> kernel/kallsyms.c: In function ‘__sprint_symbol’:
> ./include/linux/fortify-string.h:122:33: error: ‘__builtin_strcpy’ source argument is the same as destination [-Werror=restrict]
> 122 | #define __underlying_strcpy __builtin_strcpy
> | ^
> ./include/linux/fortify-string.h:787:24: note: in expansion of macro ‘__underlying_strcpy’
> 787 | return __underlying_strcpy(p, q);
> | ^~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [scripts/Makefile.build:244: kernel/kallsyms.o] Error 1
> make[5]: *** [scripts/Makefile.build:485: kernel] Error 2
> make[4]: *** [Makefile:1934: .] Error 2
> make[3]: *** [debian/rules:74: build-arch] Error 2
> dpkg-buildpackage: error: make -f debian/rules binary subprocess returned exit status 2
> make[2]: *** [scripts/Makefile.package:121: bindeb-pkg] Error 2
> make[1]: *** [/home/marvin/linux/kernel/linux_torvalds/Makefile:1555: bindeb-pkg] Error 2
> make: *** [Makefile:240: __sub-make] Error 2
Does this patch solve the problem for you?
https://lore.kernel.org/lkml/20240604044228.2910712-1-liujinlong@kylinos.cn/
-Kees
--
Kees Cook
Powered by blists - more mailing lists