Closed setvensxiong closed 1 year ago
@setvensxiong could you please provide more detail on how did you build your Linux image (the Linux kernel & entire rootfs)? With that information I'd like to try to reproduce your problem locally and then debug and fix it.
Question:
What's the crash with Oops by [ECR ]: 0x00040000 => Insn could not be fetched means ? Why running user space program would also cause the kernal crash by [ECR ]: 0x00040000 => Insn could not be fetched?
Thanks!
Answers:
The cross-compile toolchain & Linux kernel & entire rootfs were build from buildroot-2022.05.2 .
Then some compile options reated with our CORE real configration were added into linux-5.4.11/arch/arc/makefile, if without such options added, the kernal start up would crash with Oops by [ECR ]: 0x00040000 => Insn could not be fetched.
The compile options added like the following:
cflags-y += -mlittle-endian
cflags-y += -matomic
cflags-y += -mll64
cflags-y += -mswap
cflags-y += -mnorm
cflags-y += -mmpy-option=8
cflags-y += -mbarrel-shifter
cflags-y += -mfpu=fpud_all
cflags-y += --param l1-cache-size=32768
cflags-y += --param l1-cache-line-size=64
Then the Linux kernel was rebuild by the cross-compile toolchain build by buildroot-2022.05.2.
The specific buildroot configraion: | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | | Target Architecture (ARC (little endian)) ---> | | | | Target Binary Format (ELF) ---> | | | | Target CPU (ARC HS48 rel 31) ---> | | | | [*] Atomic extension (LLOCK/SCOND instructions) | | | | MMU Page Size (8KB) ---> | |
+------------------------------------------------------------------------------------------- Toolchain --------------------------------------------------------------------------------------------+ | Arrow keys navigate the menu. |
||
---|---|---|---|
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |||
Toolchain type (Buildroot toolchain) ---> | |||
Toolchain Buildroot Options | |||
(buildroot) custom toolchain vendor name | |||
C library (glibc) ---> | |||
Kernel Header Options | |||
Kernel Headers (Same as kernel being built) ---> | |||
Custom kernel headers series (5.4.x) ---> | |||
Glibc Options | |||
[ ] Enable compatibility shims to run on older kernels | |||
[*] Install glibc utilities | |||
Binutils Options | |||
Binutils Version (binutils arc (2.34.50)) ---> | |||
() Additional binutils options | |||
GCC Options | |||
GCC compiler Version (gcc arc (10.x)) ---> | |||
() Additional gcc options | |||
[*] Enable C++ support | |||
[ ] Enable Fortran support | |||
[ ] Enable compiler link-time-optimization support | |||
[ ] Enable graphite support | |||
Host GDB Options | |||
[*] Build cross gdb for the host | |||
[ ] TUI support | |||
[ ] Python support | |||
Toolchain Generic Options | |||
[ ] Copy gconv libraries | |||
() Extra toolchain libraries to be copied to target | |||
(-mfpu=fpud_all) Target Optimizations | |||
() Target linker options | |||
[ ] Register toolchain within Eclipse Buildroot plug-in |
+-------------------------------------------------------------------------------------- System configuration --------------------------------------------------------------------------------------+ | Arrow keys navigate the menu. |
||
---|---|---|---|
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |||
Root FS skeleton (default target skeleton) ---> | |||
(kd6x) System hostname | |||
(Welcome to the KD6X Platform) System banner | |||
Passwords encoding (sha-256) ---> | |||
Init system (BusyBox) ---> | |||
/dev management (Dynamic using devtmpfs only) ---> | |||
(system/device_table.txt) Path to the permission tables | |||
[ ] support extended attributes in device tables | |||
[ ] Use symlinks to /usr for /bin, /sbin and /lib | |||
[*] Enable root login with password | |||
(root) Root password | |||
/bin/sh (busybox' default shell) ---> | |||
[*] Run a getty (login prompt) after boot ---> | |||
[*] remount root filesystem read-write during boot | |||
(eth0) Network interface to configure through DHCP | |||
(/bin:/sbin:/usr/bin:/usr/sbin) Set the system's default PATH | |||
[*] Purge unwanted locales | |||
(C en_US) Locales to keep | |||
() Generate locale data | |||
[ ] Enable Native Language Support (NLS) | |||
[ ] Install timezone info | |||
() Path to the users tables | |||
() Root filesystem overlay directories | |||
() Custom scripts to run before commencing the build | |||
() Custom scripts to run before creating filesystem images | |||
() Custom scripts to run inside the fakeroot environment | |||
(support/scripts/genimage.sh) Custom scripts to run after creating filesystem images | |||
(-c board/synopsys/hsdk/genimage.cfg) Extra arguments passed to custom scripts | |||
+--------------------------------------------------------------------------------------------- Kernel ---------------------------------------------------------------------------------------------+ | Arrow keys navigate the menu. |
||
---|---|---|---|
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |||
[*] Linux Kernel | |||
Kernel version (Custom version) ---> | |||
(5.4.11) Kernel version | |||
() Custom kernel patches | |||
Kernel configuration (Using an in-tree defconfig file) ---> | |||
(hsdk) Defconfig name | |||
(board/synopsys/hsdk/linux.fragment) Additional configuration fragment files | |||
() Custom boot logo file path | |||
Kernel binary format (uImage) ---> | |||
Kernel compression format (gzip compression) ---> | |||
[ ] Build a Device Tree Blob (DTB) | |||
[ ] Needs host OpenSSL | |||
[ ] Needs host libelf | |||
[ ] Needs host pahole | |||
Linux Kernel Extensions ---> | |||
Linux Kernel Tools ---> |
Target packages ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +---------------------------------------------------------------------------------------- Target packages -----------------------------------------------------------------------------------------+ Arrow keys navigate the menu. selects submenus ---> (or empty submenus ----). Highlighted letters are hotkeys. Pressing selects a feature, while excludes a feature. Press to exit, <?> for Help, </> for Search. Legend: [*] feature is selected [ ] feature is excluded +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -*- BusyBox (package/busybox/busybox.config) BusyBox configuration file to use? () Additional BusyBox configuration fragment files [ ] Show packages that are also provided by busybox [ ] Individual binaries [ ] Install the watchdog daemon startup script Audio and video applications ---> Compressors and decompressors ---> Debugging, profiling and benchmark ---> Development tools ---> Filesystem and flash utilities ---> Fonts, cursors, icons, sounds and themes ---> Games ---> Graphic libraries and applications (graphic/text) ---> Hardware handling ---> Interpreter languages and scripting ---> Libraries ---> Mail ---> Miscellaneous ---> Networking applications ---> Package managers ---> Real-Time ---> Security ---> Shell and utilities ---> System tools ---> Text editors and viewers --->
+------------------------------------------------------------------------------------ Networking applications -------------------------------------------------------------------------------------+ Arrow keys navigate the menu. selects submenus ---> (or empty submenus ----). Highlighted letters are hotkeys. Pressing selects a feature, while excludes a feature. Press to exit, <?> for Help, </> for Search. Legend: [*] feature is selected [ ] feature is excluded +------------------------------------------------------------^(-)------------------------------------------------------------------------------------------------------------------------------+ [ ] netstat-nat *** NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 4.6, dynamic library, wchar, threads, gcc >= [ ] nfacct [ ] nftables [ ] nginx ---- [ ] ngircd [ ] ngrep [ ] nload [ ] nmap [ ] noip [ ] ntp [ ] nuttcp [ ] odhcp6c [ ] odhcploc [ ] olsr [ ] open-lldp [ ] open-plc-utils [ ] openntpd [ ] openobex [ ] openresolv [*] openssh [*] client [*] server [*] key utilities [ ] openswan [ ] openvpn [ ] p910nd [ ] parprouted [ ] phidgetwebservice [ ] phytool [ ] pimd [ ] pixiewps [ ] pound [ ] pppd [ ] pptp-linux [ ] privoxy [ ] proftpd prosody needs the lua interpreter, dynamic library [ ] proxychains-ng
@setvensxiong thanks for the details, but may I ask you to attach .config
file which you may find in the root folder of Buildroot to this issue? That file has all the information related to the Buildroot configuration and is way more convenient than setting all options manually.
@Alexey Brodkin
The .config file of buildroot is attached. Thanks.
At 2023-06-19 21:15:31, "Alexey Brodkin" @.***> wrote:
@setvensxiong thanks for the details, but may I ask you to attach .config file which you may find in the root folder of Buildroot to this issue? That file has all the information related to the Buildroot configuration and is way more convenient than setting all options manually.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@Alexey Brodkin
The .config file of buildroot is attached. Thanks.
ubuntu:~/buildroot-2022.05.2$ cat .config
#
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
#
#
BR2_ARCH_HAS_MMU_MANDATORY=y
BR2_arcle=y
BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y
BR2_ARCH="arc"
BR2_NORMALIZED_ARCH="arc"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_CPU="hs4x"
BR2_BINFMT_SUPPORTS_SHARED=y
BR2_READELF_ARCH_NAME="ARCv2"
BR2_BINFMT_ELF=y
BR2_archs4x=y
BR2_ARC_ATOMIC_EXT=y
BR2_arc=y
BR2_ARC_PAGE_SIZE_8K=y
BR2_ARC_PAGE_SIZE="8K"
#
#
#
#
BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn --non-interactive"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_CVS="cvs"
BR2_LOCALFILES="cp"
BR2_SCP="scp"
BR2_SFTP="sftp"
BR2_HG="hg"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_LZCAT="lzip -d -c"
BR2_TAR_OPTIONS=""
BR2_DEFCONFIG="/home/wuxin/edisk/snps/buildroot-2022.05.2/configs/snps_archs38_hsdk_defconfig"
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"
#
#
BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://cdn.kernel.org/pub"
BR2_GNU_MIRROR="http://ftpmirror.gnu.org"
BR2_LUAROCKS_MIRROR="http://rocks.moonscript.org"
BR2_CPAN_MIRROR="http://cpan.metacpan.org"
BR2_JLEVEL=0
BR2_STRIP_strip=y
BR2_STRIP_EXCLUDE_FILES=""
BR2_STRIP_EXCLUDE_DIRS=""
BR2_OPTIMIZE_3=y
BR2_SHARED_LIBS=y
BR2_PACKAGE_OVERRIDE_FILE="$(CONFIG_DIR)/local.mk"
BR2_GLOBAL_PATCH_DIR=""
#
#
BR2_COMPILER_PARANOID_UNSAFE_PATH=y
#
#
BR2_PIC_PIE_ARCH_SUPPORTS=y
BR2_PIC_PIE=y
BR2_SSP_STRONG=y
BR2_SSP_OPTION="-fstack-protector-strong"
BR2_RELRO_FULL=y
BR2_FORTIFY_SOURCE_ARCH_SUPPORTS=y
BR2_FORTIFY_SOURCE_1=y
#
#
BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT=y
#
#
BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot"
BR2_TOOLCHAIN_BUILDROOT_STATIC_LIBS_SUPPORTS=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
#
#
BR2_KERNEL_HEADERS_AS_KERNEL=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_PACKAGE_LINUX_HEADERS=y
BR2_PACKAGE_UCLIBC_ARCH_SUPPORTS=y
BR2_PACKAGE_UCLIBC_SUPPORTS=y
BR2_PACKAGE_GLIBC_ARCH_SUPPORTS=y
BR2_PACKAGE_GLIBC_SUPPORTS=y
#
#
BR2_PACKAGE_GLIBC=y
BR2_PACKAGE_GLIBC_UTILS=y
#
#
BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI=y
BR2_BINUTILS_VERSION_ARC=y
BR2_BINUTILS_VERSION="arc-2020.09-release"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""
#
#
BR2_GCC_VERSION_ARC=y
BR2_GCC_VERSION="arc-2020.09-release"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS=y
#
#
BR2_PACKAGE_HOST_GDB=y
BR2_GDB_VERSION="arc-2020.09-release-gdb"
BR2_PACKAGE_GDB_TOPLEVEL=y
#
#
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS=y
BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK=y
BR2_USE_WCHAR=y
BR2_ENABLE_LOCALE=y
BR2_INSTALL_LIBSTDCPP=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y
BR2_TOOLCHAIN_HAS_THREADS_NPTL=y
BR2_TOOLCHAIN_HAS_SSP=y
BR2_TOOLCHAIN_HAS_SSP_STRONG=y
BR2_TOOLCHAIN_HAS_UCONTEXT=y
BR2_TOOLCHAIN_SUPPORTS_PIE=y
BR2_TOOLCHAIN_EXTRA_LIBS=""
BR2_TOOLCHAIN_HAS_FULL_GETTEXT=y
BR2_USE_MMU=y
BR2_TARGET_OPTIMIZATION="-mlittle-endian -matomic -mll64 -mswap -mnorm -mmpy-option=8 -mbarrel-shifter -mfpu=fpud_all"
BR2_TARGET_LDFLAGS=""
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3=y
BR2_TOOLCHAIN_H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TOOLCHAIN_GCC_AT_LEAST_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST_9=y
BR2_TOOLCHAIN_GCC_AT_LEAST_10=y
BR2_TOOLCHAIN_GCC_AT_LEAST="10"
BR2_TOOLCHAIN_HAS_MNAN_OPTION=y
BR2_TOOLCHAIN_HAS_SYNC_1=y
BR2_TOOLCHAIN_HAS_SYNC_2=y
BR2_TOOLCHAIN_HAS_SYNC_4=y
BR2_TOOLCHAIN_HAS_LIBATOMIC=y
BR2_TOOLCHAIN_HAS_ATOMIC=y
#
#
BR2_ROOTFS_SKELETON_DEFAULT=y
BR2_TARGET_GENERIC_HOSTNAME="kd6x"
BR2_TARGET_GENERIC_ISSUE="Welcome to the KD6X Platform"
BR2_TARGET_GENERIC_PASSWD_SHA256=y
BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256"
BR2_INIT_BUSYBOX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt"
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
BR2_SYSTEM_BIN_SH_BUSYBOX=y
#
#
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="console"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP=y
BR2_TARGET_GENERIC_GETTY_BAUDRATE="0"
BR2_TARGET_GENERIC_GETTY_TERM="vt100"
BR2_TARGET_GENERIC_GETTY_OPTIONS=""
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_SYSTEM_DHCP="eth0"
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US"
BR2_GENERATE_LOCALE=""
BR2_ROOTFS_USERS_TABLES=""
BR2_ROOTFS_OVERLAY=""
BR2_ROOTFS_PRE_BUILD_SCRIPT=""
BR2_ROOTFS_POST_BUILD_SCRIPT=""
BR2_ROOTFS_POST_FAKEROOT_SCRIPT=""
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/synopsys/hsdk/genimage.cfg"
#
#
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.11"
BR2_LINUX_KERNEL_VERSION="5.4.11"
BR2_LINUX_KERNEL_PATCH=""
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="hsdk"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment"
BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH=""
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_GZIP=y
#
#
#
#
#
#
#
#
BR2_PACKAGE_BUSYBOX=y
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config"
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES=""
BR2_PACKAGE_SKELETON=y
BR2_PACKAGE_HAS_SKELETON=y
BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv"
BR2_PACKAGE_SKELETON_INIT_COMMON=y
BR2_PACKAGE_SKELETON_INIT_SYSV=y
#
#
BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS=y
BR2_PACKAGE_KODI_ARCH_SUPPORTS=y
#
#
#
#
#
#
#
#
BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC=y
#
#
#
#
BR2_PACKAGE_BPFTOOL_ARCH_SUPPORTS=y
#
#
#
#
BR2_PACKAGE_GDB_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBBPF_ARCH_SUPPORTS=y
BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS=y
BR2_PACKAGE_MEMSTAT=y
BR2_PACKAGE_NETPERF=y
BR2_PACKAGE_OPROFILE_ARCH_SUPPORTS=y
#
#
BR2_PACKAGE_PROVIDES_HOST_GETTEXT="host-gettext-tiny"
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS=y
BR2_PACKAGE_SEDUTIL_ARCH_SUPPORTS=y
#
#
#
#
#
#
#
#
#
#
#
#
BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS=y
BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER="host-lua"
BR2_PACKAGE_HOST_MONO_ARCH_SUPPORTS=y
#
#
BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS=y
BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS=y
#
#
#
#
#
#
BR2_PACKAGE_OPENAL_ARCH_SUPPORTS=y
BR2_PACKAGE_SPANDSP=y
BR2_PACKAGE_SPEEX=y
BR2_PACKAGE_SPEEXDSP=y
#
#
BR2_PACKAGE_LZ4=y
BR2_PACKAGE_LZO=y
BR2_PACKAGE_ZLIB=y
BR2_PACKAGE_LIBZLIB=y
BR2_PACKAGE_HAS_ZLIB=y
BR2_PACKAGE_PROVIDES_ZLIB="libzlib"
BR2_PACKAGE_PROVIDES_HOST_ZLIB="host-libzlib"
#
#
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_LIBOPENSSL=y
BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-generic32 no-asm"
BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_DES=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST=y
BR2_PACKAGE_LIBOPENSSL_UNSECURE=y
BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE=y
BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP=y
BR2_PACKAGE_HAS_OPENSSL=y
BR2_PACKAGE_PROVIDES_OPENSSL="libopenssl"
BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl"
#
#
#
#
BR2_PACKAGE_SQLITE=y
#
#
BR2_PACKAGE_LIBCONFIG=y
#
#
#
#
#
#
#
#
#
#
#
#
#
#
BR2_PACKAGE_JPEG=y
BR2_PACKAGE_LIBJPEG=y
BR2_PACKAGE_HAS_JPEG=y
BR2_PACKAGE_PROVIDES_JPEG="libjpeg"
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
BR2_PACKAGE_TI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BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_ETHTOOL_PRETTY_PRINT=y
#
#
BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS=y
BR2_PACKAGE_IFUPDOWN_SCRIPTS=y
BR2_PACKAGE_IPERF=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS=y
#
#
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_OPENSSH_CLIENT=y
BR2_PACKAGE_OPENSSH_SERVER=y
BR2_PACKAGE_OPENSSH_KEY_UTILS=y
#
#
#
#
The .config is packed into buildroot-2022.05.2.zip.
ruijie.zip Hi, Add rootfs.cpio and build configs(tcf), kernel build options, elf.
@setvensxiong OK, thanks for all your information! I've got the same problem reproduced locally even in simulation (in nSIM), which suggests that it's a purely software issue - which is good. And now we'll get to the bottom of it and hopefully soon you'll get a fix!
Run /init as init process
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)
OK
/etc/init.d/rcS: line 23: /etc/init.d/S40network: Permission denied
random: crng init done
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Starting sshd:
Oops
Path: /usr/sbin/sshd
CPU: 0 PID: 85 Comm: sshd Not tainted 5.4.11 #5
[ECR ]: 0x00040000 => Insn could not be fetched
[EFA ]: 0x00000000
[BLINK ]: EV_Trap+0xcc/0xd0
[ERET ]: 0x0
[STAT32]: 0x80081802 : IE K
BTA: 0x2034e9c8 SP: 0x9f28ff80 FP: 0x5fe855a8
LPS: 0x2030ea12 LPE: 0x2030ea32 LPC: 0x00000000
r00: 0x00000003 r01: 0x7fffffff r02: 0x00000000
r03: 0xae5e0800 r04: 0xd3a75a93 r05: 0x43cf29df
r06: 0xb257cc54 r07: 0xb3589fda r08: 0x000001b4
r09: 0x00000000 r10: 0x00000000 r11: 0x2034e9c8
r12: 0x809fb1a0 r13: 0x809fb1a0 r14: 0x00000001
r15: 0x400a3538 r16: 0x00000001 r17: 0xffffffff
r18: 0x00000000 r19: 0x00000000 r20: 0x9f25e918
r21: 0x9f25e918 r22: 0x80a05144 r23: 0x9f296380
r24: 0x00000000 r25: 0x00000000
Stack Trace:
@setvensxiong sorry for a delay, it took some time to get to the bottom of that problem and now everything is clear, thanks to @BrunoASMauricio debugging! And solution to your problem is very simple: just upgrade your Linux kernel version.
If you prefer to stay on v5.4, then just use the latest patch-version in that series (as of this writing it is v5.4.251), alternatively use another major version, but still preferably of the most recent patch-version.
Now in a bit more details. What happens, you're bumping into a pretty old bug in the Linux kernel, which was fixed a couple of years ago, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3433adc8bd09fc9f29b8baddf33b4ecd1ecd2cdc. That fix was also back-ported to the v5.4 LTS almost at the same time, see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e242c138ae0195edcb1a8682864e766360065808 and so kernels of version 5.4.120+ already have it.
Quite unfortunately your kernel version 5.4.11 doesn't have that problem, thus you're seeing that problem. Please let us know if your problem is now resolved.
@setvensxiong were you able to try newer kernel version?
@setvensxiong I'm closing that issue now, if you still see problems with OpenSSH please let us know and we may re-open it then.
Hi, Alexey ,
Thanks for the reply .
I will upgrade theLinux kernel as your guide.
在 2023-08-19 00:00:25,"Alexey Brodkin" @.***> 写道:
Closed #134 as completed.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi, Alexey ,
The problem is fixed by theLinux kernel updated as your guide.
Thanks.
在 2023-08-19 00:00:25,"Alexey Brodkin" @.***> 写道:
Closed #134 as completed.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
After porting OPENSSH, the system will report this error as soon as it runs
/usr/sbin/sshd &
[16440.344216]
[16440.344216] Oops [16440.347651] ------------[ cut here ]------------ [16440.352378] WARNING: CPU: 1 PID: 223 at kernel/sched/core.c:3810 show_regs+0x10/0x238 [16440.360275] DEBUG_LOCKS_WARN_ON(val > preempt_count()) [16440.360279] Modules linked in: [16440.368549] CPU: 1 PID: 223 Comm: sshd Not tainted 5.4.11 foss-for-synopsys-dwc-arc-processors/toolchain#403 [16440.374362] [16440.374362] Stack Trace: [16440.378366] arc_unwind_core+0xd0/0xf4 [16440.382220] dump_stack+0x64/0x80 [16440.385629] __warn+0x78/0xa4 [16440.388685] warn_slowpath_fmt+0x58/0x6c [16440.392691] show_regs+0x10/0x238 [16440.396092] show_kernel_fault_diag+0x24/0x48 [16440.400529] die+0x6/0x10 [16440.403240] ret_from_exception+0x0/0x8 [16440.407205] ---[ end trace 2c3ff946821ba18d ]--- [16440.411871] Path: /usr/sbin/sshd [16440.415134] CPU: 1 PID: 223 Comm: sshd Tainted: G W 5.4.11 foss-for-synopsys-dwc-arc-processors/toolchain#403 [16440.422364] [16440.422364] [ECR ]: 0x00040000 => Insn could not be fetched
[16440.439278] [STAT32]: 0x80081802 : IE K
[16440.443588] BTA: 0x200d6cc0 SP: 0x9d81ff80 FP: 0x5fbab558 [16440.449177] LPS: 0x00000010 LPE: 0x00000080 LPC: 0x00000000 [16440.454785] r00: 0x00000003 r01: 0xffffffff r02: 0x00000000 [16440.454785] r03: 0x00000000 r04: 0x00000018 r05: 0x2012a60c [16440.454785] r06: 0x00000028 r07: 0x00000000 r08: 0x000001b4 [16440.454785] r09: 0x00000000 r10: 0x00000000 r11: 0x200d6cc0 [16440.454785] r12: 0x8102b204 r13: 0x8102b204 r14: 0xffffffff [16440.454785] r15: 0x5fb1fb55 r16: 0x201104f0 r17: 0x2001de38 [16440.454785] r18: 0xfffff000 r19: 0x00000000 r20: 0x5fb1fa74 [16440.454785] r21: 0x00000001 r22: 0x00000002 r23: 0x400aefe8 [16440.454785] r24: 0x9f25a200 r25: 0x9f25a200 [16440.454785] [16440.454785] [16440.506979] [16440.506979] Stack Trace:
cat /proc/version
Linux version 5.4.11 (wuxin@ubuntu) (gcc version 10.2.0 (Buildroot 2022.05.2)) foss-for-synopsys-dwc-arc-processors/toolchain#403 SMP PREEMPT Fri Jun 9 20:55:26 PDT 2023
cat /proc/cpuinfo
IDENTITY : ARCVER [0x54] ARCNUM [0x0] CHIPID [ 0x0] processor [0] : HS48 (null) (ARCv2 ISA) Dual-Issue Timers : Timer0 Timer1 RTC [UP 64-bit] GFRC [SMP 64-bit] ISA Extn : atomic ll64 unalign mpy[opt 8] div_rem BPU : full match, cache:512, Predict Table:8192 Return stk: 4 CPU speed : 600.00 Mhz Bogo MIPS : 593.92 MMU [v5] : 8k PAGE, 2M Super Page JTLB 512 (128x4), uDTLB 8, uITLB 4 I-Cache : 32K, 4way/set, 64B Line, VIPT D-Cache : 32K, 2way/set, 64B Line, PIPT SLC : 256K, 64B Line Peripherals : 0xa0000000, IO-Coherency (per-device) (disabled) Vector Table : 0x81000000 FPU : SP DP DEBUG : RTT ActionPoint 8/full Extn [ECC] : IC DC MMU Extn [SMP] : ARConnect (v2): 2 cores with IPI IDU DEBUG GFRC
IDENTITY : ARCVER [0x54] ARCNUM [0x1] CHIPID [ 0x0] processor [1] : HS48 (null) (ARCv2 ISA) Dual-Issue Timers : Timer0 Timer1 RTC [UP 64-bit] ISA Extn : atomic ll64 unalign mpy[opt 8] div_rem BPU : full match, cache:512, Predict Table:8192 Return stk: 4 CPU speed : 600.00 Mhz Bogo MIPS : 593.92 MMU [v5] : 8k PAGE, 2M Super Page JTLB 512 (128x4), uDTLB 8, uITLB 4 I-Cache : 32K, 4way/set, 64B Line, VIPT D-Cache : 32K, 2way/set, 64B Line, PIPT SLC : 256K, 64B Line Peripherals : 0xa0000000, IO-Coherency (per-device) (disabled) Vector Table : 0x81000000 FPU : SP DP DEBUG : RTT ActionPoint 8/full Extn [ECC] : IC DC MMU Extn [SMP] : ARConnect (v2): 2 cores with IPI IDU DEBUG GFRC
#
cat /proc/crypto
name : jitterentropy_rng driver : jitterentropy_rng module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : ghash driver : ghash-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 16 digestsize : 16
name : stdrng driver : drbg_nopr_hmac_sha256 module : kernel priority : 207 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_nopr_hmac_sha512 module : kernel priority : 206 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_nopr_hmac_sha384 module : kernel priority : 205 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_nopr_hmac_sha1 module : kernel priority : 204 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_pr_hmac_sha256 module : kernel priority : 203 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_pr_hmac_sha512 module : kernel priority : 202 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_pr_hmac_sha384 module : kernel priority : 201 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : stdrng driver : drbg_pr_hmac_sha1 module : kernel priority : 200 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0
name : crc32c driver : crc32c-generic module : kernel priority : 100 refcnt : 4 selftest : passed internal : no type : shash blocksize : 1 digestsize : 4
name : aes driver : aes-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32
name : des3_ede driver : des3_ede-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 24 max keysize : 24
name : des driver : des-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 8 max keysize : 8
name : sm3 driver : sm3-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32
name : sha3-512 driver : sha3-512-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 72 digestsize : 64
name : sha3-384 driver : sha3-384-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 104 digestsize : 48
name : sha3-256 driver : sha3-256-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 136 digestsize : 32
name : sha3-224 driver : sha3-224-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 144 digestsize : 28
name : sha384 driver : sha384-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 48
name : sha512 driver : sha512-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 64
name : sha224 driver : sha224-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 28
name : sha256 driver : sha256-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32
name : sha1 driver : sha1-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 20
name : md5 driver : md5-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 16
name : ecb(cipher_null) driver : ecb-cipher_null module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 1 min keysize : 0 max keysize : 0 ivsize : 0 chunksize : 1 walksize : 1
name : digest_null driver : digest_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 1 digestsize : 0
name : compress_null driver : compress_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression
name : cipher_null driver : cipher_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 1 min keysize : 0 max keysize : 0
name : rsa driver : rsa-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : akcipher
ls /lib/
ld-linux-arc.so.2 libcrypt.so.1 libnss_files.so.2 libuuid.so.1 libanl.so.1 libdl.so.2 libpthread.so.0 libuuid.so.1.3.0 libatomic.so libgcc_s.so libresolv.so.2 modules/ libatomic.so.1 libgcc_s.so.1 librt.so.1 libatomic.so.1.2.0 libm.so.6 libthread_db.so.1 libc.so.6 libnss_dns.so.2 libutil.so.1
wuxin@ubuntu:~/nfsRoot/pkg/openssh/openssh-7.1p1$ arc-linux-readelf -d sshd
Dynamic section at offset 0x209798 contains 31 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libcrypt.so.1] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-arc.so.2] 0x0000000c (INIT) 0x3a2f8 0x0000000d (FINI) 0x1a5a10 0x00000019 (INIT_ARRAY) 0x1fd958 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x1fd95c 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x18c 0x6ffffef5 (GNU_HASH) 0x483c 0x00000005 (STRTAB) 0x130f8 0x00000006 (SYMTAB) 0x96a8 0x0000000a (STRSZ) 40752 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x0000000c (INIT) 0x3a2f8 0x0000000d (FINI) 0x1a5a10 0x00000003 (PLTGOT) 0x3a300 0x00000002 (PLTRELSZ) 27408 (bytes) 0x00000014 (PLTREL) RELA 0x00000017 (JMPREL) 0x337e4 0x00000007 (RELA) 0x1e3f4 0x00000008 (RELASZ) 87024 (bytes) 0x00000009 (RELAENT) 12 (bytes) 0x00000018 (BIND_NOW)
0x6ffffffb (FLAGS_1) Flags: NOW PIE 0x6ffffffe (VERNEED) 0x1e374 0x6fffffff (VERNEEDNUM) 3 0x6ffffff0 (VERSYM) 0x1d028 0x6ffffff9 (RELACOUNT) 6119 0x00000000 (NULL) 0x0