[Linux-PowerEdge] FYI: BIOS Update fails due to CONFIG_STRICT_DEVMEM=y in linux kernel 4.16+

Stephen Dowdy sdowdy at ucar.edu
Thu Jul 12 14:18:52 CDT 2018


New PowerEdge T640 server needs BIOS update, however, it borks out with:

     terminate called after throwing an instance of 'smbios::InternalErrorImpl'
       what():  Could not instantiate SMBIOS table.
     /opt/dell/updatepackage/BIOS_4F4K0_LN_1.4.8.BIN-64420.wnGVr8/spsetup.sh: line 1331: 65177 Aborted                 $cmd "$@"
     .
     The update failed to complete
     ERROR: BIOS_4F4K0_LN_1.4.8.BIN execution MAY have failed, or you answered NO to reboot, sorry (return_code=1)

(NOTE: the last message is from my 'dup_run_debian' wrapper script that works around various DUP kit issues related to non-POSIX /bin/sh invocations, RHEL-presumptions, xterm forced uses, blah, blah, blah of various DUP kits that i've had to struggle with in the past.  THANKFULLY, Dell's getting serious about fixing some of these things in the past couple years)

i found the error is in spsetup.sh calling _execCmd() on 'biosie -u', and strace sez:
     3359  open("/dev/mem", O_RDONLY)        = 3
     3359  mmap(NULL, 65536, PROT_READ, MAP_PRIVATE, 3, 0xe0000) = 0x7fb6f4c63000
     3359  munmap(0x7fb6f4c63000, 65536)     = 0
     3359  mmap(NULL, 65536, PROT_READ, MAP_PRIVATE, 3, 0xf0000) = 0x7fb6f4c63000
     3359  munmap(0x7fb6f4c63000, 65536)     = 0
     3359  mmap(NULL, 65536, PROT_READ, MAP_PRIVATE, 3, 0x6ca00000) = -1 EPERM (Operation not permitted)
     3359  futex(0x7fb6f3bf01a0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
     3359  write(2, "terminate called after throwing "..., 48) = 48
     3359  write(2, "smbios::InternalErrorImpl", 25) = 25
     3359  write(2, "'\n", 2)                = 2
     3359  write(2, "  what():  ", 11)       = 11
     3359  write(2, "Could not instantiate SMBIOS tab"..., 35) = 35
     3359  write(2, "\n", 1)                = 1

ran across this:

https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.16-Def-Strict-Dev-Mem
     "...Enabling CONFIG_STRICT_DEVMEM implements strict access to /dev/mem so that it only allows user-space access to memory mapped peripherals...."

     ~/BIOS# grep STRICT_DEVMEM /boot/config-$(uname -r)
     CONFIG_STRICT_DEVMEM=y
     CONFIG_IO_STRICT_DEVMEM=y

Sigh.

     ~/BIOS# cat /dev/mem | wc -c
     cat: /dev/mem: Operation not permitted
     1048576

So, we have a 1MB access limit, as expected with CONFIG_STRICT_DEVMEM

and sure enough, 'biosie -u' is trying to read offset 0x6ca00000, which is definitely > 1MB  (the first two are below 1MB and succeed)

AFAICT, This requires rebuilding a kernel from scratch with 'CONFIG_STRICT_DEVMEM=n'

Can anyone from Dell identify if there's something that can be done either in 'biosie' or by arm-twisting Linux kernel devs to allow other regions to be mapped? (if that's necessary).  (is there ANY way, i as a normal customer, can use a formal channel to report bugs/misfeatures like this?)

thanks,
--stephen

-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/



More information about the Linux-PowerEdge mailing list