Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646632 - net/built-in.o: In function `__copy_tofrom_user_nocheck': .../linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x11e72c): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6
Summary: net/built-in.o: In function `__copy_tofrom_user_nocheck': .../linux-4.9.80-ge...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Alpha Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-02-05 04:49 UTC by Stephen Lewis
Modified: 2020-03-16 06:45 UTC (History)
1 user (show)

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


Attachments
4.9.80-truncated-braddr.patch (4.9.80-truncated-braddr.patch,2.62 KB, patch)
2018-02-05 04:49 UTC, Stephen Lewis
Details | Diff
4.9.80-section-mismatch.patch (4.9.80-section-mismatch.patch,286 bytes, patch)
2018-02-05 04:50 UTC, Stephen Lewis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Lewis 2018-02-05 04:49:40 UTC
Created attachment 517832 [details, diff]
4.9.80-truncated-braddr.patch

bug report for gentoo-sources:4.9.80 on arch/alpha.
This is long and only of interest to DEC Alpha users.

This package emerges OK and so could be keyworded 'alpha'
I have no complaint with the 4.9.80 ebuild.
This bug report is intended to document attempts to
compile and boot 4.9.80. in the hope that it helps someone.
After a successful emerge and with a suitable .config for
a CS20 Tsunami Clipper (aka "shark") Alpha EV68AL.

