Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947270 - sys-kernel/gentoo-sources-6.12.7 fails to compile
Summary: sys-kernel/gentoo-sources-6.12.7 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://git.kernel.org/pub/scm/linux/...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2024-12-31 12:40 UTC by Egor
Modified: 2025-02-17 11:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
.config file (kernel-config-6.12.7-gentoo-x86_64,206.57 KB, text/plain)
2024-12-31 12:41 UTC, Egor
Details
Genkernel config (genkernel.conf,12.88 KB, text/plain)
2024-12-31 14:14 UTC, Egor
Details
Genkernel log (genkernel.log,229.90 KB, text/x-log)
2024-12-31 16:37 UTC, Egor
Details
Make V1 log (make-v1-build.log.zip,47.57 KB, application/zip)
2024-12-31 17:19 UTC, Egor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor 2024-12-31 12:40:28 UTC
gentoo-sources-6.12.7 fails to compile for me with following message:
  CC      drivers/gpu/drm/drm_rect.o
In file included from ./include/linux/string.h:390,
                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/smp.h:13,
                 from ./include/linux/lockdep.h:14,
                 from ./include/linux/spinlock.h:63,
                 from ./include/linux/swait.h:7,
                 from ./include/linux/completion.h:12,
                 from kernel/padata.c:14:
In function 'bitmap_copy',
    inlined from 'cpumask_copy' at ./include/linux/cpumask.h:839:2,
    inlined from '__padata_set_cpumasks' at kernel/padata.c:730:2:
./include/linux/fortify-string.h:114:33: error: '__builtin_memcpy' reading between 65 and 536870904 bytes from a region of size 64 [-Werror=stringop-overread]
  114 | #define __underlying_memcpy     __builtin_memcpy
      |                                 ^
./include/linux/fortify-string.h:633:9: note: in expansion of macro '__underlying_memcpy'
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |         ^~~~~~~~~~~~~
./include/linux/fortify-string.h:678:26: note: in expansion of macro '__fortify_memcpy_chk'
  678 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
      |                          ^~~~~~~~~~~~~~~~~~~~
./include/linux/bitmap.h:259:17: note: in expansion of macro 'memcpy'
  259 |                 memcpy(dst, src, len);
      |                 ^~~~~~
kernel/padata.c: In function '__padata_set_cpumasks':
kernel/padata.c:713:48: note: source object 'pcpumask' of size [0, 64]
  713 |                                  cpumask_var_t pcpumask,
      |                                  ~~~~~~~~~~~~~~^~~~~~~~
In function 'bitmap_copy',
    inlined from 'cpumask_copy' at ./include/linux/cpumask.h:839:2,
    inlined from '__padata_set_cpumasks' at kernel/padata.c:730:2:
./include/linux/fortify-string.h:114:33: error: '__builtin_memcpy' reading between 65 and 536870904 bytes from a region of size 64 [-Werror=stringop-overread]
  114 | #define __underlying_memcpy     __builtin_memcpy
      |                                 ^
./include/linux/fortify-string.h:633:9: note: in expansion of macro '__underlying_memcpy'
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |         ^~~~~~~~~~~~~
./include/linux/fortify-string.h:678:26: note: in expansion of macro '__fortify_memcpy_chk'
  678 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
      |                          ^~~~~~~~~~~~~~~~~~~~
./include/linux/bitmap.h:259:17: note: in expansion of macro 'memcpy'
  259 |                 memcpy(dst, src, len);
      |                 ^~~~~~
kernel/padata.c: In function '__padata_set_cpumasks':
kernel/padata.c:713:48: note: source object 'pcpumask' of size [0, 64]
  713 |                                  cpumask_var_t pcpumask,
      |                                  ~~~~~~~~~~~~~~^~~~~~~~
  AR      drivers/usb/serial/built-in.a
  CC      kernel/bpf/token.o
cc1: all warnings being treated as errors


Reproducible: Always




emerge --info:
Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/split-usr/desktop/plasma, gcc-14, glibc-2.40-r5, 6.11.11-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.11.11-gentoo-x86_64-x86_64-AMD_Ryzen_9_PRO_6950H_with_Radeon_Graphics-with-glibc2.40
KiB Mem:    32116424 total,   7325032 free
KiB Swap:   33554428 total,  33552892 free
Timestamp of repository gentoo: Tue, 31 Dec 2024 12:30:00 +0000
Head commit of repository gentoo: c2f134e500a67c0b306bb8be861001dbbd57d131
Head commit of repository TapokOverlay: dba7c0e7214caecdefed234bf647599a70d1338f

