Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #67041 > unrolled thread

Missing symbol on sh4: "__get_user_unknown"

Started byJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
First post2020-05-10 12:40 +0200
Last post2020-05-10 16:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  Missing symbol on sh4: "__get_user_unknown" John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2020-05-10 12:40 +0200
    Re: Missing symbol on sh4: "__get_user_unknown" Ben Hutchings <ben@decadent.org.uk> - 2020-05-10 15:30 +0200
      Re: Missing symbol on sh4: "__get_user_unknown" John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2020-05-10 16:00 +0200

#67041 — Missing symbol on sh4: "__get_user_unknown"

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2020-05-10 12:40 +0200
SubjectMissing symbol on sh4: "__get_user_unknown"
Message-ID<A4Rxg-5HQ-33@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

(Please keep me CC'ed, I'm not subscribed to debian-kernel@)

Hi!

src:linux hasn't been building on sh4 in the past for a while now due to objdump
locking up during the build.

However, this problem has recently vanished, I assume maybe because the bug was
fixed in binutils.

In any case, the kernel package now fails to build due to a missing symbol in the
Infiniband core driver (see below). A simple workaround is to disable Infiniband
support which allows me to build the kernel package normally (which I did and
consequently uploaded).

I vaguely remember that I have seen such issues with missing symbols in the past
with the kernel package, but I don't remember the details.

Does anyone know how to address this issue below?

Also, on sh4, the kernel needs a tiny patch by Arnd Bergmann to fix the systemd
build on sh4 after the Y2038 changes in the kernel (attached). Shall I open
a PR for that?

Thanks,
Adrian

gcc-9 -Wp,-MD,arch/sh/boot/compressed/.lshrsi3.o.d  -nostdinc -isystem /usr/lib/gcc/sh4-linux-gnu/9/include -I/<<PKGBUILDDIR>>/arch/sh/include -I./arch/sh/include/generated -I/<<PKGBUILDDIR>>/include -I./include -I/<<PKGBUILDDIR>>/arch/sh/include/uapi -I./arch/sh/include/generated/uapi -I/<<PKGBUILDDIR>>/include/uapi -I./include/generated/uapi -include /<<PKGBUILDDIR>>/include/linux/kconfig.h -D__KERNEL__ -m4 -m4-nofpu -ml -mno-fdpic -Wa,-isa=sh4-up -ffreestanding -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-sh4 -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-common -I /<<PKGBUILDDIR>>/arch/sh/include/mach-r2d -I /<<PKGBUILDDIR>>/arch/sh/include/mach-common -D__ASSEMBLY__ -fno-PIE -m4 -m4-nofpu -ml -mno-fdpic -Wa,-isa=sh4-up -ffreestanding -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-sh4 -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-common -I /<<PKGBUILDDIR>>/arch/sh/include/mach-r2d -I /<<PKGBUILDDIR>>/arch/sh/include/mach-common -Wa,-gdwarf-2 -I /<<PKGBUILDDIR>>/arch/sh/boot/compressed -I ./arch/sh/boot/compressed    -c -o arch/sh/boot/compressed/lshrsi3.o arch/sh/boot/compressed/lshrsi3.S
  ld  -EL   -r --format binary --oformat elf32-sh-linux -T /<<PKGBUILDDIR>>/arch/sh/boot/compressed/vmlinux.scr arch/sh/boot/compressed/vmlinux.bin.xz -o arch/sh/boot/compressed/piggy.o
  ld  -EL   --oformat elf32-sh-linux -Ttext 0x8c800000 -e startup -T arch/sh/boot/compressed/../../kernel/vmlinux.lds arch/sh/boot/compressed/head_32.o arch/sh/boot/compressed/misc.o arch/sh/boot/compressed/cache.o arch/sh/boot/compressed/piggy.o arch/sh/boot/compressed/ashiftrt.o arch/sh/boot/compressed/ashldi3.o arch/sh/boot/compressed/ashrsi3.o arch/sh/boot/compressed/ashlsi3.o arch/sh/boot/compressed/lshrsi3.o -o arch/sh/boot/compressed/vmlinux
  objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S  arch/sh/boot/compressed/vmlinux arch/sh/boot/zImage
  Kernel: arch/sh/boot/zImage is ready
ERROR: "__get_user_unknown" [drivers/infiniband/core/ib_uverbs.ko] undefined!
make[5]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.modpost:93: __modpost] Error 1
make[4]: *** [/<<PKGBUILDDIR>>/Makefile:1296: modules] Error 2
make[3]: *** [/<<PKGBUILDDIR>>/Makefile:180: sub-make] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build_sh4_none_sh7751r'
make[2]: *** [debian/rules.real:213: debian/stamps/build_sh4_none_sh7751r] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules.gen:701: build-arch_sh4_none_sh7751r_real] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:33: build-arch] Error 2

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [next] | [standalone]


#67046

FromBen Hutchings <ben@decadent.org.uk>
Date2020-05-10 15:30 +0200
Message-ID<A4UbM-7lE-13@gated-at.bofh.it>
In reply to#67041

[Multipart message — attachments visible in raw view] — view raw

On Sun, 2020-05-10 at 12:38 +0200, John Paul Adrian Glaubitz wrote:
> (Please keep me CC'ed, I'm not subscribed to debian-kernel@)
> 
> Hi!
> 
> src:linux hasn't been building on sh4 in the past for a while now due to objdump
> locking up during the build.
> 
> However, this problem has recently vanished, I assume maybe because the bug was
> fixed in binutils.
> 
> In any case, the kernel package now fails to build due to a missing symbol in the
> Infiniband core driver (see below). A simple workaround is to disable Infiniband
> support which allows me to build the kernel package normally (which I did and
> consequently uploaded).
[...]

__get_user_unknown() is never defined, but will be referenced if the
get_user() macro is invoked with a variable of unsupported size (see
arch/sh/include/asm/uaccess.h).  So my guess is that this module uses
get_user() to read a 64-bit value.  Some 32-bit architectures do now
support this operation but I'm not sure whether they are expected to.

This seems to have been introduced by commit 3a6532c9af1a, and could
probably be fixed by replacing the get_user() with a copy_from_user().

We could disable IB since it doesn't seem that likely to be used on
sh4, although I think the "verbs" layer can be used on top of Ethernet.

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
                                                      - Albert Einstein

[toc] | [prev] | [next] | [standalone]


#67050

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2020-05-10 16:00 +0200
Message-ID<A4UEN-7vz-7@gated-at.bofh.it>
In reply to#67046
On 5/10/20 3:27 PM, Ben Hutchings wrote:
>> In any case, the kernel package now fails to build due to a missing symbol in the
>> Infiniband core driver (see below). A simple workaround is to disable Infiniband
>> support which allows me to build the kernel package normally (which I did and
>> consequently uploaded).
> [...]
> 
> __get_user_unknown() is never defined, but will be referenced if the
> get_user() macro is invoked with a variable of unsupported size (see
> arch/sh/include/asm/uaccess.h).  So my guess is that this module uses
> get_user() to read a 64-bit value.  Some 32-bit architectures do now
> support this operation but I'm not sure whether they are expected to.

I see, thanks a lot for the explanation.

> This seems to have been introduced by commit 3a6532c9af1a, and could
> probably be fixed by replacing the get_user() with a copy_from_user().
> 
> We could disable IB since it doesn't seem that likely to be used on
> sh4, although I think the "verbs" layer can be used on top of Ethernet.

I'm fine with that.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web