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


Groups > linux.debian.kernel > #63567

Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399)

From Christoph Müllner <christoph.muellner@theobroma-systems.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399)
Date 2019-03-12 19:30 +0100
Message-ID <xAUk1-PH-1@gated-at.bofh.it> (permalink)
References <xzbIl-tw-1@gated-at.bofh.it> <xzbIl-tw-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


I've been able to reproduce and analyse this issue.

The security error seems to be valid.

What actually happens is, that dmidecode does the following (strace):

> openat(AT_FDCWD, "/dev/mem"
> , O_RDONLY)  = 3
> fstat(3, {st_mode=S_IFCHR|0640, st_rdev=makedev(1, 1), ...}) = 0
> mmap(NULL, 65536, PROT_READ, MAP_SHARED, 3, 0xf0000) = 0xffff87770000
> --- SIGBUS {si_signo=SIGBUS, si_code=BUS_OBJERR, si_addr=0xffff87770000} ---
> +++ killed by SIGBUS +++
> Bus error

According to the dmidecode source code (dmidecode.c) this is some sort
of fallback mechanism for x86 and or x86_64. In any case that's not a valid
access on arm64.

I think this should not be done in dmidecode on non-x86 machines (maybe with #ifdef __x86_64__ and friends).

> ...
> memory_scan:
>         
> if
>  (!(opt.flags & FLAG_QUIET))
>                 printf(
> "Scanning %s for entry point.\n"
> , opt.devmem);
>         /* Fallback to memory scan (x86, x86_64) */
>         
> if
>  ((buf = mem_chunk(0xF0000, 0x10000, opt.devmem)) == NULL)
>         {
>                 ret = 1;
>                 
> goto
>  exit_free;
>         }
> ...


The reason why the fallback is executed is that the kernel does not find DMI
and reports this during bootup as:

> [    0.353729] DMI not present or invalid.

This is caused by the fact that the bootloader (U-Boot) does not have
EFI support enabled and thus does not provide the DMI.
This is something we will address.

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399) Vagrant Cascadian <vagrant@debian.org> - 2019-03-08 01:40 +0100
  Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399) Christoph Müllner <christoph.muellner@theobroma-systems.com> - 2019-03-12 19:30 +0100
    Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399) Ben Hutchings <ben@decadent.org.uk> - 2019-03-12 22:10 +0100
  Bug#923988: /boot/vmlinuz-4.19.0-2-arm64: dmidecode causes kernel panic (puma-rk3399) Christoph Müllner  <christoph.muellner@theobroma-systems.com> - 2019-03-12 22:10 +0100

csiph-web