Timestamp of repository guru: Mon, 30 Dec 2024 16:18:10 +0000
Head commit of repository guru: 628c70f1910a44baf7e1dba05416dd0f245482a7

Timestamp of repository myrvolay: Tue, 17 Dec 2024 22:21:27 +0000
Head commit of repository myrvolay: f8ac61b11d45ce6a5791cd6e58705c5cae5b8b28

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.6::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.11_p1::gentoo, 3.12.8::gentoo, 3.13.1::gentoo
dev-lang/rust-bin:         1.81.0-r100::gentoo, 1.82.0-r101::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 19.1.4::gentoo
llvm-core/lld:             18.1.8::gentoo, 19.1.4::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.4::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r2::gentoo, 2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /var/portage/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

TapokOverlay
    location: /var/portage/db/repos/TapokOverlay
    sync-type: git
    sync-uri: https://github.com/Tapchicoma/TapokOverlay.git
    masters: gentoo
    volatile: True

guru
    location: /var/portage/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: True

myrvolay
    location: /var/portage/db/repos/myrvolay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/myrvolay.git
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver3 -O2 -pipe -ftree-vectorize -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=znver3 -O2 -pipe -ftree-vectorize -fomit-frame-pointer"
DISTDIR="/var/portage/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=znver3 -O2 -pipe -ftree-vectorize -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=znver3 -O2 -pipe -ftree-vectorize -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/portage/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=znver3"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui heif iconv icu ipv6 jpeg kde kf6compat kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg test-rust tiff truetype ttf udev udisks unicode upower usb vaapi vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64 pc" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput evdev" KERNEL="linux" L10N="ru en de en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 python3_12" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 arm" QEMU_USER_TARGETS="x86_64 aarch64 arm" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Egor 2024-12-31 12:41:26 UTC
Created attachment 915587 [details]
.config file
Comment 2 Mike Pagano gentoo-dev 2024-12-31 13:42:19 UTC
This is being discussed here:

https://patchwork.kernel.org/project/linux-crypto/patch/20241205123413.309388-1-nilay@linux.ibm.com/

I cannot seem to replicate with the 6.11.11 .config you attached.

Same arch, same gcc.  Are you adding anything to your 'make' command line?
Comment 3 Egor 2024-12-31 14:14:50 UTC
Created attachment 915597 [details]
Genkernel config

I am calling `genkernel all` to assemble to kernel - attached the config.
Comment 4 Egor 2024-12-31 14:17:53 UTC
Forgot to add that I've enabled 'experimental' flag for gentoo-sources.
Comment 5 Mike Pagano gentoo-dev 2024-12-31 16:36:05 UTC
Can you attach the genkernel.log from the failed build ?
Comment 6 Egor 2024-12-31 16:37:20 UTC
Created attachment 915609 [details]
Genkernel log
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-31 16:37:50 UTC
For OP's failure, output from make V=1 would also be appreciated.
Comment 8 Egor 2024-12-31 17:19:14 UTC
Created attachment 915611 [details]
Make V1 log
Comment 9 Mike Pagano gentoo-dev 2024-12-31 19:15:35 UTC
Known upstream issue, as a workaround it's mentioned you could try disabling 
 CONFIG_FORTIFY_SOURCE .

But, you know, hardening.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-31 19:24:11 UTC
Disabling CONFIG_WERROR should work and let you have the runtime protection at least
Comment 11 Larry the Git Cow gentoo-dev 2025-02-17 11:50:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc96241635afa62a7f6fe533bf00e6d34733277e

commit fc96241635afa62a7f6fe533bf00e6d34733277e
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2025-02-17 11:48:02 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2025-02-17 11:48:02 +0000

    sys-kernel/gentoo-sources: add 6.12.14, fortify patch, one removal
    
    Removed conflicting patch
    2980_GCC15-gnu23-to-gnu11-fix.patch
    fortify: Hide run-time copy size from value range tracking
    Closes: https://bugs.gentoo.org/947270
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 sys-kernel/gentoo-sources/Manifest                 |  3 ++
 .../gentoo-sources/gentoo-sources-6.12.14.ebuild   | 37 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)