'make -j2 all' runs to the final link and then prints this:
==============================================================================
  ...
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: "saved_config" [vmlinux] is COMMON symbol
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
net/built-in.o: In function `__copy_tofrom_user_nocheck':
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x11e72c): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x11e7c8): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x11e944): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x127354): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x127370): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x131630): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x135858): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x135f74): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x1366f8): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x140d60): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(ev6-copy_user.o)
/usr/src/linux-4.9.80-gentoo/./arch/alpha/include/asm/uaccess.h:364:(.text+0x140f70): additional relocation overflows omitted from the output
make: *** [Makefile:976: vmlinux] Error 1
==============================================================================

These (and several other) branch truncations can be avoided using
the attached patch:

Now the compile runs to completion but reports the following:

==============================================================================
  ...
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: "saved_config" [vmlinux] is COMMON symbol
WARNING: vmlinux.o(.text+0xac80): Section mismatch in reference from the function smp_callin() to the function .init.text:init_clockevent()
The function smp_callin() references
the function __init init_clockevent().
This is often because smp_callin lacks a __init 
annotation or the annotation of init_clockevent is wrong.

WARNING: vmlinux.o(.text+0xac98): Section mismatch in reference from the function smp_callin() to the function .init.text:init_clockevent()
The function smp_callin() references
the function __init init_clockevent().
This is often because smp_callin lacks a __init 
annotation or the annotation of init_clockevent is wrong.

  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  KSYM    .tmp_kallsyms1.o
  KSYM    .tmp_kallsyms2.o
  LD      vmlinux
  SYSMAP  System.map
  STRIP  arch/alpha/boot/vmlinux
  Building modules, stage 2.
  GZIP    arch/alpha/boot/vmlinux.gz
  MODPOST 52 modules
  CC      arch/alpha/kernel/srm_env.mod.o
  CC      crypto/ansi_cprng.mod.o
  CC      crypto/authenc.mod.o
  CC      crypto/authencesn.mod.o
  CC      crypto/cbc.mod.o
  CC      crypto/des_generic.mod.o
  CC      crypto/drbg.mod.o
  CC      crypto/echainiv.mod.o
  CC      crypto/jitterentropy_rng.mod.o
  Kernel arch/alpha/boot/vmlinux.gz is ready
==============================================================================

Apply the second patch and run make again and get a clean compile:

==============================================================================

However, on my system, the kernel does not boot...
It gets an Oops here:

==============================================================================

aboot: loading uncompressed boot/vmlinux-linux-4.9.80-gentoo...
aboot: segment 0, 10200536 bytes at 0xfffffc0000310000
aboot: zero-filling 190824 bytes at 0xfffffc0000cca5d8
aboot: starting kernel boot/vmlinux-linux-4.9.80-gentoo with arguments root=/dev/sda3 console=ttyS0
Linux version 4.9.80-gentoo-sl-patch (root@walnut) (gcc version 4.9.3 (Gentoo 4.9.3 p1.4, pie-0.6.4) ) #4 SMP Sun Feb 4 15:56:57 PST 2018
Booting on Tsunami variation Clipper using machine vector Clipper from SRM
Major Options: SMP EV67 LEGACY_START VERBOSE_MCHECK MAGIC_SYSRQ 
Command line: root=/dev/sda3 console=ttyS0
memcluster 0, usage 1, start        0, end      256
memcluster 1, usage 0, start      256, end   130981
memcluster 2, usage 1, start   130981, end   131072
memcluster 3, usage 0, start   131072, end   262142
memcluster 4, usage 1, start   262142, end   262144
freeing pages 256:384
freeing pages 1663:130981
freeing pages 131072:262142
reserving pages 1663:1667
4096K Bcache detected; load hit latency 18 cycles, load miss latency 163 cycles
SMP: 2 CPUs probed -- cpu_present_mask = 3
percpu: Embedded 7 pages/cpu @fffffc0001f06000 s19584 r8192 d29568 u57344
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260350
Kernel command line: root=/dev/sda3 console=ttyS0
PID hash table entries: 4096 (order: 2, 32768 bytes)
Dentry cache hash table entries: 262144 (order: 8, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 7, 1048576 bytes)
Sorting __ex_table...
Memory: 2064448K/2097136K available (6872K kernel code, 473K rwdata, 2408K rodata, 192K init, 186K bss, 32688K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 64.
	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=2
NR_IRQS:64
Console: colour VGA+ 80x25
console [ttyS0] enabled
Calibrating delay loop... 1651.72 BogoMIPS (lpj=805888)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096 (order: 2, 32768 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 32768 bytes)
SMP starting up secondaries.
Brought up 2 CPUs
SMP: Total of 2 processors activated (3307.69 BogoMIPS).
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1866466235866741 ns
random: fast init done
futex hash table entries: 512 (order: 2, 32768 bytes)
NET: Registered protocol family 16
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x1ffffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0x3fffffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0000:00:10.0: [Firmware Bug]: reg 0x10: invalid BAR (can't size)
pci 0000:00:10.0: [Firmware Bug]: reg 0x14: invalid BAR (can't size)
pci 0000:00:10.0: [Firmware Bug]: reg 0x18: invalid BAR (can't size)
pci 0000:00:10.0: [Firmware Bug]: reg 0x1c: invalid BAR (can't size)
pci 0000:00:10.0: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:10.0: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:10.0: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:10.0: legacy IDE quirk: reg 0x1c: [io  0x0376]
pci 0000:00:11.0: quirk: [io  0x7e20-0x7e3f] claimed by ali7101 SMB
PCI host bridge to bus 0001:01
pci_bus 0001:01: root bus resource [io  0x200000000-0x201ffffff] (bus address [0x0000-0x1ffffff])
pci_bus 0001:01: root bus resource [mem 0x200000000-0x23fffffff] (bus address [0x00000000-0x3fffffff])
pci_bus 0001:01: No busn resource found for root bus, will use [bus 01-ff]
pci 0000:00:05.0: BAR 0: assigned [mem 0x10000000-0x17ffffff pref]
pci 0000:00:05.1: BAR 0: assigned [mem 0x18000000-0x1fffffff pref]
pci 0000:00:04.0: BAR 2: assigned [mem 0x09000000-0x090fffff]
pci 0000:00:04.0: BAR 6: assigned [mem 0x09100000-0x091fffff pref]
pci 0000:00:05.0: BAR 6: assigned [mem 0x09200000-0x0921ffff pref]
pci 0000:00:05.0: BAR 2: assigned [mem 0x09220000-0x0922ffff]
pci 0000:00:05.1: BAR 1: assigned [mem 0x09230000-0x0923ffff]
pci 0000:00:03.0: BAR 3: assigned [mem 0x09240000-0x09241fff 64bit]
pci 0000:00:04.0: BAR 0: assigned [mem 0x09242000-0x09242fff]
pci 0000:00:03.0: BAR 1: assigned [mem 0x09243000-0x092433ff 64bit]
pci 0000:00:03.0: BAR 0: assigned [io  0x8000-0x80ff]
pci 0000:00:05.0: BAR 1: assigned [io  0x8400-0x84ff]
pci 0000:00:04.0: BAR 1: assigned [io  0x8800-0x883f]
pci 0000:00:10.0: BAR 4: assigned [io  0x8840-0x884f]
pci 0001:01:03.0: BAR 2: assigned [mem 0x209000000-0x2090fffff]
pci 0001:01:03.0: BAR 6: assigned [mem 0x209100000-0x2091fffff pref]
pci 0001:01:03.0: BAR 0: assigned [mem 0x209200000-0x209200fff]
pci 0001:01:03.0: BAR 1: assigned [io  0x200008000-0x20000803f]
Console: switching to colour VGA+ 80x25
vgaarb: setting as boot device: PCI:0000:00:05.0
vgaarb: device added: PCI:0000:00:05.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
vgaarb: bridge control possible 0000:00:05.0
Unable to handle kernel paging request at virtual address 0000000000000044
CPU 1 swapper/0(1): Oops 0
pc = [<fffffc0000689bd0>]  ra = [<fffffc00006755f0>]  ps = 0000    Not tainted
pc is at atom_parse_data_header+0x30/0xb0
ra is at radeon_atom_get_voltage_step+0x50/0x210
v0 = 0000000000000000  t0 = 0000000000000045  t1 = 0000000000000000
t2 = 0000000000000044  t3 = 0000000000000040  t4 = fffffc0001f1ad28
t5 = 000000000000006d  t6 = 00000000012c8000  t7 = fffffc007f090000
s0 = 0000000000000007  s1 = ffffffffffffffea  s2 = fffffc0000b23bb1
s3 = fffffc007f1003d0  s4 = fffffc0000b05552  s5 = 0000000000000001
s6 = 0000000000000001
a0 = fffffc0000c5e9e0  a1 = 0000000000000044  a2 = fffffc007f093d58
a3 = fffffc007f093d5d  a4 = fffffc007f093d5c  a5 = fffffc007f093d5a
t8 = 00000000012c8000  t9 = fffffc00005904e4  t10= 0000000000000155
t11= 0000000000000018  pv = fffffc0000689ba0  at = fffffc007f100400
gp = fffffc0000cc3af8  sp = fffffc007f093d28
Disabling lock debugging due to kernel taint
Trace:
[<fffffc00008005c4>] scsi_strcpy_devinfo+0x74/0x110
[<fffffc000080072c>] scsi_dev_info_list_add_keyed+0xcc/0x1e0
[<fffffc0000310288>] do_one_initcall+0x58/0x230
[<fffffc00009c0510>] kernel_init+0x20/0x1a0
[<fffffc00009c04f0>] kernel_init+0x0/0x1a0
[<fffffc0000311838>] ret_from_kernel_thread+0x18/0x20
[<fffffc00009c04f0>] kernel_init+0x0/0x1a0

Code: 4821f623 
 40440404  42210001 
 40830404  43e10003 
 40203001 <30840004>
 40430403 
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

--[ had lereel CaUi0 
 not synciCg:UA1timp ed tohklle nit! exitcd
=0a0t00c0db
=
5
HALT instruction executed
PC = fffffc0000310068
boot failure
P00>>>

==============================================================================

This may be specific to my hardware and it may boot on your
hardware, its worth a try if you specifically need the 4.9 kernel.
However this is mostly moot since the 4.15 kernel compiles cleanly
and boots!

Stephen Lewis
Comment 1 Stephen Lewis 2018-02-05 04:50:56 UTC
Created attachment 517834 [details, diff]
4.9.80-section-mismatch.patch
Comment 2 Stephen Lewis 2018-02-05 04:54:25 UTC
emerge --info

System uname: Linux-4.15.0-gentoo-sl-alpha-EV68AL-with-gentoo-2.4.1
KiB Mem:     2064392 total,   1579912 free
KiB Swap:    4128696 total,   4128696 free
Timestamp of repository gentoo: Sun, 04 Feb 2018 13:00:01 +0000
Head commit of repository gentoo: c7803c139af10638d72c7f2135a187eaa32c6a0a
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.2.3-r2::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.9.6-r3::gentoo, 1.10.3::gentoo, 1.11.6-r2::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            4.4.7::gentoo, 4.5.3-r1::gentoo, 4.7.3-r1::gentoo, 4.8.4::gentoo, 4.9.3::gentoo, 6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://10.1.200.13/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="alpha"
ACCEPT_LICENSE="* -@EULA"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -pipe -O2 -mcpu=ev67 -mtune=ev67"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mieee -pipe -O2 -mcpu=ev67 -mtune=ev67"
DISTDIR="/mnt/sda2/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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="/mnt/sda6/var/tmp"
USE="X a52 aac acl acpi alpha alsa berkdb branding bzip2 cairo cdda cdr cli consolekit crypt cxx dbus dri dts dvd dvdr encode exif fam flac gdbm gif glamor gpm gtk guile iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt3support readline sdl spell sqlite sqlite3 ssl startup-notification svg symlink tcl tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 bt87x ca0106 cmipci emu10k1 ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 maestro3 trident usb-audio via82xx ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Matt Turner gentoo-dev 2019-10-14 01:13:34 UTC
Some patches went upstream a while ago to organize the layout a little better so that the jumps were in range. Can you still reproduce this on a recent kernel?
Comment 4 Stephen Lewis 2019-10-16 18:10:58 UTC
Not sure, I'll try some newer sources,
Stephen Lewis