linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mirsad Todorovac <mtodorovac69@gmail.com>
To: Kees Cook <kees@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Kernel Build System <linux-kbuild@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Andy Shevchenko <andy@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Song Liu <song@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Ard Biesheuvel <ardb@kernel.org>, Xin Li <xin3.li@intel.com>,
	Michael Roth <michael.roth@amd.com>,
	linux-mm@kvack.org, linux-hardening@vger.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]
Date: Thu, 27 Jun 2024 22:28:26 +0200	[thread overview]
Message-ID: <e7564dbf-cd3a-4e41-8986-03510c7e42bd@gmail.com> (raw)
In-Reply-To: <202406271127.CEAE5F4E@keescook>



On 6/27/24 20:27, Kees Cook wrote:
> 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@defiant>
>> 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/

Thanks, it does.

Tested-by: Mirsad Todorovac <mtodorovac69@gmail.com>

Best regards,
Mirsad Todorovac


> -Kees
> 


      reply	other threads:[~2024-06-27 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 18:25 [PROBLEM] randconfig: ./include/linux/fortify-string.h:122:33: error: ‘__builtin_strcpy’ source argument is the same as destination [-Werror=restrict] Mirsad Todorovac
2024-06-27 18:27 ` Kees Cook
2024-06-27 20:28   ` Mirsad Todorovac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7564dbf-cd3a-4e41-8986-03510c7e42bd@gmail.com \
    --to=mtodorovac69@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy@kernel.org \
    --cc=ardb@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=song@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thunder.leizhen@huawei.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=xin3.li@intel.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).