Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amlogic crashes and errors with 2GB boards on GXL (S905X S905D) with ethernet plugged in #5

Closed
dsx724 opened this issue Jul 15, 2022 · 11 comments

Comments

@dsx724
Copy link

dsx724 commented Jul 15, 2022

On S905X/S905D and other Amlogic platforms, we detect system hang and soft errors with S905X/S905D 2GB+ boards with ethernet plugged in. 1GB boards S805X/S905X do not have any problems. Some boards use the onboard PHY and others use an external PHY.

Requirements to trigger problem:

  • 2GB/3GB S905X/S905D board
  • Ethernet plugged in

There are currently several partial resolutions that break other things.

  1. Set kernel cmdline to mem=1G to disallow the use of the RAM past 1GB. This effectively reduces usable memory by half.
  2. Disable ethernet initialization in u-boot. -CONFIG_ETH_DESIGNWARE_MESON8B=y However, when we boot into Linux, unrecoverable "no carrier" ethernet issue despite full ethtool reset. I'm not sure if there's some ethernet bringup bits in u-boot that is not in upstream Linux.

This occurs on vanilla u-boot 2022.07 and Linux 5.19.0, 5.15, 5.10. Also occurs with the ethernet reset and stmmac don't double poke register patches.

This was tested in a setup with 10 S905X boards, 2 S805X boards, 1 S905D board. Boards varied by manufacturer but the problem is identical so this is not a manufacturer specific hardware issue.
4 S905X 2GB boards - normal kernel - normal u-boot: crash within 5 min.
2 S905X 2GB boards - normal kernel - no eth init u-boot: passes 24 hours but "no carrier" problem.
2 S905X 2GB board - mem=1G kernel - normal u-boot: passed 24 hours.
2 S905X 1GB board - normal kernel - normal u-boot: passes 24 hours.
2 S805X 1GB boards - normal kernel -normal u-boot: passes 24 hours.
1 S905D 3GB board - normal kernel - normal u-boot crashes within 5 mins.

The issue seems to originate from the stmmac used by Amlogic SoCs as both the integrated PHY and external gigabit PHYs are affected. We need more documentation on the implementation of this IP and possible quirks.

Things I have tried that are ineffective in solving the problem.
CPU governor performance in cmdline
Kernel without io elevator
eMMC and MicroSD cards
Changing rootfs between ext4/btrfs
Happens across distributions ubuntu/debian
Remove serial console from cmdline and device tree
Reduce initial u-boot cpu and memory frquency to 888MHz

The following reboot script can be installed onto an Ubuntu image. It will stop rebooting if it detects a kernel taint.
username ubuntu
password ubuntu

P212 bootloader
dd if=u-boot-latest-p212 of=/dev/SDCARD bs=512 seek=1

@dsx724
Copy link
Author

dsx724 commented Jul 18, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.18.11-00249-gae322e500418 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]2
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x58347040 MEMRESERVE=0x58346040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3eab40-0x7f3ecfff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x0000000058346fff]
[ 0.000000] node 0: [mem 0x0000000058347000-0x0000000058347fff]
[ 0.000000] node 0: [mem 0x0000000058348000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s42856 r8192 d30872 u81920
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro console=tty1 console=ttyAML0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1678684K/2097152K available (13568K kernel code, 1686K rwdata, 5316K rodata, 3264K init, 391K bss, 156324K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000522] Console: colour dummy device 80x25
[ 0.001065] printk: console [tty1] enabled
[ 0.001146] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001171] pid_max: default: 32768 minimum: 301
[ 0.001236] LSM: Security Framework initializing
[ 0.001341] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.001368] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002588] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.002627] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002697] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002833] rcu: Hierarchical SRCU implementation.
[ 0.003812] Remapping and enabling EFI services.
[ 0.004210] smp: Bringing up secondary CPUs ...
[ 0.004715] Detected VIPT I-cache on CPU1
[ 0.004780] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.005362] Detected VIPT I-cache on CPU2
[ 0.005412] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.005955] Detected VIPT I-cache on CPU3
[ 0.006002] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.006071] smp: Brought up 1 node, 4 CPUs
[ 0.006139] SMP: Total of 4 processors activated.
[ 0.006151] CPU features: detected: 32-bit EL0 Support
[ 0.006161] CPU features: detected: 32-bit EL1 Support
[ 0.006172] CPU features: detected: CRC32 instructions
[ 0.006552] CPU: All CPU(s) started at EL2
[ 0.006588] alternatives: patching kernel code
[ 0.008047] devtmpfs: initialized
[ 0.014013] Registered cp15_barrier emulation handler
[ 0.014052] Registered setend emulation handler
[ 0.014067] KASLR enabled
[ 0.014241] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.014271] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.020379] pinctrl core: initialized pinctrl subsystem
[ 0.020934] SMBIOS 3.0 present.
[ 0.020975] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.021460] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.022927] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.023133] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.023281] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.023370] audit: initializing netlink subsys (disabled)
[ 0.023562] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[ 0.024573] thermal_sys: Registered thermal governor 'step_wise'
[ 0.024584] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.024820] cpuidle: using governor menu
[ 0.025063] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.025173] ASID allocator initialised with 32768 entries
[ 0.025929] Serial: AMBA PL011 UART driver
[ 0.038136] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.039516] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.039934] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.049918] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.049953] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.049966] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.049979] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.051254] ACPI: Interpreter disabled.
[ 0.052467] iommu: Default domain type: Translated
[ 0.052498] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.052778] SCSI subsystem initialized
[ 0.053195] usbcore: registered new interface driver usbfs
[ 0.053243] usbcore: registered new interface driver hub
[ 0.053280] usbcore: registered new device driver usb
[ 0.053626] pps_core: LinuxPPS API ver. 1 registered
[ 0.053639] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.053664] PTP clock support registered
[ 0.053784] EDAC MC: Ver: 3.0.0
[ 0.054320] Registered efivars operations
[ 0.054738] FPGA manager framework
[ 0.054844] Advanced Linux Sound Architecture Driver Initialized.
[ 0.055563] vgaarb: loaded
[ 0.056006] clocksource: Switched to clocksource arch_sys_counter
[ 0.056227] VFS: Disk quotas dquot_6.6.0
[ 0.056291] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.056583] pnp: PnP ACPI: disabled
[ 0.061716] NET: Registered PF_INET protocol family
[ 0.061889] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.062890] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.062986] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.063011] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.063131] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.063352] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.063477] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.063536] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.063698] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.064123] RPC: Registered named UNIX socket transport module.
[ 0.064151] RPC: Registered udp transport module.
[ 0.064161] RPC: Registered tcp transport module.
[ 0.064171] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.064189] PCI: CLS 0 bytes, default 64
[ 0.064413] Unpacking initramfs...
[ 0.076617] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.077128] kvm [1]: IPA Size Limit: 40 bits
[ 0.078286] kvm [1]: vgic interrupt IRQ9
[ 0.078431] kvm [1]: Hyp mode initialized successfully
[ 0.079758] Initialise system trusted keyrings
[ 0.080042] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.086067] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.086766] NFS: Registering the id_resolver key type
[ 0.086819] Key type id_resolver registered
[ 0.086832] Key type id_legacy registered
[ 0.086937] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.086958] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.087188] 9p: Installing v9fs 9p2000 file system support
[ 0.122418] Key type asymmetric registered
[ 0.122453] Asymmetric key parser 'x509' registered
[ 0.122542] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.122561] io scheduler mq-deadline registered
[ 0.122573] io scheduler kyber registered
[ 0.122618] io scheduler bfq registered
[ 0.123778] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.132178] EINJ: ACPI disabled.
[ 0.140649] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.145218] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.147525] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 22, base_baud = 1500000) is a meson_uart
[ 0.352509] Freeing initrd memory: 28836K
[ 0.352944] printk: console [ttyAML0] enabled
[ 1.223351] loop: module loaded
[ 1.224231] megasas: 07.719.03.00-rc1
[ 1.228343] tun: Universal TUN/TAP device driver, 1.6
[ 1.230152] thunder_xcv, ver 1.0
[ 1.232761] thunder_bgx, ver 1.0
[ 1.235919] nicpf, ver 1.0
[ 1.238965] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 1.245737] hns3: Copyright (c) 2017 Huawei Corporation.
[ 1.251074] hclge is initializing
[ 1.254278] e1000: Intel(R) PRO/1000 Network Driver
[ 1.259092] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 1.264822] e1000e: Intel(R) PRO/1000 Network Driver
[ 1.269702] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.275604] igb: Intel(R) Gigabit Ethernet Network Driver
[ 1.280915] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 1.286462] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 1.292645] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 1.298688] sky2: driver version 1.30
[ 1.302550] VFIO - User Level meta-driver version: 0.3
[ 1.308802] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.313712] ehci-pci: EHCI PCI platform driver
[ 1.318127] ehci-platform: EHCI generic platform driver
[ 1.323417] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.329416] ohci-pci: OHCI PCI platform driver
[ 1.333843] ohci-platform: OHCI generic platform driver
[ 1.339392] usbcore: registered new interface driver usb-storage
[ 1.346654] i2c_dev: i2c /dev entries driver
[ 1.351234] sdhci: Secure Digital Host Controller Interface driver
[ 1.355301] sdhci: Copyright(c) Pierre Ossman
[ 1.360059] Synopsys Designware Multimedia Card Interface Driver
[ 1.366336] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.367007] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 1.376725] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.383490] efifb: probing for efifb
[ 1.386308] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 1.392612] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 1.398645] efifb: scrolling: redraw
[ 1.402180] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 1.414336] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 1.414351] mmc0: error -22 whilst initialising SDIO card
[ 1.418093] Console: switching to colour frame buffer device 240x67
[ 1.439083] fb0: EFI VGA frame buffer device
[ 1.443539] meson-sm: secure-monitor enabled
[ 1.448369] usbcore: registered new interface driver usbhid
[ 1.453052] usbhid: USB HID core driver
[ 1.457521] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 1.467735] NET: Registered PF_PACKET protocol family
[ 1.468847] 9pnet: Installing 9P2000 support
[ 1.472946] Key type dns_resolver registered
[ 1.477482] registered taskstats version 1
[ 1.481179] Loading compiled-in X.509 certificates
[ 1.486544] zswap: loaded using pool lz4/z3fold
[ 1.508079] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 1.508179] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 2.052973] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 2.054659] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 2.061885] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 2.070154] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.074078] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 2.081752] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 2.090994] xhci-hcd xhci-hcd.0.auto: irq 48, io mem 0xc9000000
[ 2.096928] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.102230] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 2.109833] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 2.117056] hub 1-0:1.0: USB hub found
[ 2.120039] hub 1-0:1.0: 2 ports detected
[ 2.124314] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 2.132536] hub 2-0:1.0: USB hub found
[ 2.135698] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 2.144798] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 2.14d346] meson-gx-mmc d0072000.mmc: Got CD GPIO
omain-0 init dvfs: 4
[ 2.170002] ALSA device list:
[ 2.170068] No soundcards found.
[ 2.182509] Freeing unused kernel memory: 3264K
[ 2.188093] Run /init as init process
Loading, please wait...
[ 2.228162] mmc1: new high speed SDHC card at address aaaa
[ 2.231295] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
[ 2.242075] mmcblk1: p1 p2
Starting version 249.11-0ubuntu3.4
[ 2.380058] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 2.448478] mmc0: Card stuck being busy! __mmc_poll_for_busy
[ 2.564895] hub 1-1:1.0: USB hub found
[ 2.567289] hub 1-1:1.0: 4 ports detected
[ 2.651611] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
[ 2.654806] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
[ 2.660908] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[ 2.667625] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[ 2.673785] meson8b-dwmac c9410000.ethernet: DWMAC1000
[ 2.674501] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 2.678892] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[ 2.691821] fb0: switching to meson from EFI VGA
[ 2.691871] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[ 2.703889] meson8b-dwmac c9410000.ethernet: COE Type 2
[ 2.709064] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[ 2.716016] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[ 2.729494] meson8b-dwmac c9410000.ethernet: Normal descriptors
[ 2.735736] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[ 2.738944] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
[ 2.744857] Console: switching to colour dummy device 80x25
[ 2.748579] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.770440] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
[ 2.770501] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
[ 2.770542] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
[ 2.770587] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
[ 2.770599] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
[ 2.782134] lima d00c0000.gpu: bus rate = 166666667
[ 2.814147] lima d00c0000.gpu: mod rate = 24000000
[ 2.814240] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[ 2.815562] lima d00c0000.gpu: Failed to register cooling device
[ 2.832861] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 1
[ 2.844121] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[ 2.853112] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[ 2.857118] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
[ 2.866320] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
[ 2.936030] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
[ 3.114041] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
[ 3.187593] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
[ 3.226216] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
[ 3.240429] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
[ 3.320887] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
[ 3.325082] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
[ 3.326232] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
[ 3.326846] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
[ 3.516944] Console: switching to colour frame buffer device 240x67
[ 3.649586] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [ 4.144006] raid6: neonx8 gen() 2601 MB/s
[ 4.212001] raid6: neonx4 gen() 2642 MB/s
[ 4.280033] raid6: neonx2 gen() 2548 MB/s
[ 4.348007] raid6: neonx1 gen() 1720 MB/s
[ 4.416001] raid6: int64x8 gen() 1434 MB/s
[ 4.484006] raid6: int64x4 gen() 1999 MB/s
[ 4.551999] raid6: int64x2 gen() 1671 MB/s
[ 4.620005] raid6: int64x1 gen() 1244 MB/s
[ 4.620072] raid6: using algorithm neonx4 gen() 2642 MB/s
[ 4.692011] raid6: .... xor() 1893 MB/s, rmw enabled
[ 4.692017] raid6: using neon recovery algorithm
[ 4.696826] xor: measuring software checksum speed
[ 4.703720] 8regs : 3309 MB/sec
[ 4.708000] 32regs : 3309 MB/sec
[ 4.712694] arm64_neon : 2932 MB/sec
[ 4.713637] xor: using function: 32regs (3309 MB/sec)
[ 4.739930] Btrfs loaded, crc32c=crc32c-generic, zoned=yes, fsverity=no
Scanning for Btrfs filesystems
[ 4.895336] BTRFS: device label writable devid 1 transid 268 /dev/mmcblk1p2 scanned by btrfs (244)
done.
Begin: Will now check root file system ... fsck from util-linux 2.37.2
[/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
done.
[ 5.038718] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
[ 5.040617] BTRFS info (device mmcblk1p2): disk space caching is enabled
[ 5.047214] BTRFS info (device mmcblk1p2): has skinny extents
[ 5.074261] BTRFS info (device mmcblk1p2): enabling ssd optimizations
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[ 26.375994] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 26.376522] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 26.382639] (detected by 2, t=5252 jiffies, g=-331, q=578)
[ 26.388154] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 26.398026] Call trace:
[ 26.400370] dump_backtrace.part.6+0xdc/0xe8
[ 26.404613] show_stack+0x18/0x68
[ 26.407881] sched_show_task+0x154/0x198
[ 26.411768] rcu_sched_clock_irq+0xd10/0xdd8
[ 26.415997] update_process_times+0x9c/0xd0
[ 26.420137] tick_sched_handle.isra.19+0x34/0x58
[ 26.424712] tick_sched_timer+0x4c/0xa8
[ 26.428500] __hrtimer_run_queues+0x120/0x1b8
[ 26.432817] hrtimer_interrupt+0xd8/0x238
[ 26.436782] arch_timer_handler_phys+0x2c/0x50
[ 26.444535] handle_percpu_devid_irq+0x84/0x138
[ 26.448962] generic_handle_domain_irq+0x2c/0x48
[ 26.453508] gic_handle_irq+0xa4/0xc0
[ 26.457100] call_on_irq_stack+0x2c/0x58
[ 26.460946] do_interrupt_handler+0x80/0x88
[ 26.465056] el1_interrupt+0x38/0x70
[ 26.468552] el1h_64_irq_handler+0x18/0x28
[ 26.472573] el1h_64_irq+0x64/0x68
[ 26.475888] xas_find+0x188/0x1d8
[ 26.479124] find_lock_entries+0x7c/0x280
[ 26.483067] truncate_inode_pages_range+0xa8/0x490
[ 26.487796] truncate_inode_pages_final+0x58/0x78
[ 26.492409] evict+0x144/0x150
[ 26.495383] iput+0x128/0x190
[ 26.498282] do_unlinkat+0x17c/0x2a8
[ 26.501774] __arm64_sys_unlinkat+0x40/0x88
[ 26.505887] invoke_syscall+0x44/0x100
[ 26.509558] el0_svc_common.constprop.3+0x6c/0xf0
[ 26.514194] do_el0_svc+0x24/0x88
[ 26.517430] el0_svc+0x20/0x60
[ 26.520405] el0t_64_sync_handler+0x90/0xb8
[ 26.524520] el0t_64_sync+0x170/0x174
[ 33.764023] VDDIO_BOOT: disabling
[ 89.543994] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 89.546985] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 89.553110] (detected by 2, t=21046 jiffies, g=-331, q=578)
[ 89.558745] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 89.568546] Call trace:
[ 89.570963] dump_backtrace.part.6+0xdc/0xe8
[ 89.575051] show_stack+0x18/0x68
[ 89.578290] sched_show_task+0x154/0x198
[ 89.582193] rcu_sched_clock_irq+0xd10/0xdd8
[ 89.586442] update_process_times+0x9c/0xd0
[ 89.590597] tick_sched_handle.isra.19+0x34/0x58
[ 89.595189] tick_sched_timer+0x4c/0xa8
[ 89.598992] __hrtimer_run_queues+0x120/0x1b8
[ 89.603328] hrtimer_interrupt+0xd8/0x238
[ 89.607314] arch_timer_handler_phys+0x2c/0x50
[ 89.611714] handle_percpu_devid_irq+0x84/0x138
[ 89.616191] generic_handle_domain_irq+0x2c/0x48
[ 89.620768] gic_handle_irq+0xa4/0xc0
[ 89.624378] call_on_irq_stack+0x2c/0x58
[ 89.628252] do_interrupt_handler+0x80/0x88
[ 89.632413] el1_interrupt+0x38/0x70
[ 89.635955] el1h_64_irq_handler+0x18/0x28
[ 89.640004] el1h_64_irq+0x64/0x68
[ 89.643329] xas_descend+0x24/0x88
[ 89.646637] xas_find+0x190/0x1d8
[ 89.649863] find_lock_entries+0x7c/0x280
[ 89.653831] truncate_inode_pages_range+0xa8/0x490
[ 89.658589] truncate_inode_pages_final+0x58/0x78
[ 89.663232] evict+0x144/0x150
[ 89.666216] iput+0x128/0x190
[ 89.669125] do_unlinkat+0x17c/0x2a8
[ 89.672642] __arm64_sys_unlinkat+0x40/0x88
[ 89.676746] invoke_syscall+0x44/0x100
[ 89.680416] el0_svc_common.constprop.3+0x6c/0xf0
[ 89.685085] do_el0_svc+0x24/0x88
[ 89.688353] el0_svc+0x20/0x60
[ 89.691366] el0t_64_sync_handler+0x90/0xb8
[ 89.695513] el0t_64_sync+0x170/0x174
[ 152.687993] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 152.690729] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 152.696831] (detected by 2, t=36832 jiffies, g=-331, q=578)
[ 152.702443] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 152.712356] Call trace:
[ 152.714732] dump_backtrace.part.6+0xdc/0xe8
[ 152.718978] show_stack+0x18/0x68
[ 152.722241] sched_show_task+0x154/0x198
[ 152.726122] rcu_sched_clock_irq+0xd10/0xdd8
[ 152.730355] update_process_times+0x9c/0xd0
[ 152.734491] tick_sched_handle.isra.19+0x34/0x58
[ 152.739071] tick_sched_timer+0x4c/0xa8
[ 152.742856] __hrtimer_run_queues+0x120/0x1b8
[ 152.747184] hrtimer_interrupt+0xd8/0x238
[ 152.751157] arch_timer_handler_phys+0x2c/0x50
[ 152.755564] handle_percpu_devid_irq+0x84/0x138
[ 152.760043] generic_handle_domain_irq+0x2c/0x48
[ 152.764635] gic_handle_irq+0xa4/0xc0
[ 152.768246] call_on_irq_stack+0x2c/0x58
[ 152.772137] do_interrupt_handler+0x80/0x88
[ 152.776285] el1_interrupt+0x38/0x70
[ 152.779814] el1h_64_irq_handler+0x18/0x28
[ 152.783869] el1h_64_irq+0x64/0x68
[ 152.787214] xas_load+0x54/0x78
[ 152.790305] xas_find+0x190/0x1d8
[ 152.793578] find_lock_entries+0x7c/0x280
[ 152.797553] truncate_inode_pages_range+0xa8/0x490
[ 152.802319] truncate_inode_pages_final+0x58/0x78
[ 152.806962] evict+0x144/0x150
[ 152.809949] iput+0x128/0x190
[ 152.812856] do_unlinkat+0x17c/0x2a8
[ 152.816375] __arm64_sys_unlinkat+0x40/0x88
[ 152.820477] invoke_syscall+0x44/0x100
[ 152.824148] el0_svc_common.constprop.3+0x6c/0xf0
[ 152.828819] do_el0_svc+0x24/0x88
[ 152.832087] el0_svc+0x20/0x60
[ 152.835101] el0t_64_sync_handler+0x90/0xb8
[ 152.839247] el0t_64_sync+0x170/0x174

@dsx724
Copy link
Author

dsx724 commented Jul 18, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.18.11-00249-gae322e500418 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]2
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x58347040 MEMRESERVE=0x58346040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3ebb40-0x7f3edfff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x0000000058346fff]
[ 0.000000] node 0: [mem 0x0000000058347000-0x0000000058347fff]
[ 0.000000] node 0: [mem 0x0000000058348000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s42856 r8192 d30872 u81920
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro systemd.log_level=debug systemd.log_target=console console=tty1 console0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1678688K/2097152K available (13568K kernel code, 1686K rwdata, 5316K rodata, 3264K init, 391K bss, 156320K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000541] Console: colour dummy device 80x25
[ 0.001087] printk: console [tty1] enabled
[ 0.001165] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001189] pid_max: default: 32768 minimum: 301
[ 0.001254] LSM: Security Framework initializing
[ 0.001358] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.001385] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002606] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.002646] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002718] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002852] rcu: Hierarchical SRCU implementation.
[ 0.003857] Remapping and enabling EFI services.
[ 0.004252] smp: Bringing up secondary CPUs ...
[ 0.004756] Detected VIPT I-cache on CPU1
[ 0.004819] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.005389] Detected VIPT I-cache on CPU2
[ 0.005442] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.005974] Detected VIPT I-cache on CPU3
[ 0.006023] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.006094] smp: Brought up 1 node, 4 CPUs
[ 0.006163] SMP: Total of 4 processors activated.
[ 0.006175] CPU features: detected: 32-bit EL0 Support
[ 0.006184] CPU features: detected: 32-bit EL1 Support
[ 0.006196] CPU features: detected: CRC32 instructions
[ 0.006579] CPU: All CPU(s) started at EL2
[ 0.006613] alternatives: patching kernel code
[ 0.008062] devtmpfs: initialized
[ 0.014103] Registered cp15_barrier emulation handler
[ 0.014141] Registered setend emulation handler
[ 0.014156] KASLR enabled
[ 0.014334] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.014365] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.020463] pinctrl core: initialized pinctrl subsystem
[ 0.021017] SMBIOS 3.0 present.
[ 0.021057] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.021542] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.022937] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.023108] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.023248] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.023372] audit: initializing netlink subsys (disabled)
[ 0.023600] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[ 0.024581] thermal_sys: Registered thermal governor 'step_wise'
[ 0.024593] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.024830] cpuidle: using governor menu
[ 0.025140] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.025244] ASID allocator initialised with 32768 entries
[ 0.026014] Serial: AMBA PL011 UART driver
[ 0.038172] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.039572] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.039984] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.050013] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.050047] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.050060] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.050074] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.051327] ACPI: Interpreter disabled.
[ 0.052570] iommu: Default domain type: Translated
[ 0.052603] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.052885] SCSI subsystem initialized
[ 0.053282] usbcore: registered new interface driver usbfs
[ 0.053330] usbcore: registered new interface driver hub
[ 0.053370] usbcore: registered new device driver usb
[ 0.053716] pps_core: LinuxPPS API ver. 1 registered
[ 0.053731] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.053755] PTP clock support registered
[ 0.053882] EDAC MC: Ver: 3.0.0
[ 0.054422] Registered efivars operations
[ 0.054840] FPGA manager framework
[ 0.054941] Advanced Linux Sound Architecture Driver Initialized.
[ 0.055663] vgaarb: loaded
[ 0.056177] clocksource: Switched to clocksource arch_sys_counter
[ 0.056410] VFS: Disk quotas dquot_6.6.0
[ 0.056460] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.056630] pnp: PnP ACPI: disabled
[ 0.061899] NET: Registered PF_INET protocol family
[ 0.062073] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.063069] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.063179] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.063207] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.063326] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.063530] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.063651] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.063710] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.063877] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.064296] RPC: Registered named UNIX socket transport module.
[ 0.064327] RPC: Registered udp transport module.
[ 0.064337] RPC: Registered tcp transport module.
[ 0.064347] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.064364] PCI: CLS 0 bytes, default 64
[ 0.064562] Unpacking initramfs...
[ 0.076740] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.077282] kvm [1]: IPA Size Limit: 40 bits
[ 0.078410] kvm [1]: vgic interrupt IRQ9
[ 0.078555] kvm [1]: Hyp mode initialized successfully
[ 0.079939] Initialise system trusted keyrings
[ 0.080235] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.086396] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.087123] NFS: Registering the id_resolver key type
[ 0.087182] Key type id_resolver registered
[ 0.087194] Key type id_legacy registered
[ 0.087305] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.087325] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.087563] 9p: Installing v9fs 9p2000 file system support
[ 0.124441] Key type asymmetric registered
[ 0.124480] Asymmetric key parser 'x509' registered
[ 0.124579] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.124603] io scheduler mq-deadline registered
[ 0.124614] io scheduler kyber registered
[ 0.124667] io scheduler bfq registered
[ 0.125826] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.134381] EINJ: ACPI disabled.
[ 0.142653] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.147316] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.149871] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 22, base_baud = 1500000) is a meson_uart
[ 0.273562] printk: console [ttyAML0] enabled
[ 0.281719] loop: module loaded
[ 0.282615] megasas: 07.719.03.00-rc1
[ 0.287037] tun: Universal TUN/TAP device driver, 1.6
[ 0.287862] thunder_xcv, ver 1.0
[ 0.287943] thunder_bgx, ver 1.0
[ 0.288007] nicpf, ver 1.0
[ 0.288872] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.289129] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.289855] hclge is initializing
[ 0.290135] e1000: Intel(R) PRO/1000 Network Driver
[ 0.290673] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.291405] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.291905] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.292671] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.293205] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.293901] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.294565] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.295537] sky2: driver version 1.30
[ 0.296332] VFIO - User Level meta-driver version: 0.3
[ 0.298570] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.298709] ehci-pci: EHCI PCI platform driver
[ 0.299284] ehci-platform: EHCI generic platform driver
[ 0.300068] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.300585] ohci-pci: OHCI PCI platform driver
[ 0.301127] ohci-platform: OHCI generic platform driver
[ 0.302300] usbcore: registered new interface driver usb-storage
[ 0.305381] i2c_dev: i2c /dev entries driver
[ 0.308483] sdhci: Secure Digital Host Controller Interface driver
[ 0.308579] sdhci: Copyright(c) Pierre Ossman
[ 0.309900] Synopsys Designware Multimedia Card Interface Driver
[ 0.311452] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.311923] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.313505] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.314283] efifb: probing for efifb
[ 0.314469] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.314825] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.315522] efifb: scrolling: redraw
[ 0.315929] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.326306] Console: switching to colour frame buffer device 240x67
[ 0.335259] fb0: EFI VGA frame buffer device
[ 0.336069] meson-sm: secure-monitor enabled
[ 0.337181] usbcore: registered new interface driver usbhid
[ 0.337341] usbhid: USB HID core driver
[ 0.338791] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.343205] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.343385] mmc0: error -22 whilst initialising SDIO card
[ 0.343478] Freeing initrd memory: 28836K
[ 0.344794] NET: Registered PF_PACKET protocol family
[ 0.345226] 9pnet: Installing 9P2000 support
[ 0.345591] Key type dns_resolver registered
[ 0.346457] registered taskstats version 1
[ 0.346537] Loading compiled-in X.509 certificates
[ 0.347617] zswap: loaded using pool lz4/z3fold
[ 0.365560] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.365661] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 0.897117] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 0.897507] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 0.898433] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 0.900619] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 0.900735] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 0.901690] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 0.902695] xhci-hcd xhci-hcd.0.auto: irq 48, io mem 0xc9000000
[ 0.903426] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 0.903947] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 0.904893] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 0.906232] hub 1-0:1.0: USB hub found
[ 0.906330] hub 1-0:1.0: 2 ports detected
[ 0.906865] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 0.907987] hub 2-0:1.0: USB hub found
[ 0.908083] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 0.910753] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 0.911184] meson-gx-mmc d0072000.mmc: Got Cd GPIO
omain-0 init dvfs: 4
[ 0.920795] ALSA device list:
[ 0.920861] No soundcards found.
[ 0.939733] Freeing unused kernel memory: 3264K
[ 0.939912] Run /init as init process
Loading, please wait...
[ 0.981994] mmc1: new high speed SDHC card at address aaaa
[ 0.985098] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
[ 0.993434] mmcblk1: p1 p2
Starting version 249.11-0ubuntu3.4
[ 1.160212] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 1.356649] mmc0: Card stuck being busy! __mmc_poll_for_busy
[ 1.362022] hub 1-1:1.0: USB hub found
[ 1.364349] hub 1-1:1.0: 4 ports detected
[ 1.418513] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
[ 1.420858] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
[ 1.423008] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[ 1.426148] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[ 1.428072] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
[ 1.428315] meson8b-dwmac c9410000.ethernet: DWMAC1000
[ 1.430408] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
[ 1.432462] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[ 1.434439] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
[ 1.436685] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[ 1.438682] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
[ 1.440947] meson8b-dwmac c9410000.ethernet: COE Type 2
[ 1.442955] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
[ 1.445122] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[ 1.447267] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
[ 1.449614] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[ 1.452546] lima d00c0000.gpu: bus rate = 166666667
[ 1.456044] lima d00c0000.gpu: mod rate = 24000000
[ 1.457360] meson8b-dwmac c9410000.ethernet: Normal descriptors
[ 1.458366] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[ 1.460255] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[ 1.463308] lima d00c0000.gpu: Failed to register cooling device
[ 1.464733] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.471633] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 1.480906] fb0: switching to meson from EFI VGA
[ 1.483655] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 0
[ 1.489147] Console: switching to colour dummy device 80x25
[ 1.520284] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[ 1.526453] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[ 1.527124] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
[ 1.528566] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1
[ 1.768257] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
[ 1.965779] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
[ 2.027661] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
[ 2.043115] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
[ 2.044731] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
[ 2.106509] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
[ 2.107541] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
[ 2.108578] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
[ 2.109195] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
[ 2.185066] Console: switching to colour frame buffer device 240x67
[ 2.241783] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [ 2.748149] raid6: neonx8 gen() 2603 MB/s
[ 2.816148] raid6: neonx4 gen() 2653 MB/s
[ 2.884177] raid6: neonx2 gen() 2590 MB/s
[ 2.952147] raid6: neonx1 gen() 1717 MB/s
[ 3.020144] raid6: int64x8 gen() 1434 MB/s
[ 3.088150] raid6: int64x4 gen() 2000 MB/s
[ 3.156152] raid6: int64x2 gen() 1672 MB/s
[ 3.224161] raid6: int64x1 gen() 1244 MB/s
[ 3.224232] raid6: using algorithm neonx4 gen() 2653 MB/s
[ 3.292143] raid6: .... xor() 1889 MB/s, rmw enabled
[ 3.292214] raid6: using neon recovery algorithm
[ 3.293869] xor: measuring software checksum speed
[ 3.296991] 8regs : 3309 MB/sec
[ 3.300053] 32regs : 3309 MB/sec
[ 3.303482] arm64_neon : 2932 MB/sec
[ 3.303548] xor: using function: 32regs (3309 MB/sec)
[ 3.325354] Btrfs loaded, crc32c=crc32c-generic, zoned=yes, fsverity=no
Scanning for Btrfs filesystems
[ 3.477685] BTRFS: device label writable devid 1 transid 312 /dev/mmcblk1p2 scanned by btrfs (241)
done.
Begin: Will now check root file system ... fsck from util-linux 2.37.2
[/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
done.
[ 3.629220] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
[ 3.629592] BTRFS info (device mmcblk1p2): disk space caching is enabled
[ 3.630332] BTRFS info (device mmcblk1p2): has skinny extents
[ 3.648872] BTRFS info (device mmcblk1p2): enabling ssd optimizations
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[ 24.952140] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 24.952286] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 24.952988] (detected by 1, t=5252 jiffies, g=-395, q=734)
[ 24.953623] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 24.954804] Call trace:
[ 24.955012] dump_backtrace.part.6+0xdc/0xe8
[ 24.955520] show_stack+0x18/0x68
[ 24.955890] sched_show_task+0x154/0x198
[ 24.956345] rcu_sched_clock_irq+0xd10/0xdd8
[ 24.956838] update_process_times+0x9c/0xd0
[ 24.957318] tick_sched_handle.isra.19+0x34/0x58
[ 24.961440] tick_sched_timer+0x4c/0xa8
[ 24.965020] __hrtimer_run_queues+0x120/0x1b8
[ 24.968577] hrtimer_interrupt+0xd8/0x238
[ 24.972105] arch_timer_handler_phys+0x2c/0x50
[ 24.975622] handle_percpu_devid_irq+0x84/0x138
[ 24.979150] generic_handle_domain_irq+0x2c/0x48
[ 24.982666] gic_handle_irq+0xa4/0xc0
[ 24.986150] call_on_irq_stack+0x2c/0x58
[ 24.989607] do_interrupt_handler+0x80/0x88
[ 24.993048] el1_interrupt+0x38/0x70
[ 24.996460] el1h_64_irq_handler+0x18/0x28
[ 24.999851] el1h_64_irq+0x64/0x68
[ 25.003209] xas_find+0x8/0x1d8
[ 25.006535] truncate_inode_pages_range+0xa8/0x490
[ 25.009862] truncate_inode_pages_final+0x58/0x78
[ 25.013143] evict+0x144/0x150
[ 25.016378] iput+0x128/0x190
[ 25.019565] do_unlinkat+0x17c/0x2a8
[ 25.022721] __arm64_sys_unlinkat+0x40/0x88
[ 25.025851] invoke_syscall+0x44/0x100
[ 25.028941] el0_svc_common.constprop.3+0x6c/0xf0
[ 25.032013] do_el0_svc+0x24/0x88
[ 25.035042] el0_svc+0x20/0x60
[ 25.038033] el0t_64_sync_handler+0x90/0xb8
[ 25.040917] el0t_64_sync+0x170/0x174
[ 31.712163] VDDIO_BOOT: disabling
[ 88.060141] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 88.062834] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 88.065420] (detected by 1, t=21030 jiffies, g=-395, q=734)
[ 88.067978] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 88.071124] Call trace:
[ 88.073624] dump_backtrace.part.6+0xdc/0xe8
[ 88.076067] show_stack+0x18/0x68
[ 88.078464] sched_show_task+0x154/0x198
[ 88.080839] rcu_sched_clock_irq+0xd10/0xdd8
[ 88.083237] update_process_times+0x9c/0xd0
[ 88.085650] tick_sched_handle.isra.19+0x34/0x58
[ 88.088089] tick_sched_timer+0x4c/0xa8
[ 88.090525] __hrtimer_run_queues+0x120/0x1b8
[ 88.092988] hrtimer_interrupt+0xd8/0x238
[ 88.095466] arch_timer_handler_phys+0x2c/0x50
[ 88.097971] handle_percpu_devid_irq+0x84/0x138
[ 88.100470] generic_handle_domain_irq+0x2c/0x48
[ 88.102968] gic_handle_irq+0xa4/0xc0
[ 88.105457] call_on_irq_stack+0x2c/0x58
[ 88.107940] do_interrupt_handler+0x80/0x88
[ 88.110419] el1_interrupt+0x38/0x70
[ 88.112909] el1h_64_irq_handler+0x18/0x28
[ 88.115413] el1h_64_irq+0x64/0x68
[ 88.117891] xas_load+0x68/0x78
[ 88.120337] xas_find+0x190/0x1d8
[ 88.122728] find_lock_entries+0x7c/0x280
[ 88.125090] truncate_inode_pages_range+0xa8/0x490
[ 88.127462] truncate_inode_pages_final+0x58/0x78
[ 88.129816] evict+0x144/0x150
[ 88.132161] iput+0x128/0x190
[ 88.134470] do_unlinkat+0x17c/0x2a8
[ 88.136768] __arm64_sys_unlinkat+0x40/0x88
[ 88.139056] invoke_syscall+0x44/0x100
[ 88.141295] el0_svc_common.constprop.3+0x6c/0xf0
[ 88.143518] do_el0_svc+0x24/0x88
[ 88.145726] el0_svc+0x20/0x60
[ 88.147925] el0t_64_sync_handler+0x90/0xb8
[ 88.150140] el0t_64_sync+0x170/0x174

@dsx724
Copy link
Author

dsx724 commented Jul 18, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.18.11-00249-gae322e500418 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]2
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae90040 SMBIOS=0x7ae8c000 RNG=0x5834f040 MEMRESERVE=0x5834e040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3ebb40-0x7f3edfff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x000000005834efff]
[ 0.000000] node 0: [mem 0x000000005834f000-0x000000005834ffff]
[ 0.000000] node 0: [mem 0x0000000058350000-0x000000007ae8bfff]
[ 0.000000] node 0: [mem 0x000000007ae8c000-0x000000007ae8cfff]
[ 0.000000] node 0: [mem 0x000000007ae8d000-0x000000007ae8ffff]
[ 0.000000] node 0: [mem 0x000000007ae90000-0x000000007ae92fff]
[ 0.000000] node 0: [mem 0x000000007ae93000-0x000000007ae93fff]
[ 0.000000] node 0: [mem 0x000000007ae94000-0x000000007ae97fff]
[ 0.000000] node 0: [mem 0x000000007ae98000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s42856 r8192 d30872 u81920
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro systemd.log_level=debug systemd.log_target=console console=tty1 console0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.18.11-00249-gae322e500418", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1678688K/2097152K available (13568K kernel code, 1686K rwdata, 5316K rodata, 3264K init, 391K bss, 156320K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000538] Console: colour dummy device 80x25
[ 0.001089] printk: console [tty1] enabled
[ 0.001171] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001196] pid_max: default: 32768 minimum: 301
[ 0.001262] LSM: Security Framework initializing
[ 0.001369] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.001395] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002650] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.002690] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002761] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002895] rcu: Hierarchical SRCU implementation.
[ 0.003959] Remapping and enabling EFI services.
[ 0.004318] smp: Bringing up secondary CPUs ...
[ 0.004830] Detected VIPT I-cache on CPU1
[ 0.004898] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.005494] Detected VIPT I-cache on CPU2
[ 0.005549] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.006092] Detected VIPT I-cache on CPU3
[ 0.006144] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.006217] smp: Brought up 1 node, 4 CPUs
[ 0.006285] SMP: Total of 4 processors activated.
[ 0.006297] CPU features: detected: 32-bit EL0 Support
[ 0.006308] CPU features: detected: 32-bit EL1 Support
[ 0.006320] CPU features: detected: CRC32 instructions
[ 0.006717] CPU: All CPU(s) started at EL2
[ 0.006751] alternatives: patching kernel code
[ 0.008209] devtmpfs: initialized
[ 0.014357] Registered cp15_barrier emulation handler
[ 0.014396] Registered setend emulation handler
[ 0.014412] KASLR enabled
[ 0.014589] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.014619] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.021063] pinctrl core: initialized pinctrl subsystem
[ 0.021634] SMBIOS 3.0 present.
[ 0.021676] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.04-00027-gc68ee87348-dirty 04/01/2022
[ 0.022168] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.023711] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.023927] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.024121] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.024218] audit: initializing netlink subsys (disabled)
[ 0.024421] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1
[ 0.025412] thermal_sys: Registered thermal governor 'step_wise'
[ 0.025424] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.025668] cpuidle: using governor menu
[ 0.025962] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.026075] ASID allocator initialised with 32768 entries
[ 0.026855] Serial: AMBA PL011 UART driver
[ 0.039158] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.040616] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.041046] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.051116] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.051152] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.051166] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.051179] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.052511] ACPI: Interpreter disabled.
[ 0.053796] iommu: Default domain type: Translated
[ 0.053829] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.054117] SCSI subsystem initialized
[ 0.054513] usbcore: registered new interface driver usbfs
[ 0.054562] usbcore: registered new interface driver hub
[ 0.054604] usbcore: registered new device driver usb
[ 0.054952] pps_core: LinuxPPS API ver. 1 registered
[ 0.054965] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.054989] PTP clock support registered
[ 0.055113] EDAC MC: Ver: 3.0.0
[ 0.055666] Registered efivars operations
[ 0.056109] FPGA manager framework
[ 0.056220] Advanced Linux Sound Architecture Driver Initialized.
[ 0.057007] vgaarb: loaded
[ 0.057524] clocksource: Switched to clocksource arch_sys_counter
[ 0.057757] VFS: Disk quotas dquot_6.6.0
[ 0.057814] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.058017] pnp: PnP ACPI: disabled
[ 0.063369] NET: Registered PF_INET protocol family
[ 0.063547] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.064563] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.064664] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.064690] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.064810] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.065018] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.065146] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.065207] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.065377] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.065833] RPC: Registered named UNIX socket transport module.
[ 0.065862] RPC: Registered udp transport module.
[ 0.065872] RPC: Registered tcp transport module.
[ 0.065882] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.065899] PCI: CLS 0 bytes, default 64
[ 0.066113] Unpacking initramfs...
[ 0.078137] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.078717] kvm [1]: IPA Size Limit: 40 bits
[ 0.079869] kvm [1]: vgic interrupt IRQ9
[ 0.080023] kvm [1]: Hyp mode initialized successfully
[ 0.081410] Initialise system trusted keyrings
[ 0.081715] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.087868] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.088611] NFS: Registering the id_resolver key type
[ 0.088663] Key type id_resolver registered
[ 0.088675] Key type id_legacy registered
[ 0.088757] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.088772] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.088955] 9p: Installing v9fs 9p2000 file system support
[ 0.125398] Key type asymmetric registered
[ 0.125443] Asymmetric key parser 'x509' registered
[ 0.125584] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.125615] io scheduler mq-deadline registered
[ 0.125627] io scheduler kyber registered
[ 0.125690] io scheduler bfq registered
[ 0.126790] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.135920] EINJ: ACPI disabled.
[ 0.144707] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.149750] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.152173] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 22, base_baud = 1500000) is a meson_uart
[ 0.275932] printk: console [ttyAML0] enabled
[ 0.285122] loop: module loaded
[ 0.286210] megasas: 07.719.03.00-rc1
[ 0.290749] tun: Universal TUN/TAP device driver, 1.6
[ 0.291688] thunder_xcv, ver 1.0
[ 0.291784] thunder_bgx, ver 1.0
[ 0.291835] nicpf, ver 1.0
[ 0.292689] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.292958] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.293701] hclge is initializing
[ 0.293970] e1000: Intel(R) PRO/1000 Network Driver
[ 0.294502] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.295260] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.295735] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.296485] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.297034] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.297766] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.298395] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.299349] sky2: driver version 1.30
[ 0.300090] VFIO - User Level meta-driver version: 0.3
[ 0.302097] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.302237] ehci-pci: EHCI PCI platform driver
[ 0.302800] ehci-platform: EHCI generic platform driver
[ 0.303590] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.304084] ohci-pci: OHCI PCI platform driver
[ 0.304641] ohci-platform: OHCI generic platform driver
[ 0.305855] usbcore: registered new interface driver usb-storage
[ 0.308764] i2c_dev: i2c /dev entries driver
[ 0.312460] sdhci: Secure Digital Host Controller Interface driver
[ 0.312558] sdhci: Copyright(c) Pierre Ossman
[ 0.314000] Synopsys Designware Multimedia Card Interface Driver
[ 0.315616] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.316343] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.318257] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.319175] efifb: probing for efifb
[ 0.319353] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.319722] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.320419] efifb: scrolling: redraw
[ 0.320828] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.331236] Console: switching to colour frame buffer device 240x67
[ 0.340185] fb0: EFI VGA frame buffer device
[ 0.340992] meson-sm: secure-monitor enabled
[ 0.342196] usbcore: registered new interface driver usbhid
[ 0.342302] usbhid: USB HID core driver
[ 0.343581] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.349179] NET: Registered PF_PACKET protocol family
[ 0.349256] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.349609] 9pnet: Installing 9P2000 support
[ 0.350118] mmc0: error -22 whilst initialising SDIO card
[ 0.350625] Key type dns_resolver registered
[ 0.352521] registered taskstats version 1
[ 0.352638] Loading compiled-in X.509 certificates
[ 0.353982] zswap: loaded using pool lz4/z3fold
[ 0.358223] Freeing initrd memory: 28836K
[ 0.374892] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.374993] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 0.894537] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 0.894930] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 0.895840] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 0.898125] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 0.898241] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 0.899199] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 0.900204] xhci-hcd xhci-hcd.0.auto: irq 48, io mem 0xc9000000
[ 0.900938] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 0.901457] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 0.902402] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 0.903743] hub 1-0:1.0: USB hub found
[ 0.903840] hub 1-0:1.0: 2 ports detected
[ 0.904394] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 0.905506] hub 2-0:1.0: USB hub found
[ 0.905657] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 0.908395] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 0.908824] meson-gx-mmc d0072000.mmc: Got CD GdPIO
omain-0 init dvfs: 4
[ 0.918671] ALSA device list:
[ 0.918741] No soundcards found.
[ 0.934991] Freeing unused kernel memory: 3264K
[ 0.935183] Run /init as init process
Loading, please wait...
[ 0.978421] mmc1: new high speed SDHC card at address aaaa
[ 0.983073] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
[ 0.991937] mmcblk1: p1 p2
Starting version 249.11-0ubuntu3.4
[ 1.157598] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 1.352095] hub 1-1:1.0: USB hub found
[ 1.355690] hub 1-1:1.0: 4 ports detected
[ 1.411803] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 1.414464] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
[ 1.416666] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
[ 1.416719] fb0: switching to meson from EFI VGA
[ 1.419003] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
[ 1.419097] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
[ 1.419106] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
[ 1.419206] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[ 1.421457] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[ 1.423294] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
[ 1.425455] meson8b-dwmac c9410000.ethernet: DWMAC1000
[ 1.429853] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
[ 1.431901] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[ 1.440763] mmc0: Card stuck being busy! __mmc_poll_for_busy
[ 1.440870] Console: switching to colour dummy device 80x25
[ 1.443520] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
[ 1.444686] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[ 1.444943] meson8b-dwmac c9410000.ethernet: COE Type 2
[ 1.445564] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[ 1.446349] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[ 1.447199] meson8b-dwmac c9410000.ethernet: Normal descriptors
[ 1.447769] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[ 1.448432] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.451152] lima d00c0000.gpu: bus rate = 166666667
[ 1.451213] lima d00c0000.gpu: mod rate = 24000000
[ 1.451749] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[ 1.463970] lima d00c0000.gpu: Failed to register cooling device
[ 1.468010] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 0
[ 1.469660] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[ 1.472365] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[ 1.473076] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
[ 1.483577] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1
[ 2.154867] Console: switching to colour frame buffer device 240x67
[ 2.252333] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
Begin: Loading essential drivers ... [ 2.553572] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [ 2.745633] raid6: neonx8 gen() 2594 MB/s
[ 2.767148] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
[ 2.813650] raid6: neonx4 gen() 458 MB/s
[ 2.830102] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
[ 2.837778] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
[ 2.839763] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
[ 2.881552] raid6: neonx2 gen() 2238 MB/s
[ 2.905862] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
[ 2.907741] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
[ 2.909770] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
[ 2.911687] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
[ 2.949558] raid6: neonx1 gen() 1738 MB/s
[ 3.017516] raid6: int64x8 gen() 1433 MB/s
[ 3.085526] raid6: int64x4 gen() 1998 MB/s
[ 3.153525] raid6: int64x2 gen() 1672 MB/s
[ 3.221521] raid6: int64x1 gen() 1240 MB/s
[ 3.221616] raid6: using algorithm neonx8 gen() 2594 MB/s
[ 3.289518] raid6: .... xor() 1955 MB/s, rmw enabled
[ 3.289592] raid6: using neon recovery algorithm
[ 3.291376] xor: measuring software checksum speed
[ 3.294498] 8regs : 3309 MB/sec
[ 3.297585] 32regs : 3309 MB/sec
[ 3.301009] arm64_neon : 2932 MB/sec
[ 3.301072] xor: using function: 32regs (3309 MB/sec)
[ 3.323642] Btrfs loaded, crc32c=crc32c-generic, zoned=yes, fsverity=no
Scanning for Btrfs filesystems
[ 3.479683] BTRFS: device label writable devid 1 transid 353 /dev/mmcblk1p2 scanned by btrfs (243)
done.
Begin: Will now check root file system ... fsck from util-linux 2.37.2
[/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
done.
[ 3.625772] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
[ 3.626140] BTRFS info (device mmcblk1p2): disk space caching is enabled
[ 3.626884] BTRFS info (device mmcblk1p2): has skinny extents
[ 3.645934] BTRFS info (device mmcblk1p2): enabling ssd optimizations
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[ 24.965511] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 24.965659] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 24.966360] (detected by 1, t=5252 jiffies, g=-435, q=1036)
[ 24.967006] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 24.968185] Call trace:
[ 24.968394] dump_backtrace.part.6+0xdc/0xe8
[ 24.968901] show_stack+0x18/0x68
[ 24.969271] sched_show_task+0x154/0x198
[ 24.969726] rcu_sched_clock_irq+0xd10/0xdd8
[ 24.970220] update_process_times+0x9c/0xd0
[ 24.974520] tick_sched_handle.isra.19+0x34/0x58
[ 24.978339] tick_sched_timer+0x4c/0xa8
[ 24.982104] __hrtimer_run_queues+0x120/0x1b8
[ 24.985860] hrtimer_interrupt+0xd8/0x238
[ 24.989613] arch_timer_handler_phys+0x2c/0x50
[ 24.993374] handle_percpu_devid_irq+0x84/0x138
[ 24.997139] generic_handle_domain_irq+0x2c/0x48
[ 25.000922] gic_handle_irq+0xa4/0xc0
[ 25.004699] call_on_irq_stack+0x2c/0x58
[ 25.008441] do_interrupt_handler+0x80/0x88
[ 25.012171] el1_interrupt+0x38/0x70
[ 25.015911] el1h_64_irq_handler+0x18/0x28
[ 25.019639] el1h_64_irq+0x64/0x68
[ 25.023315] xas_load+0x60/0x78
[ 25.026957] xas_find+0x190/0x1d8
[ 25.030564] find_lock_entries+0x7c/0x280
[ 25.034154] truncate_inode_pages_range+0xa8/0x490
[ 25.037724] truncate_inode_pages_final+0x58/0x78
[ 25.041242] evict+0x144/0x150
[ 25.044715] iput+0x128/0x190
[ 25.048139] do_unlinkat+0x17c/0x2a8
[ 25.051532] __arm64_sys_unlinkat+0x40/0x88
[ 25.054900] invoke_syscall+0x44/0x100
[ 25.058233] el0_svc_common.constprop.3+0x6c/0xf0
[ 25.061558] do_el0_svc+0x24/0x88
[ 25.064843] el0_svc+0x20/0x60
[ 25.068090] el0t_64_sync_handler+0x90/0xb8
[ 25.071323] el0t_64_sync+0x170/0x174
[ 31.709550] VDDIO_BOOT: disabling
[ 88.089511] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 88.092548] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
[ 88.095444] (detected by 1, t=21033 jiffies, g=-435, q=1036)
[ 88.098209] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
[ 88.101407] Call trace:
[ 88.103959] dump_backtrace.part.6+0xdc/0xe8
[ 88.106570] show_stack+0x18/0x68
[ 88.109183] sched_show_task+0x154/0x198
[ 88.111688] rcu_sched_clock_irq+0xd10/0xdd8
[ 88.114106] update_process_times+0x9c/0xd0
[ 88.116533] tick_sched_handle.isra.19+0x34/0x58
[ 88.118986] tick_sched_timer+0x4c/0xa8
[ 88.121442] __hrtimer_run_queues+0x120/0x1b8
[ 88.123928] hrtimer_interrupt+0xd8/0x238
[ 88.126407] arch_timer_handler_phys+0x2c/0x50
[ 88.128887] handle_percpu_devid_irq+0x84/0x138
[ 88.131364] generic_handle_domain_irq+0x2c/0x48
[ 88.133840] gic_handle_irq+0xa4/0xc0
[ 88.136302] call_on_irq_stack+0x2c/0x58
[ 88.138781] do_interrupt_handler+0x80/0x88
[ 88.141274] el1_interrupt+0x38/0x70
[ 88.143756] el1h_64_irq_handler+0x18/0x28
[ 88.146217] el1h_64_irq+0x64/0x68
[ 88.148616] xas_descend+0x4/0x88
[ 88.150965] xas_find+0x190/0x1d8
[ 88.153297] find_lock_entries+0x7c/0x280
[ 88.155643] truncate_inode_pages_range+0xa8/0x490
[ 88.158007] truncate_inode_pages_final+0x58/0x78
[ 88.160327] evict+0x144/0x150
[ 88.162622] iput+0x128/0x190
[ 88.164885] do_unlinkat+0x17c/0x2a8
[ 88.167107] __arm64_sys_unlinkat+0x40/0x88
[ 88.169303] invoke_syscall+0x44/0x100
[ 88.171494] el0_svc_common.constprop.3+0x6c/0xf0
[ 88.173702] do_el0_svc+0x24/0x88
[ 88.175901] el0_svc+0x20/0x60
[ 88.178089] el0t_64_sync_handler+0x90/0xb8
[ 88.180290] el0t_64_sync+0x170/0x174

@dsx724
Copy link
Author

dsx724 commented Jul 19, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.19.0-rc6-00575-g00b9cba1cc96 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f9197772
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x56a65040 MEMRESERVE=0x56a64040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3efb40-0x7f3f1fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x0000000056a64fff]
[ 0.000000] node 0: [mem 0x0000000056a65000-0x0000000056a65fff]
[ 0.000000] node 0: [mem 0x0000000056a66000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s44520 r8192 d29208 u81920
[ 0.000000] pcpu-alloc: s44520 r8192 d29208 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc6-00575-g00b9cba1cc96 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro debug cpufreq.default_governor=performance console=tty1 console=ttyA0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc6-00575-g00b9cba1cc96", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1664852K/2097152K available (16000K kernel code, 3394K rwdata, 9064K rodata, 6976K init, 586K bss, 170156K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.001314] Console: colour dummy device 80x25
[ 0.001886] printk: console [tty1] enabled
[ 0.001979] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.002005] pid_max: default: 32768 minimum: 301
[ 0.002073] LSM: Security Framework initializing
[ 0.002184] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002213] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.003485] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.003526] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.003598] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.003735] rcu: Hierarchical SRCU implementation.
[ 0.006327] Remapping and enabling EFI services.
[ 0.006713] smp: Bringing up secondary CPUs ...
[ 0.007235] Detected VIPT I-cache on CPU1
[ 0.007309] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.007907] Detected VIPT I-cache on CPU2
[ 0.007964] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.008531] Detected VIPT I-cache on CPU3
[ 0.008588] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.008671] smp: Brought up 1 node, 4 CPUs
[ 0.008741] SMP: Total of 4 processors activated.
[ 0.008754] CPU features: detected: 32-bit EL0 Support
[ 0.008764] CPU features: detected: 32-bit EL1 Support
[ 0.008777] CPU features: detected: CRC32 instructions
[ 0.009205] CPU: All CPU(s) started at EL2
[ 0.009239] alternatives: patching kernel code
[ 0.010812] devtmpfs: initialized
[ 0.017108] KASLR enabled
[ 0.017311] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.017349] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.023738] pinctrl core: initialized pinctrl subsystem
[ 0.024815] SMBIOS 3.0 present.
[ 0.024860] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.025417] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.026714] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.026920] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.027069] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.027159] audit: initializing netlink subsys (disabled)
[ 0.027367] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1
[ 0.028770] thermal_sys: Registered thermal governor 'step_wise'
[ 0.028785] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.029055] cpuidle: using governor menu
[ 0.029382] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.029506] ASID allocator initialised with 32768 entries
[ 0.029524] HugeTLB: can optimize 4095 vmemmap pages for hugepages-1048576kB
[ 0.029538] HugeTLB: can optimize 127 vmemmap pages for hugepages-32768kB
[ 0.029552] HugeTLB: can optimize 7 vmemmap pages for hugepages-2048kB
[ 0.029565] HugeTLB: can optimize 0 vmemmap pages for hugepages-64kB
[ 0.031342] Serial: AMBA PL011 UART driver
[ 0.051015] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.053417] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.054232] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.066327] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.066365] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.066379] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.066394] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.067856] ACPI: Interpreter disabled.
[ 0.070839] iommu: Default domain type: Translated
[ 0.070873] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.071170] SCSI subsystem initialized
[ 0.071343] libata version 3.00 loaded.
[ 0.071591] usbcore: registered new interface driver usbfs
[ 0.071637] usbcore: registered new interface driver hub
[ 0.071678] usbcore: registered new device driver usb
[ 0.072830] pps_core: LinuxPPS API ver. 1 registered
[ 0.072850] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.072876] PTP clock support registered
[ 0.073010] EDAC MC: Ver: 3.0.0
[ 0.074081] Registered efivars operations
[ 0.075163] FPGA manager framework
[ 0.075283] Advanced Linux Sound Architecture Driver Initialized.
[ 0.076054] vgaarb: loaded
[ 0.076568] clocksource: Switched to clocksource arch_sys_counter
[ 0.076843] VFS: Disk quotas dquot_6.6.0
[ 0.076907] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.077089] pnp: PnP ACPI: disabled
[ 0.082404] NET: Registered PF_INET protocol family
[ 0.082588] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.084125] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.084227] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.084256] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.084376] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.084629] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.084771] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.084829] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.085007] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.085412] RPC: Registered named UNIX socket transport module.
[ 0.085440] RPC: Registered udp transport module.
[ 0.085452] RPC: Registered tcp transport module.
[ 0.085462] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.085479] PCI: CLS 0 bytes, default 64
[ 0.085687] Unpacking initramfs...
[ 0.097378] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.097971] kvm [1]: IPA Size Limit: 40 bits
[ 0.099760] kvm [1]: vgic interrupt IRQ9
[ 0.099904] kvm [1]: Hyp mode initialized successfully
[ 0.101391] Initialise system trusted keyrings
[ 0.101698] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.108095] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.108910] NFS: Registering the id_resolver key type
[ 0.108966] Key type id_resolver registered
[ 0.108978] Key type id_legacy registered
[ 0.109093] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.109111] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.109354] 9p: Installing v9fs 9p2000 file system support
[ 0.146111] Key type asymmetric registered
[ 0.146157] Asymmetric key parser 'x509' registered
[ 0.146270] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.146298] io scheduler mq-deadline registered
[ 0.146310] io scheduler kyber registered
[ 0.149519] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.168100] EINJ: ACPI disabled.
[ 0.195951] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.207294] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.211394] SuperH (H)SCI(F) driver initialized
[ 0.212304] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 18, base_baud = 1500000) is a meson_uart
[ 0.340525] printk: console [ttyAML0] enabled
[ 0.341990] msm_serial: driver initialized
[ 0.353278] loop: module loaded
[ 0.355078] megasas: 07.719.03.00-rc1
[ 0.364843] tun: Universal TUN/TAP device driver, 1.6
[ 0.366625] thunder_xcv, ver 1.0
[ 0.366727] thunder_bgx, ver 1.0
[ 0.366782] nicpf, ver 1.0
[ 0.370121] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.370347] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.371069] hclge is initializing
[ 0.371356] e1000: Intel(R) PRO/1000 Network Driver
[ 0.371895] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.372677] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.373128] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.373894] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.374426] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.375134] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.375785] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.377493] sky2: driver version 1.30
[ 0.380412] VFIO - User Level meta-driver version: 0.3
[ 0.385939] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.386083] ehci-pci: EHCI PCI platform driver
[ 0.386675] ehci-platform: EHCI generic platform driver
[ 0.387522] ehci-orion: EHCI orion driver
[ 0.387926] ehci-exynos: EHCI Exynos driver
[ 0.388386] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.388905] ohci-pci: OHCI PCI platform driver
[ 0.389461] ohci-platform: OHCI generic platform driver
[ 0.390288] ohci-exynos: OHCI Exynos driver
[ 0.391614] usbcore: registered new interface driver usb-storage
[ 0.397917] i2c_dev: i2c /dev entries driver
[ 0.405411] Freeing initrd memory: 30848K
[ 0.410936] sdhci: Secure Digital Host Controller Interface driver
[ 0.411036] sdhci: Copyright(c) Pierre Ossman
[ 0.412739] Synopsys Designware Multimedia Card Interface Driver
[ 0.414556] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.414633] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.419365] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.420723] efifb: probing for efifb
[ 0.420908] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.421267] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.421966] efifb: scrolling: redraw
[ 0.422374] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.432666] Console: switching to colour frame buffer device 240x67
[ 0.441572] fb0: EFI VGA frame buffer device
[ 0.442811] meson-sm: secure-monitor enabled
[ 0.445041] usbcore: registered new interface driver usbhid
[ 0.445142] usbhid: USB HID core driver
[ 0.447211] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.448322] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.448471] mmc0: error -22 whilst initialising SDIO card
[ 0.458349] NET: Registered PF_PACKET protocol family
[ 0.458595] 9pnet: Installing 9P2000 support
[ 0.458885] Key type dns_resolver registered
[ 0.459882] registered taskstats version 1
[ 0.459978] Loading compiled-in X.509 certificates
[ 0.484043] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.484147] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 0.994801] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 0.995262] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 0.996150] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 1.000012] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.000132] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1.001144] xhci-hcd xhci-hcd.0.auto: USB3 root hub has no ports
[ 1.001642] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 1.002783] xhci-hcd xhci-hcd.0.auto: irq 25, io mem 0xc9000000
[ 1.004184] hub 1-0:1.0: USB hub found
[ 1.004290] hub 1-0:1.0: 2 ports detected
[ 1.009956] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 1.010446] meson-gx-mmc d0072000.mmc: Got CD GPIO
domain-0 init dvfs: 4
[ 1.025706] ALSA device list:
[ 1.025782] No soundcards found.
[ 1.039947] Freeing unused kernel memory: 6976K
[ 1.040127] Run /init as init process
[ 1.040293] with arguments:
[ 1.040677] /init
[ 1.040883] with environment:
[ 1.041247] HOME=/
[ 1.041514] TERM=linux
[ 1.041829] BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc6-00575-g00b9cba1cc96
Loading, please wait...

  • '[' -z ]
  • BOOT=local
  • '[' -n ]
  • '[' '=' none ]
  • resume=
  • mount -t tmpfs -o 'nodev,noexec,nosuid,size=10%,mode=0755' tmpfs /run
  • mkdir -m 0700 /run/initramfs
  • '[' -n /run/initramfs/initramfs.debug ]
  • exec
    [ 1.077513] mmc1: new high speed SDHC card at address aaaa
    [ 1.080154] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
    [ 1.085413] mmcblk1: p1 p2
    [ 1.264626] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [ 1.477023] mmc0: Card stuck being busy! __mmc_poll_for_busy
    [ 1.484072] hub 1-1:1.0: USB hub found
    [ 1.486982] hub 1-1:1.0: 4 ports detected
    [ 1.747023] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
    [ 1.749266] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
    [ 1.751039] meson-drm d0100000.vpu: Queued 2 outputs on vpu
    [ 1.751382] meson8b-dwmac c9410000.ethernet: PTP uses main clock
    [ 1.756273] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
    [ 1.758452] meson8b-dwmac c9410000.ethernet: DWMAC1000
    [ 1.760397] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
    [ 1.760407] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
    [ 1.760412] meson8b-dwmac c9410000.ethernet: COE Type 2
    [ 1.760418] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
    [ 1.760423] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
    [ 1.760554] Console: switching
    [ 1.760594] meson8b-dwmac c9410000.ethernet: Normal descriptors
    [ 1.760602] meson8b-dwmac c9410000.ethernet: Ring mode enabled
    [ 1.760607] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    [ 1.760706] to colour dummy device 80x25
    [ 1.796710] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
    [ 1.799555] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
    [ 1.801616] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
    [ 1.804220] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
    [ 1.804499] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
    [ 1.813846] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
    [ 1.815146] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
    [ 1.828704] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
    [ 1.828914] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
    [ 1.829780] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
    [ 1.840633] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
    [ 1.853285] lima d00c0000.gpu: bus rate = 166666667
    [ 1.853345] lima d00c0000.gpu: mod rate = 24000000
    [ 1.853873] lima d00c0000.gpu: error -ENODEV: dev_pm_opp_set_regulators: no regulator (mali) found
    [ 1.857500] lima d00c0000.gpu: Failed to register cooling device
    [ 1.857990] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 1
    [ 2.030759] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
    [ 2.089199] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
    [ 2.096701] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
    [ 2.098505] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
    [ 2.156873] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
    [ 2.158568] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
    [ 2.160656] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
    [ 2.162880] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
    [ 2.433307] Console: switching to colour frame buffer device 240x67
    [ 2.462695] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
    [ 2.896565] raid6: neonx8 gen() 2702 MB/s
    [ 2.964562] raid6: neonx4 gen() 2649 MB/s
    [ 3.032584] raid6: neonx2 gen() 2542 MB/s
    [ 3.100573] raid6: neonx1 gen() 1992 MB/s
    [ 3.168591] raid6: int64x8 gen() 1433 MB/s
    [ 3.236570] raid6: int64x4 gen() 1996 MB/s
    [ 3.304560] raid6: int64x2 gen() 1672 MB/s
    [ 3.372568] raid6: int64x1 gen() 1247 MB/s
    [ 3.372637] raid6: using algorithm neonx8 gen() 2702 MB/s
    [ 3.440564] raid6: .... xor() 1952 MB/s, rmw enabled
    [ 3.440637] raid6: using neon recovery algorithm
    [ 3.442417] xor: measuring software checksum speed
    [ 3.445549] 8regs : 3309 MB/sec
    [ 3.448625] 32regs : 3309 MB/sec
    [ 3.452056] arm64_neon : 2925 MB/sec
    [ 3.452121] xor: using function: 32regs (3309 MB/sec)
    [ 3.475365] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
    [ 3.607316] BTRFS: device label writable devid 1 transid 592 /dev/mmcblk1p2 scanned by btrfs (232)
    [ 3.727747] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
    [ 3.728082] BTRFS info (device mmcblk1p2): disk space caching is enabled
    [ 3.728862] BTRFS info (device mmcblk1p2): has skinny extents
    [ 3.750068] BTRFS info (device mmcblk1p2): enabling ssd optimizations

@dsx724
Copy link
Author

dsx724 commented Jul 19, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.19.0-rc7-00752-gd0dcc148ba0d (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f9197772
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x56a65040 MEMRESERVE=0x56a64040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3edb40-0x7f3effff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x0000000056a64fff]
[ 0.000000] node 0: [mem 0x0000000056a65000-0x0000000056a65fff]
[ 0.000000] node 0: [mem 0x0000000056a66000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s44520 r8192 d29208 u81920
[ 0.000000] pcpu-alloc: s44520 r8192 d29208 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc7-00752-gd0dcc148ba0d root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro debug=vc systemd.log_level=debug systemd.log_target=console console=0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc7-00752-gd0dcc148ba0d", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1664844K/2097152K available (16000K kernel code, 3394K rwdata, 9064K rodata, 6976K init, 586K bss, 170164K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.001311] Console: colour dummy device 80x25
[ 0.001880] printk: console [tty1] enabled
[ 0.001975] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001999] pid_max: default: 32768 minimum: 301
[ 0.002067] LSM: Security Framework initializing
[ 0.002177] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002207] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.003489] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.003530] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.003603] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.003737] rcu: Hierarchical SRCU implementation.
[ 0.006318] Remapping and enabling EFI services.
[ 0.006701] smp: Bringing up secondary CPUs ...
[ 0.007223] Detected VIPT I-cache on CPU1
[ 0.007296] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.007888] Detected VIPT I-cache on CPU2
[ 0.007946] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.008529] Detected VIPT I-cache on CPU3
[ 0.008587] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.008661] smp: Brought up 1 node, 4 CPUs
[ 0.008729] SMP: Total of 4 processors activated.
[ 0.008741] CPU features: detected: 32-bit EL0 Support
[ 0.008752] CPU features: detected: 32-bit EL1 Support
[ 0.008764] CPU features: detected: CRC32 instructions
[ 0.009198] CPU: All CPU(s) started at EL2
[ 0.009232] alternatives: patching kernel code
[ 0.010799] devtmpfs: initialized
[ 0.017054] KASLR enabled
[ 0.017254] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.017291] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.023704] pinctrl core: initialized pinctrl subsystem
[ 0.024778] SMBIOS 3.0 present.
[ 0.024825] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.025384] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.026741] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.026953] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.027108] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.027201] audit: initializing netlink subsys (disabled)
[ 0.027405] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1
[ 0.028803] thermal_sys: Registered thermal governor 'step_wise'
[ 0.028818] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.029092] cpuidle: using governor menu
[ 0.029448] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.029572] ASID allocator initialised with 32768 entries
[ 0.029589] HugeTLB: can optimize 4095 vmemmap pages for hugepages-1048576kB
[ 0.029603] HugeTLB: can optimize 127 vmemmap pages for hugepages-32768kB
[ 0.029617] HugeTLB: can optimize 7 vmemmap pages for hugepages-2048kB
[ 0.029630] HugeTLB: can optimize 0 vmemmap pages for hugepages-64kB
[ 0.031394] Serial: AMBA PL011 UART driver
[ 0.050985] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.053386] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.054218] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.066199] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.066234] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.066249] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.066263] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.067747] ACPI: Interpreter disabled.
[ 0.070691] iommu: Default domain type: Translated
[ 0.070723] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.071027] SCSI subsystem initialized
[ 0.071194] libata version 3.00 loaded.
[ 0.071448] usbcore: registered new interface driver usbfs
[ 0.071494] usbcore: registered new interface driver hub
[ 0.071534] usbcore: registered new device driver usb
[ 0.072631] pps_core: LinuxPPS API ver. 1 registered
[ 0.072649] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.072675] PTP clock support registered
[ 0.072866] EDAC MC: Ver: 3.0.0
[ 0.073933] Registered efivars operations
[ 0.075034] FPGA manager framework
[ 0.075156] Advanced Linux Sound Architecture Driver Initialized.
[ 0.075916] vgaarb: loaded
[ 0.076461] clocksource: Switched to clocksource arch_sys_counter
[ 0.076700] VFS: Disk quotas dquot_6.6.0
[ 0.076796] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.076992] pnp: PnP ACPI: disabled
[ 0.082311] NET: Registered PF_INET protocol family
[ 0.082495] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.084033] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.084133] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.084163] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.084283] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.084526] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.084664] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.084722] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.084898] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.085311] RPC: Registered named UNIX socket transport module.
[ 0.085343] RPC: Registered udp transport module.
[ 0.085353] RPC: Registered tcp transport module.
[ 0.085363] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.085381] PCI: CLS 0 bytes, default 64
[ 0.085621] Unpacking initramfs...
[ 0.097264] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.097857] kvm [1]: IPA Size Limit: 40 bits
[ 0.099638] kvm [1]: vgic interrupt IRQ9
[ 0.099770] kvm [1]: Hyp mode initialized successfully
[ 0.101244] Initialise system trusted keyrings
[ 0.101529] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.107824] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.108636] NFS: Registering the id_resolver key type
[ 0.108696] Key type id_resolver registered
[ 0.108708] Key type id_legacy registered
[ 0.108833] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.108857] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.109056] 9p: Installing v9fs 9p2000 file system support
[ 0.145408] Key type asymmetric registered
[ 0.145454] Asymmetric key parser 'x509' registered
[ 0.145564] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.145587] io scheduler mq-deadline registered
[ 0.145599] io scheduler kyber registered
[ 0.148504] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.166951] EINJ: ACPI disabled.
[ 0.194215] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.205440] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.209518] SuperH (H)SCI(F) driver initialized
[ 0.210496] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 18, base_baud = 1500000) is a meson_uart
[ 0.338885] printk: console [ttyAML0] enabled
[ 0.340263] msm_serial: driver initialized
[ 0.351490] loop: module loaded
[ 0.353338] megasas: 07.719.03.00-rc1
[ 0.362697] tun: Universal TUN/TAP device driver, 1.6
[ 0.364402] thunder_xcv, ver 1.0
[ 0.364569] thunder_bgx, ver 1.0
[ 0.364634] nicpf, ver 1.0
[ 0.367299] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.367522] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.368236] hclge is initializing
[ 0.368549] e1000: Intel(R) PRO/1000 Network Driver
[ 0.369069] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.369815] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.370301] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.371073] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.371600] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.372334] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.372988] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.374624] sky2: driver version 1.30
[ 0.377006] VFIO - User Level meta-driver version: 0.3
[ 0.382424] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.382569] ehci-pci: EHCI PCI platform driver
[ 0.383171] ehci-platform: EHCI generic platform driver
[ 0.384032] ehci-orion: EHCI orion driver
[ 0.384480] ehci-exynos: EHCI Exynos driver
[ 0.384932] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.385364] ohci-pci: OHCI PCI platform driver
[ 0.385930] ohci-platform: OHCI generic platform driver
[ 0.386762] ohci-exynos: OHCI Exynos driver
[ 0.388142] usbcore: registered new interface driver usb-storage
[ 0.393720] i2c_dev: i2c /dev entries driver
[ 0.405262] Freeing initrd memory: 30848K
[ 0.408571] sdhci: Secure Digital Host Controller Interface driver
[ 0.408668] sdhci: Copyright(c) Pierre Ossman
[ 0.410335] Synopsys Designware Multimedia Card Interface Driver
[ 0.412063] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.412152] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.416956] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.418261] efifb: probing for efifb
[ 0.418444] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.418804] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.419502] efifb: scrolling: redraw
[ 0.419910] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.430223] Console: switching to colour frame buffer device 240x67
[ 0.439143] fb0: EFI VGA frame buffer device
[ 0.440416] meson-sm: secure-monitor enabled
[ 0.442542] usbcore: registered new interface driver usbhid
[ 0.442643] usbhid: USB HID core driver
[ 0.444668] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.445858] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.446006] mmc0: error -22 whilst initialising SDIO card
[ 0.455627] NET: Registered PF_PACKET protocol family
[ 0.455870] 9pnet: Installing 9P2000 support
[ 0.456162] Key type dns_resolver registered
[ 0.457258] registered taskstats version 1
[ 0.457354] Loading compiled-in X.509 certificates
[ 0.481473] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.481575] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 0.994701] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 0.995159] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 0.996051] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 0.999931] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.000051] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1.001066] xhci-hcd xhci-hcd.0.auto: USB3 root hub has no ports
[ 1.001561] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 1.002703] xhci-hcd xhci-hcd.0.auto: irq 25, io mem 0xc9000000
[ 1.004114] hub 1-0:1.0: USB hub found
[ 1.004220] hub 1-0:1.0: 2 ports detected
[ 1.009859] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 1.010340] meson-gx-mmc d0072000.mmc: Got CD GPIO
domain-0 init dvfs: 4
[ 1.025186] ALSA device list:
[ 1.025258] No soundcards found.
[ 1.040142] Freeing unused kernel memory: 6976K
[ 1.040364] Run /init as init process
[ 1.040549] with arguments:
[ 1.040829] /init
[ 1.041084] with environment:
[ 1.041450] HOME=/
[ 1.041715] TERM=linux
[ 1.042031] BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc7-00752-gd0dcc148ba0d
Loading, please wait...

  • '[' -z ]
  • BOOT=local
  • '[' -n ]
  • '[' '=' none ]
  • resume=
  • mount -t tmpfs -o 'nodev,noexec,nosuid,size=10%,mode=0755' tmpfs /run
    [ 1.078618] mmc1: new high speed SDHC card at address aaaa
  • mkdir -m 0700 /run/initramfs
    [ 1.081278] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
  • '[' -n ]
  • maybe_break top
  • run_scripts /scripts/init-top
  • initdir=/scripts/init-top
  • '[' '!' -d /scripts/init-top ]
  • shift
  • . /scripts/init-top/ORDER
  • /scripts/init-top/all_generic_ide
    [ 1.086702] mmcblk1: p1 p2
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/blacklist
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/udev
    Starting version 249.11-0ubuntu3.4
    [ 1.260523] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [ 1.486703] hub 1-1:1.0: USB hub found
    [ 1.489065] hub 1-1:1.0: 4 ports detected
    [ 1.492959] mmc0: Card stuck being busy! __mmc_poll_for_busy
    [ 1.744137] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
    [ 1.746533] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
    [ 1.748714] meson8b-dwmac c9410000.ethernet: PTP uses main clock
    [ 1.754384] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
    [ 1.757217] meson8b-dwmac c9410000.ethernet: DWMAC1000
    [ 1.759040] meson-drm d0100000.vpu: Queued 2 outputs on vpu
    [ 1.765041] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
    [ 1.767171] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
    [ 1.769864] meson8b-dwmac c9410000.ethernet: COE Type 2
    [ 1.771768] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
    [ 1.773858] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
    [ 1.778306] meson8b-dwmac c9410000.ethernet: Normal descriptors
    [ 1.780221] meson8b-dwmac c9410000.ethernet: Ring mode enabled
    [ 1.782209] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    [ 1.799686] Console: switching to colour dummy device 80x25
    [ 1.829129] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
    [ 1.831907] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
    [ 1.832176] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
    [ 1.836507] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
    [ 1.838946] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
    [ 1.839131] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
    [ 1.840018] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
    [ 1.844575] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
    [ 1.847333] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
    [ 1.851033] lima d00c0000.gpu: bus rate = 166666667
    [ 1.851094] lima d00c0000.gpu: mod rate = 24000000
    [ 1.851669] lima d00c0000.gpu: error -ENODEV: dev_pm_opp_set_regulators: no regulator (mali) found
    [ 1.855393] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
    [ 1.858175] lima d00c0000.gpu: Failed to register cooling device
    [ 1.858430] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
    [ 1.858584] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 1
    [ 2.031198] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
    [ 2.093659] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
    [ 2.101556] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
    [ 2.103859] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
    [ 2.165198] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
    [ 2.167716] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
    [ 2.170419] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
    [ 2.172725] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
    [ 2.497876] Console: switching to colour frame buffer device 240x67
    [ 2.592069] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/framebuffer
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/console_setup
  • '[' -e /conf/param.conf ]
  • maybe_break modules
  • '[' n '!=' y ]
  • log_begin_msg 'Loading essential drivers'
  • _log_msg 'Begin: %s ... ' 'Loading essential drivers'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Loading essential drivers'
    Begin: Loading essential drivers ... + return 0
  • '[' -n ]
  • load_modules
  • '[' -e /conf/modules ]
  • read -r m
  • '[' -z linear ]
  • printf '%.1s' linear
  • com=l
  • '[' l '=' '#' ]
  • modprobe linear
  • read -r m
  • '[' -z multipath ]
  • printf '%.1s' multipath
  • com=m
  • '[' m '=' '#' ]
  • modprobe multipath
  • read -r m
  • '[' -z raid0 ]
  • printf '%.1s' raid0
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid0
  • read -r m
  • '[' -z raid1 ]
  • printf '%.1s' raid1
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid1
  • read -r m
  • '[' -z raid456 ]
  • printf '%.1s' raid456
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid456
  • read -r m
  • '[' -z raid5 ]
  • printf '%.1s' raid5
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid5
  • read -r m
  • '[' -z raid6 ]
  • printf '%.1s' raid6
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid6
  • read -r m
  • '[' -z raid10 ]
  • printf '%.1s' raid10
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid10
  • read -r m
  • '[' -z efivars ]
  • printf '%.1s' efivars
  • com=e
  • '[' e '=' '#' ]
  • modprobe efivars
  • read -r m
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • _uptime
  • local uptime
  • cat /proc/uptime
  • uptime='2.98 7.16'
  • uptime=2
  • echo 2
  • starttime=2
  • starttime=3
  • export starttime
  • maybe_break premount
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-premount'
    Begin: Running /scripts/init-premount ... + return 0
  • run_scripts /scripts/init-premount
  • initdir=/scripts/init-premount
  • '[' '!' -d /scripts/init-premount ]
  • shift
  • . /scripts/init-premount/ORDER
  • /scripts/init-premount/plymouth
  • '[' -e /conf/param.conf ]
  • /scripts/init-premount/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • maybe_break mount
  • log_begin_msg 'Mounting root file system'
  • _log_msg 'Begin: %s ... ' 'Mounting root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Mounting root file system'
    Begin: Mounting root file system ... + return 0
  • . /scripts/local
  • . /scripts/nfs
  • . /scripts/local
  • parse_numeric 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • return
  • maybe_break mountroot
  • mount_top
  • local_top
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-top'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-top'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-top'
    Begin: Running /scripts/local-top ... + return 0
  • run_scripts /scripts/local-top
  • initdir=/scripts/local-top
  • '[' '!' -d /scripts/local-top ]
  • shift
  • . /scripts/local-top/ORDER
  • /scripts/local-top/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/cryptroot
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_top_used=yes
  • mount_premount
  • local_premount
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-premount'
    Begin: Running /scripts/local-premount ... + return 0
  • run_scripts /scripts/local-premount
  • initdir=/scripts/local-premount
  • '[' '!' -d /scripts/local-premount ]
  • shift
  • . /scripts/local-premount/ORDER
  • /scripts/local-premount/btrfs
    [ 3.156490] raid6: neonx8 gen() 2579 MB/s
    [ 3.224456] raid6: neonx4 gen() 2287 MB/s
    [ 3.292463] raid6: neonx2 gen() 2574 MB/s
    [ 3.360460] raid6: neonx1 gen() 1991 MB/s
    [ 3.428456] raid6: int64x8 gen() 1434 MB/s
    [ 3.496457] raid6: int64x4 gen() 1981 MB/s
    [ 3.564463] raid6: int64x2 gen() 1673 MB/s
    [ 3.632453] raid6: int64x1 gen() 1246 MB/s
    [ 3.632518] raid6: using algorithm neonx8 gen() 2579 MB/s
    [ 3.700453] raid6: .... xor() 1954 MB/s, rmw enabled
    [ 3.700527] raid6: using neon recovery algorithm
    [ 3.702310] xor: measuring software checksum speed
    [ 3.705442] 8regs : 3309 MB/sec
    [ 3.708523] 32regs : 3309 MB/sec
    [ 3.711955] arm64_neon : 2925 MB/sec
    [ 3.712019] xor: using function: 32regs (3309 MB/sec)
    [ 3.735341] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
    Scanning for Btrfs filesystems
    [ 3.900774] BTRFS: device label writable devid 1 transid 722 /dev/mmcblk1p2 scanned by btrfs (235)
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/fixrtc
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/ntfs_3g
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/resume
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=yes
  • mountroot
  • local_mount_root
  • local_top
  • '[' yes '!=' yes ]
  • local_top_used=yes
  • '[' -z 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • local_device_setup 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 'root file system'
  • local 'dev_id=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'name=root file system'
  • local 'may_panic=true'
  • local real_dev
  • local time_elapsed
  • local count
  • local 'slumber=30'
  • slumber=30
  • '[' 0 -gt 30 ]
  • wait-for-root 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 30
  • FSTYPE=btrfs
  • '[' -n ]
  • '[' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • '[' f576022f-9541-4435-adde-dc39f8ea1fa4 '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • DEV=/dev/mmcblk1p2
  • ROOT=/dev/mmcblk1p2
  • '[' -z ]
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • FSTYPE=btrfs
  • local_premount
  • '[' yes '!=' yes ]
  • local_premount_used=yes
  • '[' y '=' y ]
  • '[' -z ]
  • roflag=-r
  • checkfs /dev/mmcblk1p2 root btrfs
  • _checkfs_once /dev/mmcblk1p2 root btrfs
  • DEV=/dev/mmcblk1p2
  • NAME=root
  • TYPE=btrfs
  • '[' root '=' / ]
  • FSCK_LOGFILE=/run/initramfs/fsck.log
  • FSCK_STAMPFILE=/run/initramfs/fsck-root
  • '[' btrfs '=' auto ]
  • FSCKCODE=0
  • '[' -z btrfs ]
  • command -v fsck
  • '[' n '=' y ]
  • '[' n '=' y ]
  • force=
  • '[' '=' y ]
  • '[' '=' n ]
  • fix=-a
  • spinner=
  • '[' -z y ]
  • '[' n '=' n ]
  • log_begin_msg 'Will now check root file system'
  • _log_msg 'Begin: %s ... ' 'Will now check root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Will now check root file system'
    Begin: Will now check root file system ... + return 0
  • logsave -a -s /run/initramfs/fsck.log fsck -a -V -t btrfs /dev/mmcblk1p2
    fsck from util-linux 2.37.2
    [/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
  • FSCKCODE=0
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • '[' 0 -eq 32 ]
  • '[' 0 -eq 4 ]
  • '[' 0 -gt 1 ]
  • true
  • return 0
  • mount -r -t btrfs /dev/mmcblk1p2 /root
    [ 4.047075] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
    [ 4.047446] BTRFS info (device mmcblk1p2): disk space caching is enabled
    [ 4.048160] BTRFS info (device mmcblk1p2): has skinny extents
    [ 4.071237] BTRFS info (device mmcblk1p2): enabling ssd optimizations
  • mountroot_status=0
  • '[' ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • read_fstab_entry /usr
  • found=1
  • '[' -f /root/etc/fstab ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' / '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' /boot/firmware '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • return 1
  • mount_bottom
  • local_bottom
  • '[' yes '=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-bottom'
    Begin: Running /scripts/local-bottom ... + return 0
  • run_scripts /scripts/local-bottom
  • initdir=/scripts/local-bottom
  • '[' '!' -d /scripts/local-bottom ]
  • shift
  • . /scripts/local-bottom/ORDER
  • /scripts/local-bottom/cryptgnupg-sc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptroot
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/mdadm
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/ntfs_3g
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=no
  • local_top_used=no
  • nfs_bottom
  • '[' '=' yes ]
  • '[' '=' yes ]
  • nfs_premount_used=no
  • nfs_top_used=no
  • local_bottom
  • '[' no '=' yes ]
  • '[' no '=' yes ]
  • local_premount_used=no
  • local_top_used=no
  • maybe_break bottom
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-bottom'
    Begin: Running /scripts/init-bottom ... + return 0
  • run_scripts /scripts/init-bottom
  • initdir=/scripts/init-bottom
  • '[' '!' -d /scripts/init-bottom ]
  • shift
  • . /scripts/init-bottom/ORDER
  • /scripts/init-bottom/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/overlayroot
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/udev
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/copymods
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/plymouth
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • mount -n -o move /run /root/run
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • maybe_break init
  • unset debug
  • unset MODPROBE_OPTIONS
  • unset DPKG_ARCH
  • unset ROOTFLAGS
  • unset ROOTFSTYPE
  • unset ROOTDELAY
  • unset ROOT
  • unset IP
  • unset IP6
  • unset VLAN
  • unset BOOT
  • unset BOOTIF
  • unset DEVICE
  • unset UBIMTD
  • unset blacklist
  • unset break
  • unset noresume
  • unset panic
  • unset quiet
  • unset readonly
  • unset resume
  • unset resume_offset
  • unset noresume
  • unset fastboot
  • unset forcefsck
  • unset fsckfix
  • unset starttime
  • mount -n -o move /sys /root/sys
  • mount -n -o move /proc /root/proc
  • exec run-init /root /sbin/init
    [ 25.360449] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 25.360597] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 25.361300] (detected by 3, t=5252 jiffies, g=-263, q=1992 ncpus=4)
    [ 25.362031] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 25.363204] Call trace:
    [ 25.363412] dump_backtrace.part.6+0xdc/0xe8
    [ 25.363920] show_stack+0x18/0x68
    [ 25.364290] sched_show_task+0x154/0x198
    [ 25.364746] rcu_sched_clock_irq+0xd60/0xe28
    [ 25.365239] update_process_times+0x68/0x98
    [ 25.365718] tick_sched_handle.isra.19+0x34/0x58
    [ 25.366253] tick_sched_timer+0x4c/0xa8
    [ 25.366685] __hrtimer_run_queues+0x120/0x1b8
    [ 25.367190] hrtimer_interrupt+0xd8/0x238
    [ 25.367647] arch_timer_handler_phys+0x2c/0x50
    [ 25.368161] handle_percpu_devid_irq+0x84/0x138
    [ 25.368682] generic_handle_domain_irq+0x2c/0x48
    [ 25.369213] gic_handle_irq+0xa4/0xc0
    [ 25.369624] call_on_irq_stack+0x2c/0x58
    [ 25.373221] do_interrupt_handler+0x80/0x88
    [ 25.376356] el1_interrupt+0x38/0x70
    [ 25.379449] el1h_64_irq_handler+0x18/0x28
    [ 25.382510] el1h_64_irq+0x64/0x68
    [ 25.385519] xas_load+0x60/0x78
    [ 25.388486] xas_find+0x190/0x1d8
    [ 25.391406] find_lock_entries+0x7c/0x2b8
    [ 25.394299] truncate_inode_pages_range+0xa8/0x558
    [ 25.397174] truncate_inode_pages_final+0x58/0x78
    [ 25.399999] evict+0x144/0x150
    [ 25.402774] iput+0x128/0x190
    [ 25.405503] do_unlinkat+0x17c/0x2a8
    [ 25.408202] __arm64_sys_unlinkat+0x40/0x88
    [ 25.410873] invoke_syscall+0x44/0x100
    [ 25.413507] el0_svc_common.constprop.3+0x6c/0xf0
    [ 25.416122] do_el0_svc+0x2c/0xb8
    [ 25.418691] el0_svc+0x20/0x60
    [ 25.421215] el0t_64_sync_handler+0x98/0xc0
    [ 25.423716] el0t_64_sync+0x170/0x174

@dsx724
Copy link
Author

dsx724 commented Jul 19, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.15.55-00365-g4aa6e752aa31 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]2
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x5706d040 MEMRESERVE=0x5706c040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3edc00-0x7f3effff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x000000005706cfff]
[ 0.000000] node 0: [mem 0x000000005706d000-0x000000005706dfff]
[ 0.000000] node 0: [mem 0x000000005706e000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s41368 r8192 d32360 u81920
[ 0.000000] pcpu-alloc: s41368 r8192 d32360 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro debug=vc systemd.log_level=debug systemd.log_target=console console=tty0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1668340K/2097152K available (15232K kernel code, 3080K rwdata, 8272K rodata, 6208K init, 502K bss, 166668K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.001233] Console: colour dummy device 80x25
[ 0.001783] printk: console [tty1] enabled
[ 0.001877] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001902] pid_max: default: 32768 minimum: 301
[ 0.001969] LSM: Security Framework initializing
[ 0.002076] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002102] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.003477] rcu: Hierarchical SRCU implementation.
[ 0.006102] Remapping and enabling EFI services.
[ 0.006469] smp: Bringing up secondary CPUs ...
[ 0.006988] Detected VIPT I-cache on CPU1
[ 0.007058] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.007629] Detected VIPT I-cache on CPU2
[ 0.007686] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.008287] Detected VIPT I-cache on CPU3
[ 0.008346] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.008427] smp: Brought up 1 node, 4 CPUs
[ 0.008495] SMP: Total of 4 processors activated.
[ 0.008506] CPU features: detected: 32-bit EL0 Support
[ 0.008516] CPU features: detected: 32-bit EL1 Support
[ 0.008529] CPU features: detected: CRC32 instructions
[ 0.014688] CPU: All CPU(s) started at EL2
[ 0.014762] alternatives: patching kernel code
[ 0.016291] devtmpfs: initialized
[ 0.022173] KASLR enabled
[ 0.022376] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.022412] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.028852] pinctrl core: initialized pinctrl subsystem
[ 0.029813] SMBIOS 3.0 present.
[ 0.029856] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.030419] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.031881] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.032062] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.032207] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.032313] audit: initializing netlink subsys (disabled)
[ 0.032537] audit: type=2000 audit(0.032:1): state=initialized audit_enabled=0 res=1
[ 0.033777] thermal_sys: Registered thermal governor 'step_wise'
[ 0.033790] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.034049] cpuidle: using governor menu
[ 0.034374] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.034496] ASID allocator initialised with 32768 entries
[ 0.036141] Serial: AMBA PL011 UART driver
[ 0.055488] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.057967] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.058743] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.069927] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.069963] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.069977] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.069990] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.070964] cryptd: max_cpu_qlen set to 1000
[ 0.073153] ACPI: Interpreter disabled.
[ 0.075131] VDDIO_BOOT: supplied by VCC_3V3
[ 0.075810] iommu: Default domain type: Translated
[ 0.075842] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.076134] vgaarb: loaded
[ 0.076463] SCSI subsystem initialized
[ 0.076644] libata version 3.00 loaded.
[ 0.076864] usbcore: registered new interface driver usbfs
[ 0.076913] usbcore: registered new interface driver hub
[ 0.076952] usbcore: registered new device driver usb
[ 0.077827] pps_core: LinuxPPS API ver. 1 registered
[ 0.077844] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.077869] PTP clock support registered
[ 0.077993] EDAC MC: Ver: 3.0.0
[ 0.078997] Registered efivars operations
[ 0.080155] FPGA manager framework
[ 0.080269] Advanced Linux Sound Architecture Driver Initialized.
[ 0.081354] clocksource: Switched to clocksource arch_sys_counter
[ 0.081538] VFS: Disk quotas dquot_6.6.0
[ 0.081598] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.081779] pnp: PnP ACPI: disabled
[ 0.086971] NET: Registered PF_INET protocol family
[ 0.087147] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.088191] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.088254] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.088279] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.088398] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.088606] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.088739] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.088801] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.088964] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.089601] RPC: Registered named UNIX socket transport module.
[ 0.089634] RPC: Registered udp transport module.
[ 0.089644] RPC: Registered tcp transport module.
[ 0.089654] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.089672] PCI: CLS 0 bytes, default 64
[ 0.089850] Unpacking initramfs...
[ 0.101943] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.102415] kvm [1]: IPA Size Limit: 40 bits
[ 0.103945] kvm [1]: vgic interrupt IRQ9
[ 0.104102] kvm [1]: Hyp mode initialized successfully
[ 0.107842] Initialise system trusted keyrings
[ 0.108102] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.114319] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.115099] NFS: Registering the id_resolver key type
[ 0.115171] Key type id_resolver registered
[ 0.115185] Key type id_legacy registered
[ 0.115291] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.115313] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.115543] 9p: Installing v9fs 9p2000 file system support
[ 0.151340] Key type asymmetric registered
[ 0.151382] Asymmetric key parser 'x509' registered
[ 0.151516] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.151545] io scheduler mq-deadline registered
[ 0.151557] io scheduler kyber registered
[ 0.169983] EINJ: ACPI disabled.
[ 0.190682] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.201551] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.205188] SuperH (H)SCI(F) driver initialized
[ 0.206066] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 22, base_baud = 1500000) is a meson_uart
[ 0.328239] printk: console [ttyAML0] enabled
[ 0.329659] msm_serial: driver initialized
[ 0.340542] loop: module loaded
[ 0.342639] megasas: 07.717.02.00-rc1
[ 0.353701] tun: Universal TUN/TAP device driver, 1.6
[ 0.355278] thunder_xcv, ver 1.0
[ 0.355375] thunder_bgx, ver 1.0
[ 0.355441] nicpf, ver 1.0
[ 0.357933] hclge is initializing
[ 0.357996] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.358528] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.359255] e1000: Intel(R) PRO/1000 Network Driver
[ 0.359697] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.360451] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.360928] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.361730] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.362231] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.362947] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.363589] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.365022] sky2: driver version 1.30
[ 0.366918] VFIO - User Level meta-driver version: 0.3
[ 0.371205] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.371346] ehci-pci: EHCI PCI platform driver
[ 0.371938] ehci-platform: EHCI generic platform driver
[ 0.372798] ehci-orion: EHCI orion driver
[ 0.373208] ehci-exynos: EHCI Exynos driver
[ 0.373674] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.374122] ohci-pci: OHCI PCI platform driver
[ 0.374721] ohci-platform: OHCI generic platform driver
[ 0.375561] ohci-exynos: OHCI Exynos driver
[ 0.377156] usbcore: registered new interface driver usb-storage
[ 0.384092] i2c_dev: i2c /dev entries driver
[ 0.394516] sdhci: Secure Digital Host Controller Interface driver
[ 0.394622] sdhci: Copyright(c) Pierre Ossman
[ 0.396398] Synopsys Designware Multimedia Card Interface Driver
[ 0.397869] Freeing initrd memory: 30104K
[ 0.398399] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.398508] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.402389] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.403606] efifb: probing for efifb
[ 0.403786] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.404147] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.404845] efifb: scrolling: redraw
[ 0.405252] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.431237] Console: switching to colour frame buffer device 240x67
[ 0.431898] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.431910] mmc0: error -22 whilst initialising SDIO card
[ 0.456449] fb0: EFI VGA frame buffer device
[ 0.457617] meson-sm: secure-monitor enabled
[ 0.459271] usbcore: registered new interface driver usbhid
[ 0.459487] usbhid: USB HID core driver
[ 0.461176] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.469996] NET: Registered PF_PACKET protocol family
[ 0.470294] 9pnet: Installing 9P2000 support
[ 0.470573] Key type dns_resolver registered
[ 0.471440] Loading compiled-in X.509 certificates
[ 0.491552] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.491711] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 1.023498] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 1.024002] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 1.024872] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 1.028584] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.028759] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1.029804] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 1.030766] xhci-hcd xhci-hcd.0.auto: irq 48, io mem 0xc9000000
[ 1.032110] hub 1-0:1.0: USB hub found
[ 1.032261] hub 1-0:1.0: 2 ports detected
[ 1.032758] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.033119] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 1.034058] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 1.034859] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.036276] hub 2-0:1.0: USB hub found
[ 1.036407] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 1.041813] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 1.042294] meson-gx-mmc d0072000.mmc: Got CD GPIO
domain-0 init dvfs: 4
[ 1.057142] ALSA device list:
[ 1.057239] No soundcards found.
[ 1.071979] Freeing unused kernel memory: 6208K
[ 1.077427] Run /init as init process
[ 1.077633] with arguments:
[ 1.077769] /init
[ 1.077861] with environment:
[ 1.083255] HOME=/
[ 1.088099] TERM=linux
[ 1.092295] BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31
Loading, please wait...
[ 1.126677] mmc1: new high speed SDHC card at address aaaa
[ 1.135183] mmcblk1: mmc1:aaaa SC16G 14.8 GiB

  • '[' -z ]
  • BOOT=local
  • '[' -n ]
  • '[' '=' none ]
  • resume=
  • mount -t tmpfs -o 'nodev,noexec,nosuid,size=10%,mode=0755' tmpfs /run
  • mkdir -m 0700 /run/initramfs
  • '[' -n ]
  • maybe_break top
  • run_scripts /scripts/init-top
  • initdir=/scripts/init-top
  • '[' '!' -d /scripts/init-top ]
  • shift
  • . /scripts/init-top/ORDER
  • /scripts/init-top/all_generic_ide
    [ 1.150243] mmcblk1: p1 p2
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/blacklist
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/udev
    Starting version 249.11-0ubuntu3.4
    [ 1.289426] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [ 1.483383] hub 1-1:1.0: USB hub found
    [ 1.488196] hub 1-1:1.0: 4 ports detected
    [ 1.759187] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
    [ 1.764115] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
    [ 1.768534] meson8b-dwmac c9410000.ethernet: PTP uses main clock
    [ 1.775838] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
    [ 1.780192] meson8b-dwmac c9410000.ethernet: DWMAC1000
    [ 1.784295] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
    [ 1.788592] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
    [ 1.792923] meson8b-dwmac c9410000.ethernet: COE Type 2
    [ 1.797013] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
    [ 1.801211] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
    [ 1.805736] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
    [ 1.813292] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
    [ 1.813574] meson8b-dwmac c9410000.ethernet: Normal descriptors
    [ 1.817501] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
    [ 1.821433] meson8b-dwmac c9410000.ethernet: Ring mode enabled
    [ 1.825649] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
    [ 1.829536] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    [ 1.833885] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
    [ 1.836761] meson-drm d0100000.vpu: Queued 3 outputs on vpu
    [ 1.847913] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
    [ 1.853166] checking generic (7f807000 7e9000) vs hw (0 ffffffffffffffff)
    [ 1.857987] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
    [ 1.863019] fb0: switching to meson from EFI VGA
    [ 1.871472] Console: switching to colour dummy device 80x25
    [ 1.872361] lima d00c0000.gpu: bus rate = 166666667
    [ 1.872422] lima d00c0000.gpu: mod rate = 24000000
    [ 1.873319] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
    [ 1.877012] lima d00c0000.gpu: Failed to register cooling device
    [ 1.880635] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 0
    [ 1.905495] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
    [ 1.909571] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
    [ 1.912658] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
    [ 1.915054] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1
    [ 2.030719] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
    [ 2.053656] [drm] kms: can't enable cloning when we probably wanted to.
    [ 2.090120] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
    [ 2.097121] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
    [ 2.097585] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
    [ 2.158206] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
    [ 2.158834] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
    [ 2.159234] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
    [ 2.159457] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
    [ 2.229618] Console: switching to colour frame buffer device 240x67
    [ 2.293494] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/framebuffer
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/console_setup
  • '[' -e /conf/param.conf ]
  • maybe_break modules
  • '[' n '!=' y ]
  • log_begin_msg 'Loading essential drivers'
  • _log_msg 'Begin: %s ... ' 'Loading essential drivers'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Loading essential drivers'
    Begin: Loading essential drivers ... + return 0
  • '[' -n ]
  • load_modules
  • '[' -e /conf/modules ]
  • read -r m
  • '[' -z linear ]
  • printf '%.1s' linear
  • com=l
  • '[' l '=' '#' ]
  • modprobe linear
  • read -r m
  • '[' -z multipath ]
  • printf '%.1s' multipath
  • com=m
  • '[' m '=' '#' ]
  • modprobe multipath
  • read -r m
  • '[' -z raid0 ]
  • printf '%.1s' raid0
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid0
  • read -r m
  • '[' -z raid1 ]
  • printf '%.1s' raid1
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid1
  • read -r m
  • '[' -z raid456 ]
  • printf '%.1s' raid456
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid456
  • read -r m
  • '[' -z raid5 ]
  • printf '%.1s' raid5
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid5
  • read -r m
  • '[' -z raid6 ]
  • printf '%.1s' raid6
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid6
  • read -r m
  • '[' -z raid10 ]
  • printf '%.1s' raid10
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid10
  • read -r m
  • '[' -z efivars ]
  • printf '%.1s' efivars
  • com=e
  • '[' e '=' '#' ]
  • modprobe efivars
  • read -r m
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • _uptime
  • local uptime
  • cat /proc/uptime
  • uptime='2.68 6.25'
  • uptime=2
  • echo 2
  • starttime=2
  • starttime=3
  • export starttime
  • maybe_break premount
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-premount'
    Begin: Running /scripts/init-premount ... + return 0
  • run_scripts /scripts/init-premount
  • initdir=/scripts/init-premount
  • '[' '!' -d /scripts/init-premount ]
  • shift
  • . /scripts/init-premount/ORDER
  • /scripts/init-premount/plymouth
  • '[' -e /conf/param.conf ]
  • /scripts/init-premount/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • maybe_break mount
  • log_begin_msg 'Mounting root file system'
  • _log_msg 'Begin: %s ... ' 'Mounting root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Mounting root file system'
    Begin: Mounting root file system ... + return 0
  • . /scripts/local
  • . /scripts/nfs
  • . /scripts/local
  • parse_numeric 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • return
  • maybe_break mountroot
  • mount_top
  • local_top
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-top'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-top'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-top'
    Begin: Running /scripts/local-top ... + return 0
  • run_scripts /scripts/local-top
  • initdir=/scripts/local-top
  • '[' '!' -d /scripts/local-top ]
  • shift
  • . /scripts/local-top/ORDER
  • /scripts/local-top/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/cryptroot
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_top_used=yes
  • mount_premount
  • local_premount
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-premount'
    Begin: Running /scripts/local-premount ... + return 0
  • run_scripts /scripts/local-premount
  • initdir=/scripts/local-premount
  • '[' '!' -d /scripts/local-premount ]
  • shift
  • . /scripts/local-premount/ORDER
  • /scripts/local-premount/btrfs
    [ 2.861391] raid6: neonx8 gen() 2259 MB/s
    [ 2.929347] raid6: neonx8 xor() 1697 MB/s
    [ 2.997353] raid6: neonx4 gen() 2653 MB/s
    [ 3.065350] raid6: neonx4 xor() 1888 MB/s
    [ 3.133351] raid6: neonx2 gen() 2587 MB/s
    [ 3.201376] raid6: neonx2 xor() 1761 MB/s
    [ 3.269358] raid6: neonx1 gen() 2002 MB/s
    [ 3.337349] raid6: neonx1 xor() 1432 MB/s
    [ 3.405349] raid6: int64x8 gen() 1434 MB/s
    [ 3.473355] raid6: int64x8 xor() 890 MB/s
    [ 3.541360] raid6: int64x4 gen() 1998 MB/s
    [ 3.609353] raid6: int64x4 xor() 1000 MB/s
    [ 3.677352] raid6: int64x2 gen() 1671 MB/s
    [ 3.745355] raid6: int64x2 xor() 894 MB/s
    [ 3.813364] raid6: int64x1 gen() 1245 MB/s
    [ 3.881356] raid6: int64x1 xor() 633 MB/s
    [ 3.881443] raid6: using algorithm neonx4 gen() 2653 MB/s
    [ 3.881910] raid6: .... xor() 1888 MB/s, rmw enabled
    [ 3.882474] raid6: using neon recovery algorithm
    [ 3.885670] xor: measuring software checksum speed
    [ 3.889328] 8regs : 2793 MB/sec
    [ 3.892339] 32regs : 3434 MB/sec
    [ 3.895796] arm64_neon : 2931 MB/sec
    [ 3.895888] xor: using function: 32regs (3434 MB/sec)
    [ 3.919429] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
    Scanning for Btrfs filesystems
    [ 4.070014] BTRFS: device label writable devid 1 transid 753 /dev/mmcblk1p2 scanned by btrfs (244)
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/fixrtc
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/ntfs_3g
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/resume
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=yes
  • mountroot
  • local_mount_root
  • local_top
  • '[' yes '!=' yes ]
  • local_top_used=yes
  • '[' -z 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • local_device_setup 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 'root file system'
  • local 'dev_id=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'name=root file system'
  • local 'may_panic=true'
  • local real_dev
  • local time_elapsed
  • local count
  • local 'slumber=30'
  • slumber=30
  • '[' 0 -gt 30 ]
  • wait-for-root 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 30
  • FSTYPE=btrfs
  • '[' -n ]
  • '[' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • '[' f576022f-9541-4435-adde-dc39f8ea1fa4 '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • DEV=/dev/mmcblk1p2
  • ROOT=/dev/mmcblk1p2
  • '[' -z ]
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • FSTYPE=btrfs
  • local_premount
  • '[' yes '!=' yes ]
  • local_premount_used=yes
  • '[' y '=' y ]
  • '[' -z ]
  • roflag=-r
  • checkfs /dev/mmcblk1p2 root btrfs
  • _checkfs_once /dev/mmcblk1p2 root btrfs
  • DEV=/dev/mmcblk1p2
  • NAME=root
  • TYPE=btrfs
  • '[' root '=' / ]
  • FSCK_LOGFILE=/run/initramfs/fsck.log
  • FSCK_STAMPFILE=/run/initramfs/fsck-root
  • '[' btrfs '=' auto ]
  • FSCKCODE=0
  • '[' -z btrfs ]
  • command -v fsck
  • '[' n '=' y ]
  • '[' n '=' y ]
  • force=
  • '[' '=' y ]
  • '[' '=' n ]
  • fix=-a
  • spinner=
  • '[' -z y ]
  • '[' n '=' n ]
  • log_begin_msg 'Will now check root file system'
  • _log_msg 'Begin: %s ... ' 'Will now check root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Will now check root file system'
    Begin: Will now check root file system ... + return 0
  • logsave -a -s /run/initramfs/fsck.log fsck -a -V -t btrfs /dev/mmcblk1p2
    fsck from util-linux 2.37.2
    [/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
  • FSCKCODE=0
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • '[' 0 -eq 32 ]
  • '[' 0 -eq 4 ]
  • '[' 0 -gt 1 ]
  • true
  • return 0
  • mount -r -t btrfs /dev/mmcblk1p2 /root
    [ 4.242975] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
    [ 4.243404] BTRFS info (device mmcblk1p2): disk space caching is enabled
    [ 4.244138] BTRFS info (device mmcblk1p2): has skinny extents
    [ 4.265534] BTRFS info (device mmcblk1p2): enabling ssd optimizations
  • mountroot_status=0
  • '[' ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • read_fstab_entry /usr
  • found=1
  • '[' -f /root/etc/fstab ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' / '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' /boot/firmware '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • return 1
  • mount_bottom
  • local_bottom
  • '[' yes '=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-bottom'
    Begin: Running /scripts/local-bottom ... + return 0
  • run_scripts /scripts/local-bottom
  • initdir=/scripts/local-bottom
  • '[' '!' -d /scripts/local-bottom ]
  • shift
  • . /scripts/local-bottom/ORDER
  • /scripts/local-bottom/cryptgnupg-sc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptroot
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/mdadm
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/ntfs_3g
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=no
  • local_top_used=no
  • nfs_bottom
  • '[' '=' yes ]
  • '[' '=' yes ]
  • nfs_premount_used=no
  • nfs_top_used=no
  • local_bottom
  • '[' no '=' yes ]
  • '[' no '=' yes ]
  • local_premount_used=no
  • local_top_used=no
  • maybe_break bottom
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-bottom'
    Begin: Running /scripts/init-bottom ... + return 0
  • run_scripts /scripts/init-bottom
  • initdir=/scripts/init-bottom
  • '[' '!' -d /scripts/init-bottom ]
  • shift
  • . /scripts/init-bottom/ORDER
  • /scripts/init-bottom/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/overlayroot
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/udev
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/copymods
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/plymouth
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • mount -n -o move /run /root/run
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • maybe_break init
  • unset debug
  • unset MODPROBE_OPTIONS
  • unset DPKG_ARCH
  • unset ROOTFLAGS
  • unset ROOTFSTYPE
  • unset ROOTDELAY
  • unset ROOT
  • unset IP
  • unset IP6
  • unset VLAN
  • unset BOOT
  • unset BOOTIF
  • unset DEVICE
  • unset UBIMTD
  • unset blacklist
  • unset break
  • unset noresume
  • unset panic
  • unset quiet
  • unset readonly
  • unset resume
  • unset resume_offset
  • unset noresume
  • unset fastboot
  • unset forcefsck
  • unset fsckfix
  • unset starttime
  • mount -n -o move /sys /root/sys
  • mount -n -o move /proc /root/proc
  • exec run-init /root /sbin/init
    [ 12.105235] [drm] kms: can't enable cloning when we probably wanted to.
    [ 25.605343] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 25.605525] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 25.606226] (detected by 1, t=5252 jiffies, g=-287, q=1585)
    [ 25.611946] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 25.617665] Call trace:
    [ 25.622771] dump_backtrace+0x0/0x1c0
    [ 25.627864] show_stack+0x18/0x68
    [ 25.632889] sched_show_task+0x154/0x198
    [ 25.637899] rcu_sched_clock_irq+0xbec/0xd78
    [ 25.642890] update_process_times+0x9c/0xd0
    [ 25.647897] tick_sched_handle.isra.19+0x34/0x58
    [ 25.652895] tick_sched_timer+0x4c/0xa8
    [ 25.657817] __hrtimer_run_queues+0x120/0x1b8
    [ 25.662712] hrtimer_interrupt+0xd8/0x238
    [ 25.667564] arch_timer_handler_phys+0x2c/0x50
    [ 25.672383] handle_percpu_devid_irq+0x84/0x138
    [ 25.677144] handle_domain_irq+0x5c/0x90
    [ 25.681838] gic_handle_irq+0xb0/0xd0
    [ 25.686471] call_on_irq_stack+0x28/0x50
    [ 25.691048] do_interrupt_handler+0x58/0x60
    [ 25.695576] el1_interrupt+0x30/0x78
    [ 25.700043] el1h_64_irq_handler+0x18/0x28
    [ 25.704472] el1h_64_irq+0x74/0x78
    [ 25.708823] xas_start+0x48/0xd0
    [ 25.713103] xas_find+0x190/0x1d8
    [ 25.717313] find_lock_entries+0x7c/0x330
    [ 25.721488] truncate_inode_pages_range+0xb8/0x6c8
    [ 25.725536] truncate_inode_pages_final+0x68/0x78
    [ 25.729356] evict+0x144/0x150
    [ 25.733020] iput+0x134/0x1b8
    [ 25.736527] do_unlinkat+0x17c/0x2a8
    [ 25.740075] __arm64_sys_unlinkat+0x40/0x88
    [ 25.743674] invoke_syscall+0x44/0x100
    [ 25.747079] el0_svc_common.constprop.3+0x6c/0xf0
    [ 25.750365] do_el0_svc+0x24/0x88
    [ 25.753589] el0_svc+0x20/0x60
    [ 25.756751] el0t_64_sync_handler+0x90/0xb8
    [ 25.759957] el0t_64_sync+0x180/0x184
    [ 31.709372] VDDIO_BOOT: disabling

@dsx724
Copy link
Author

dsx724 commented Jul 19, 2022

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.15.55-00365-g4aa6e752aa31 (dxue@build-server) (aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]2
[ 0.000000] Machine model: Libre Computer AML-S905X-CC
[ 0.000000] efi: EFI v2.90 by Das U-Boot
[ 0.000000] efi: RTPROP=0x7ae86040 SMBIOS=0x7ae82000 RNG=0x5706d040 MEMRESERVE=0x5706c040
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: crng init done
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7f3ecc00-0x7f3eefff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff]
[ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff]
[ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x000000005706cfff]
[ 0.000000] node 0: [mem 0x000000005706d000-0x000000005706dfff]
[ 0.000000] node 0: [mem 0x000000005706e000-0x000000007ae81fff]
[ 0.000000] node 0: [mem 0x000000007ae82000-0x000000007ae82fff]
[ 0.000000] node 0: [mem 0x000000007ae83000-0x000000007ae85fff]
[ 0.000000] node 0: [mem 0x000000007ae86000-0x000000007ae88fff]
[ 0.000000] node 0: [mem 0x000000007ae89000-0x000000007ae89fff]
[ 0.000000] node 0: [mem 0x000000007ae8a000-0x000000007ae8dfff]
[ 0.000000] node 0: [mem 0x000000007ae8e000-0x000000007deaffff]
[ 0.000000] node 0: [mem 0x000000007deb0000-0x000000007debffff]
[ 0.000000] node 0: [mem 0x000000007dec0000-0x000000007f806fff]
[ 0.000000] node 0: [mem 0x000000007f807000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s41368 r8192 d32360 u81920
[ 0.000000] pcpu-alloc: s41368 r8192 d32360 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31 root=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4 ro debug=vc systemd.log_level=debug systemd.log_target=console console=tty0
[ 0.000000] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1668336K/2097152K available (15232K kernel code, 3080K rwdata, 8272K rodata, 6208K init, 502K bss, 166672K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.001235] Console: colour dummy device 80x25
[ 0.001785] printk: console [tty1] enabled
[ 0.001878] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001903] pid_max: default: 32768 minimum: 301
[ 0.001969] LSM: Security Framework initializing
[ 0.002077] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002103] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.003476] rcu: Hierarchical SRCU implementation.
[ 0.006107] Remapping and enabling EFI services.
[ 0.006481] smp: Bringing up secondary CPUs ...
[ 0.007003] Detected VIPT I-cache on CPU1
[ 0.007074] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.007642] Detected VIPT I-cache on CPU2
[ 0.007701] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.008299] Detected VIPT I-cache on CPU3
[ 0.008358] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.008446] smp: Brought up 1 node, 4 CPUs
[ 0.008514] SMP: Total of 4 processors activated.
[ 0.008526] CPU features: detected: 32-bit EL0 Support
[ 0.008535] CPU features: detected: 32-bit EL1 Support
[ 0.008547] CPU features: detected: CRC32 instructions
[ 0.014692] CPU: All CPU(s) started at EL2
[ 0.014765] alternatives: patching kernel code
[ 0.016323] devtmpfs: initialized
[ 0.022197] KASLR enabled
[ 0.022396] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.022432] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.029757] pinctrl core: initialized pinctrl subsystem
[ 0.030723] SMBIOS 3.0 present.
[ 0.030767] DMI: Unknown Unknown Product/Unknown Product, BIOS 2022.07-00302-gf2bfed3881 07/01/2022
[ 0.031329] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.032750] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.032926] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.033072] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.033177] audit: initializing netlink subsys (disabled)
[ 0.033407] audit: type=2000 audit(0.032:1): state=initialized audit_enabled=0 res=1
[ 0.034645] thermal_sys: Registered thermal governor 'step_wise'
[ 0.034658] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.034925] cpuidle: using governor menu
[ 0.035282] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.035392] ASID allocator initialised with 32768 entries
[ 0.037026] Serial: AMBA PL011 UART driver
[ 0.056518] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[ 0.058921] platform cvbs-connector: Fixing up cyclic dependency with d0100000.vpu
[ 0.059749] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[ 0.070870] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.070905] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.070919] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.070932] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.072035] cryptd: max_cpu_qlen set to 1000
[ 0.074034] ACPI: Interpreter disabled.
[ 0.076054] VDDIO_BOOT: supplied by VCC_3V3
[ 0.076826] iommu: Default domain type: Translated
[ 0.076858] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.077173] vgaarb: loaded
[ 0.077474] SCSI subsystem initialized
[ 0.077660] libata version 3.00 loaded.
[ 0.077882] usbcore: registered new interface driver usbfs
[ 0.077935] usbcore: registered new interface driver hub
[ 0.077972] usbcore: registered new device driver usb
[ 0.078859] pps_core: LinuxPPS API ver. 1 registered
[ 0.078876] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.078901] PTP clock support registered
[ 0.079026] EDAC MC: Ver: 3.0.0
[ 0.080057] Registered efivars operations
[ 0.081240] FPGA manager framework
[ 0.081345] Advanced Linux Sound Architecture Driver Initialized.
[ 0.082428] clocksource: Switched to clocksource arch_sys_counter
[ 0.082614] VFS: Disk quotas dquot_6.6.0
[ 0.082671] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.082858] pnp: PnP ACPI: disabled
[ 0.088086] NET: Registered PF_INET protocol family
[ 0.088249] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.089259] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.089357] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.089384] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.089509] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.089717] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.089860] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.089921] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.090082] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.090575] RPC: Registered named UNIX socket transport module.
[ 0.090608] RPC: Registered udp transport module.
[ 0.090618] RPC: Registered tcp transport module.
[ 0.090628] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.090646] PCI: CLS 0 bytes, default 64
[ 0.090846] Unpacking initramfs...
[ 0.103044] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.103516] kvm [1]: IPA Size Limit: 40 bits
[ 0.105057] kvm [1]: vgic interrupt IRQ9
[ 0.105227] kvm [1]: Hyp mode initialized successfully
[ 0.109113] Initialise system trusted keyrings
[ 0.109388] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.115526] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.116363] NFS: Registering the id_resolver key type
[ 0.116421] Key type id_resolver registered
[ 0.116432] Key type id_legacy registered
[ 0.116539] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.116565] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.116816] 9p: Installing v9fs 9p2000 file system support
[ 0.153499] Key type asymmetric registered
[ 0.153544] Asymmetric key parser 'x509' registered
[ 0.153677] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.153710] io scheduler mq-deadline registered
[ 0.153722] io scheduler kyber registered
[ 0.172789] EINJ: ACPI disabled.
[ 0.193793] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[ 0.204174] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.207795] SuperH (H)SCI(F) driver initialized
[ 0.208623] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 22, base_baud = 1500000) is a meson_uart
[ 0.330807] printk: console [ttyAML0] enabled
[ 0.332162] msm_serial: driver initialized
[ 0.343303] loop: module loaded
[ 0.345249] megasas: 07.717.02.00-rc1
[ 0.355466] tun: Universal TUN/TAP device driver, 1.6
[ 0.357033] thunder_xcv, ver 1.0
[ 0.357132] thunder_bgx, ver 1.0
[ 0.357199] nicpf, ver 1.0
[ 0.359736] hclge is initializing
[ 0.359801] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.360331] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.361074] e1000: Intel(R) PRO/1000 Network Driver
[ 0.361503] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.362247] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.362753] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.363503] igb: Intel(R) Gigabit Ethernet Network Driver
[ 0.364032] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.364746] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.365392] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.366979] sky2: driver version 1.30
[ 0.368856] VFIO - User Level meta-driver version: 0.3
[ 0.373138] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.373279] ehci-pci: EHCI PCI platform driver
[ 0.373872] ehci-platform: EHCI generic platform driver
[ 0.374745] ehci-orion: EHCI orion driver
[ 0.375145] ehci-exynos: EHCI Exynos driver
[ 0.375624] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.376067] ohci-pci: OHCI PCI platform driver
[ 0.376646] ohci-platform: OHCI generic platform driver
[ 0.377487] ohci-exynos: OHCI Exynos driver
[ 0.379138] usbcore: registered new interface driver usb-storage
[ 0.385466] i2c_dev: i2c /dev entries driver
[ 0.395646] sdhci: Secure Digital Host Controller Interface driver
[ 0.395752] sdhci: Copyright(c) Pierre Ossman
[ 0.397608] Synopsys Designware Multimedia Card Interface Driver
[ 0.398655] Freeing initrd memory: 30104K
[ 0.399486] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.399573] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 0.403594] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.404832] efifb: probing for efifb
[ 0.405012] efifb: framebuffer at 0x7f807000, using 8100k, total 8100k
[ 0.405371] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.406070] efifb: scrolling: redraw
[ 0.406511] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.432396] Console: switching to colour frame buffer device 240x67
[ 0.432905] meson-gx-mmc d0074000.mmc: no support for card's volts
[ 0.432914] mmc0: error -22 whilst initialising SDIO card
[ 0.457592] fb0: EFI VGA frame buffer device
[ 0.458728] meson-sm: secure-monitor enabled
[ 0.460363] usbcore: registered new interface driver usbhid
[ 0.460587] usbhid: USB HID core driver
[ 0.462294] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 0.470999] NET: Registered PF_PACKET protocol family
[ 0.471293] 9pnet: Installing 9P2000 support
[ 0.471576] Key type dns_resolver registered
[ 0.472443] Loading compiled-in X.509 certificates
[ 0.492532] dwc3-meson-g12a d0078080.usb: USB2 ports: 2
[ 0.492689] dwc3-meson-g12a d0078080.usb: USB3 ports: 0
[ 1.024532] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 1.025019] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 1.025940] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 1.029602] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.029779] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1.030822] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010
[ 1.031785] xhci-hcd xhci-hcd.0.auto: irq 48, io mem 0xc9000000
[ 1.033109] hub 1-0:1.0: USB hub found
[ 1.033244] hub 1-0:1.0: 2 ports detected
[ 1.033775] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1.034116] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 1.035053] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 1.035814] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.037329] hub 2-0:1.0: USB hub found
[ 1.037458] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 1.042861] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware
[ 1.043366] meson-gx-mmc d0072000.mmc: Got CD GPIO
domain-0 init dvfs: 4
[ 1.057445] ALSA device list:
[ 1.057542] No soundcards found.
[ 1.073033] Freeing unused kernel memory: 6208K
[ 1.073313] Run /init as init process
[ 1.073424] with arguments:
[ 1.073750] /init
[ 1.074051] with environment:
[ 1.079519] HOME=/
[ 1.084566] TERM=linux
[ 1.089215] BOOT_IMAGE=/boot/vmlinuz-5.15.55-00365-g4aa6e752aa31
Loading, please wait...

  • '[' -z ]
  • BOOT=local
  • '[' -n ]
  • '[' '=' none ]
  • resume=
  • mount -t tmpfs -o 'nodev,noexec,nosuid,size=10%,mode=0755' tmpfs[ 1.129254] mmc1: new high speed SDHC card at address aaaa
    /run
  • mkdir -m 0700 /run/initramfs
  • '[' -n ]
  • maybe_break top
  • run_scripts /scripts/init-top
  • initdir=/scripts/init-top
  • '[' '!' -d /scripts/init-top ]
  • shift
  • . /scripts/init-top/ORDER
  • /s[ 1.135700] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
    cripts/init-top/all_generic_ide
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/blacklist
  • '[' -e /conf/param.conf ]
    [ 1.147379] mmcblk1: p1 p2
  • /scripts/init-top/udev
    Starting version 249.11-0ubuntu3.4
    [ 1.286510] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [ 1.485588] hub 1-1:1.0: USB hub found
    [ 1.490443] hub 1-1:1.0: 4 ports detected
    [ 1.743474] lima d00c0000.gpu: gp - mali450 version major 0 minor 0
    [ 1.747904] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0
    [ 1.752289] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0
    [ 1.752950] meson-drm d0100000.vpu: Queued 3 outputs on vpu
    [ 1.756578] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0
    [ 1.764953] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
    [ 1.769481] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus
    [ 1.778603] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
    [ 1.782987] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
    [ 1.787359] meson8b-dwmac c9410000.ethernet: PTP uses main clock
    [ 1.792575] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
    [ 1.797025] meson8b-dwmac c9410000.ethernet: DWMAC1000
    [ 1.801329] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
    [ 1.807085] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
    [ 1.815752] meson8b-dwmac c9410000.ethernet: COE Type 2
    [ 1.827321] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
    [ 1.827469] lima d00c0000.gpu: bus rate = 166666667
    [ 1.834798] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
    [ 1.835633] lima d00c0000.gpu: mod rate = 24000000
    [ 1.843870] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
    [ 1.846492] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
    [ 1.848460] checking generic (7f807000 7e9000) vs hw (0 ffffffffffffffff)
    [ 1.856955] fb0: switching to meson from EFI VGA
    [ 1.859118] meson8b-dwmac c9410000.ethernet: Normal descriptors
    [ 1.865335] meson8b-dwmac c9410000.ethernet: Ring mode enabled
    [ 1.869621] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    [ 1.872429] lima d00c0000.gpu: Failed to register cooling device
    [ 1.882005] Console: switching to colour dummy device 80x25
    [ 1.885960] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 0
    [ 1.914698] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
    [ 1.919101] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
    [ 1.920162] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
    [ 1.921225] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1
    [ 2.043684] [drm] kms: can't enable cloning when we probably wanted to.
    [ 2.063492] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:17EF:6047.0001/input/input0
    [ 2.123814] hid-generic 0003:17EF:6047.0001: input: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input0
    [ 2.132128] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input1
    [ 2.132801] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/2
    [ 2.191672] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input3
    [ 2.192249] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input4
    [ 2.193060] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/soc/d0078080.usb/c9000000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:17EF:6047.0002/input/input5
    [ 2.193407] hid-generic 0003:17EF:6047.0002: input: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-xhci-hcd.0.auto-1.1/input1
    [ 2.215499] Console: switching to colour frame buffer device 240x67
    [ 2.317686] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/framebuffer
  • '[' -e /conf/param.conf ]
  • /scripts/init-top/console_setup
  • '[' -e /conf/param.conf ]
  • maybe_break modules
  • '[' n '!=' y ]
  • log_begin_msg 'Loading essential drivers'
  • _log_msg 'Begin: %s ... ' 'Loading essential drivers'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Loading essential drivers'
    Begin: Loading essential drivers ... + return 0
  • '[' -n ]
  • load_modules
  • '[' -e /conf/modules ]
  • read -r m
  • '[' -z linear ]
  • printf '%.1s' linear
  • com=l
  • '[' l '=' '#' ]
  • modprobe linear
  • read -r m
  • '[' -z multipath ]
  • printf '%.1s' multipath
  • com=m
  • '[' m '=' '#' ]
  • modprobe multipath
  • read -r m
  • '[' -z raid0 ]
  • printf '%.1s' raid0
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid0
  • read -r m
  • '[' -z raid1 ]
  • printf '%.1s' raid1
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid1
  • read -r m
  • '[' -z raid456 ]
  • printf '%.1s' raid456
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid456
  • read -r m
  • '[' -z raid5 ]
  • printf '%.1s' raid5
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid5
  • read -r m
  • '[' -z raid6 ]
  • printf '%.1s' raid6
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid6
  • read -r m
  • '[' -z raid10 ]
  • printf '%.1s' raid10
  • com=r
  • '[' r '=' '#' ]
  • modprobe raid10
  • read -r m
  • '[' -z efivars ]
  • printf '%.1s' efivars
  • com=e
  • '[' e '=' '#' ]
  • modprobe efivars
  • read -r m
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • _uptime
  • local uptime
  • cat /proc/uptime
  • uptime='2.73 6.43'
  • uptime=2
  • echo 2
  • starttime=2
  • starttime=3
  • export starttime
  • maybe_break premount
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-premount'
    Begin: Running /scripts/init-premount ... + return 0
  • run_scripts /scripts/init-premount
  • initdir=/scripts/init-premount
  • '[' '!' -d /scripts/init-premount ]
  • shift
  • . /scripts/init-premount/ORDER
  • /scripts/init-premount/plymouth
  • '[' -e /conf/param.conf ]
  • /scripts/init-premount/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • maybe_break mount
  • log_begin_msg 'Mounting root file system'
  • _log_msg 'Begin: %s ... ' 'Mounting root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Mounting root file system'
    Begin: Mounting root file system ... + return 0
  • . /scripts/local
  • . /scripts/nfs
  • . /scripts/local
  • parse_numeric 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • return
  • maybe_break mountroot
  • mount_top
  • local_top
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-top'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-top'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-top'
    Begin: Running /scripts/local-top ... + return 0
  • run_scripts /scripts/local-top
  • initdir=/scripts/local-top
  • '[' '!' -d /scripts/local-top ]
  • shift
  • . /scripts/local-top/ORDER
  • /scripts/local-top/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/local-top/cryptroot
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_top_used=yes
  • mount_premount
  • local_premount
  • '[' '!=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-premount'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-premount'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-premount'
    Begin: Running /scripts/local-premount ... + return 0
  • run_scripts /scripts/local-premount
  • initdir=/scripts/local-premount
  • '[' '!' -d /scripts/local-premount ]
  • shift
  • . /scripts/local-premount/ORDER
  • /scripts/local-premount/btrfs
    [ 2.906461] raid6: neonx8 gen() 1900 MB/s
    [ 2.974422] raid6: neonx8 xor() 1696 MB/s
    [ 3.042426] raid6: neonx4 gen() 2647 MB/s
    [ 3.110424] raid6: neonx4 xor() 1894 MB/s
    [ 3.178425] raid6: neonx2 gen() 2586 MB/s
    [ 3.246420] raid6: neonx2 xor() 1764 MB/s
    [ 3.314427] raid6: neonx1 gen() 2000 MB/s
    [ 3.382424] raid6: neonx1 xor() 1432 MB/s
    [ 3.450421] raid6: int64x8 gen() 1434 MB/s
    [ 3.518420] raid6: int64x8 xor() 888 MB/s
    [ 3.586433] raid6: int64x4 gen() 1998 MB/s
    [ 3.654421] raid6: int64x4 xor() 1000 MB/s
    [ 3.722419] raid6: int64x2 gen() 1671 MB/s
    [ 3.790429] raid6: int64x2 xor() 893 MB/s
    [ 3.858449] raid6: int64x1 gen() 1247 MB/s
    [ 3.926440] raid6: int64x1 xor() 537 MB/s
    [ 3.927508] raid6: using algorithm neonx4 gen() 2647 MB/s
    [ 3.928871] raid6: .... xor() 1894 MB/s, rmw enabled
    [ 3.930122] raid6: using neon recovery algorithm
    [ 3.942648] xor: measuring software checksum speed
    [ 3.946307] 8regs : 2793 MB/sec
    [ 3.949305] 32regs : 3434 MB/sec
    [ 3.952838] arm64_neon : 2931 MB/sec
    [ 3.952938] xor: using function: 32regs (3434 MB/sec)
    [ 3.976438] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
    Scanning for Btrfs filesystems
    [ 4.139950] BTRFS: device label writable devid 1 transid 758 /dev/mmcblk1p2 scanned by btrfs (245)
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/fixrtc
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/ntfs_3g
  • '[' -e /conf/param.conf ]
  • /scripts/local-premount/resume
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=yes
  • mountroot
  • local_mount_root
  • local_top
  • '[' yes '!=' yes ]
  • local_top_used=yes
  • '[' -z 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • local_device_setup 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 'root file system'
  • local 'dev_id=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'name=root file system'
  • local 'may_panic=true'
  • local real_dev
  • local time_elapsed
  • local count
  • local 'slumber=30'
  • slumber=30
  • '[' 0 -gt 30 ]
  • wait-for-root 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' 30
  • FSTYPE=btrfs
  • '[' -n ]
  • '[' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • '[' f576022f-9541-4435-adde-dc39f8ea1fa4 '=' 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' ]
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • resolve_device 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • DEV='UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • local 'orig=UUID=f576022f-9541-4435-adde-dc39f8ea1fa4'
  • blkid -l -t 'UUID=f576022f-9541-4435-adde-dc39f8ea1fa4' -o device
  • DEV=/dev/mmcblk1p2
  • '[' -e /dev/mmcblk1p2 ]
  • echo /dev/mmcblk1p2
  • real_dev=/dev/mmcblk1p2
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • DEV=/dev/mmcblk1p2
  • ROOT=/dev/mmcblk1p2
  • '[' -z ]
  • get_fstype /dev/mmcblk1p2
  • local FS FSTYPE
  • FS=/dev/mmcblk1p2
  • blkid -o value -s TYPE /dev/mmcblk1p2
  • FSTYPE=btrfs
  • echo btrfs
  • return 0
  • FSTYPE=btrfs
  • local_premount
  • '[' yes '!=' yes ]
  • local_premount_used=yes
  • '[' y '=' y ]
  • '[' -z ]
  • roflag=-r
  • checkfs /dev/mmcblk1p2 root btrfs
  • _checkfs_once /dev/mmcblk1p2 root btrfs
  • DEV=/dev/mmcblk1p2
  • NAME=root
  • TYPE=btrfs
  • '[' root '=' / ]
  • FSCK_LOGFILE=/run/initramfs/fsck.log
  • FSCK_STAMPFILE=/run/initramfs/fsck-root
  • '[' btrfs '=' auto ]
  • FSCKCODE=0
  • '[' -z btrfs ]
  • command -v fsck
  • '[' n '=' y ]
  • '[' n '=' y ]
  • force=
  • '[' '=' y ]
  • '[' '=' n ]
  • fix=-a
  • spinner=
  • '[' -z y ]
  • '[' n '=' n ]
  • log_begin_msg 'Will now check root file system'
  • _log_msg 'Begin: %s ... ' 'Will now check root file system'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Will now check root file system'
    Begin: Will now check root file system ... + return 0
  • logsave -a -s /run/initramfs/fsck.log fsck -a -V -t btrfs /dev/mmcblk1p2
    fsck from util-linux 2.37.2
    [/usr/sbin/fsck.btrfs (1) -- /dev/mmcblk1p2] fsck.btrfs -a /dev/mmcblk1p2
  • FSCKCODE=0
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • '[' 0 -eq 32 ]
  • '[' 0 -eq 4 ]
  • '[' 0 -gt 1 ]
  • true
  • return 0
  • mount -r -t btrfs /dev/mmcblk1p2 /root
    [ 4.302668] BTRFS info (device mmcblk1p2): flagging fs with big metadata feature
    [ 4.303095] BTRFS info (device mmcblk1p2): disk space caching is enabled
    [ 4.303829] BTRFS info (device mmcblk1p2): has skinny extents
    [ 4.325631] BTRFS info (device mmcblk1p2): enabling ssd optimizations
  • mountroot_status=0
  • '[' ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • read_fstab_entry /usr
  • found=1
  • '[' -f /root/etc/fstab ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' / '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • '[' /boot/firmware '=' /usr ]
  • read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK
  • return 1
  • mount_bottom
  • local_bottom
  • '[' yes '=' yes ]
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/local-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/local-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/local-bottom'
    Begin: Running /scripts/local-bottom ... + return 0
  • run_scripts /scripts/local-bottom
  • initdir=/scripts/local-bottom
  • '[' '!' -d /scripts/local-bottom ]
  • shift
  • . /scripts/local-bottom/ORDER
  • /scripts/local-bottom/cryptgnupg-sc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptopensc
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/cryptroot
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/iscsi
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/mdadm
  • '[' -e /conf/param.conf ]
  • /scripts/local-bottom/ntfs_3g
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • local_premount_used=no
  • local_top_used=no
  • nfs_bottom
  • '[' '=' yes ]
  • '[' '=' yes ]
  • nfs_premount_used=no
  • nfs_top_used=no
  • local_bottom
  • '[' no '=' yes ]
  • '[' no '=' yes ]
  • local_premount_used=no
  • local_top_used=no
  • maybe_break bottom
  • '[' n '!=' y ]
  • log_begin_msg 'Running /scripts/init-bottom'
  • _log_msg 'Begin: %s ... ' 'Running /scripts/init-bottom'
  • '[' n '=' y ]
  • printf 'Begin: %s ... ' 'Running /scripts/init-bottom'
    Begin: Running /scripts/init-bottom ... + return 0
  • run_scripts /scripts/init-bottom
  • initdir=/scripts/init-bottom
  • '[' '!' -d /scripts/init-bottom ]
  • shift
  • . /scripts/init-bottom/ORDER
  • /scripts/init-bottom/cloud-initramfs-dyn-netconf
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/lvm2
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/overlayroot
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/udev
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/copymods
  • '[' -e /conf/param.conf ]
  • /scripts/init-bottom/plymouth
  • '[' -e /conf/param.conf ]
  • '[' n '!=' y ]
  • log_end_msg
  • _log_msg 'done.\n'
  • '[' n '=' y ]
  • printf 'done.\n'
    done.
  • return 0
  • mount -n -o move /run /root/run
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • validate_init /sbin/init
  • run-init -n /root /sbin/init
  • maybe_break init
  • unset debug
  • unset MODPROBE_OPTIONS
  • unset DPKG_ARCH
  • unset ROOTFLAGS
  • unset ROOTFSTYPE
  • unset ROOTDELAY
  • unset ROOT
  • unset IP
  • unset IP6
  • unset VLAN
  • unset BOOT
  • unset BOOTIF
  • unset DEVICE
  • unset UBIMTD
  • unset blacklist
  • unset break
  • unset noresume
  • unset panic
  • unset quiet
  • unset readonly
  • unset resume
  • unset resume_offset
  • unset noresume
  • unset fastboot
  • unset forcefsck
  • unset fsckfix
  • unset starttime
  • mount -n -o move /sys /root/sys
  • mount -n -o move /proc /root/proc
  • exec run-init /root /sbin/init
    [ 12.105999] [drm] kms: can't enable cloning when we probably wanted to.
    [ 25.658415] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 25.658595] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 25.664438] (detected by 2, t=5253 jiffies, g=-243, q=239)
    [ 25.669675] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 25.675482] Call trace:
    [ 25.680694] dump_backtrace+0x0/0x1c0
    [ 25.685906] show_stack+0x18/0x68
    [ 25.691075] sched_show_task+0x154/0x198
    [ 25.696210] rcu_sched_clock_irq+0xbec/0xd78
    [ 25.701313] update_process_times+0x9c/0xd0
    [ 25.706371] tick_sched_handle.isra.19+0x34/0x58
    [ 25.711416] tick_sched_timer+0x4c/0xa8
    [ 25.716455] __hrtimer_run_queues+0x120/0x1b8
    [ 25.721505] hrtimer_interrupt+0xd8/0x238
    [ 25.726510] arch_timer_handler_phys+0x2c/0x50
    [ 25.731499] handle_percpu_devid_irq+0x84/0x138
    [ 25.736445] handle_domain_irq+0x5c/0x90
    [ 25.741329] gic_handle_irq+0xb0/0xd0
    [ 25.746151] call_on_irq_stack+0x28/0x50
    [ 25.750915] do_interrupt_handler+0x58/0x60
    [ 25.755632] el1_interrupt+0x30/0x78
    [ 25.760286] el1h_64_irq_handler+0x18/0x28
    [ 25.764890] el1h_64_irq+0x74/0x78
    [ 25.769416] xas_load+0x24/0xa8
    [ 25.773880] xas_find+0x190/0x1d8
    [ 25.778287] find_lock_entries+0x7c/0x330
    [ 25.782511] truncate_inode_pages_range+0xb8/0x6c8
    [ 25.786564] truncate_inode_pages_final+0x68/0x78
    [ 25.790383] evict+0x144/0x150
    [ 25.794048] iput+0x134/0x1b8
    [ 25.797557] do_unlinkat+0x17c/0x2a8
    [ 25.801105] __arm64_sys_unlinkat+0x40/0x88
    [ 25.804705] invoke_syscall+0x44/0x100
    [ 25.808113] el0_svc_common.constprop.3+0x6c/0xf0
    [ 25.811401] do_el0_svc+0x24/0x88
    [ 25.814629] el0_svc+0x20/0x60
    [ 25.817793] el0t_64_sync_handler+0x90/0xb8
    [ 25.821003] el0t_64_sync+0x180/0x184
    [ 31.710453] VDDIO_BOOT: disabling
    [ 88.746416] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 88.749846] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 88.753300] (detected by 2, t=21025 jiffies, g=-243, q=239)
    [ 88.756733] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 88.760811] Call trace:
    [ 88.764352] dump_backtrace+0x0/0x1c0
    [ 88.767947] show_stack+0x18/0x68
    [ 88.771547] sched_show_task+0x154/0x198
    [ 88.775181] rcu_sched_clock_irq+0xbec/0xd78
    [ 88.778845] update_process_times+0x9c/0xd0
    [ 88.782530] tick_sched_handle.isra.19+0x34/0x58
    [ 88.786257] tick_sched_timer+0x4c/0xa8
    [ 88.789989] __hrtimer_run_queues+0x120/0x1b8
    [ 88.793724] hrtimer_interrupt+0xd8/0x238
    [ 88.797447] arch_timer_handler_phys+0x2c/0x50
    [ 88.801180] handle_percpu_devid_irq+0x84/0x138
    [ 88.804899] handle_domain_irq+0x5c/0x90
    [ 88.808595] gic_handle_irq+0xb0/0xd0
    [ 88.812307] call_on_irq_stack+0x28/0x50
    [ 88.816036] do_interrupt_handler+0x58/0x60
    [ 88.819763] el1_interrupt+0x30/0x78
    [ 88.823445] el1h_64_irq_handler+0x18/0x28
    [ 88.827063] el1h_64_irq+0x74/0x78
    [ 88.830587] xas_load+0x40/0xa8
    [ 88.834089] xas_find+0x190/0x1d8
    [ 88.837577] find_lock_entries+0x7c/0x330
    [ 88.841080] truncate_inode_pages_range+0xb8/0x6c8
    [ 88.844566] truncate_inode_pages_final+0x68/0x78
    [ 88.847986] evict+0x144/0x150
    [ 88.851364] iput+0x134/0x1b8
    [ 88.854693] do_unlinkat+0x17c/0x2a8
    [ 88.857958] __arm64_sys_unlinkat+0x40/0x88
    [ 88.861182] invoke_syscall+0x44/0x100
    [ 88.864408] el0_svc_common.constprop.3+0x6c/0xf0
    [ 88.867668] do_el0_svc+0x24/0x88
    [ 88.870914] el0_svc+0x20/0x60
    [ 88.874142] el0t_64_sync_handler+0x90/0xb8
    [ 88.877390] el0t_64_sync+0x180/0x184
    [ 151.778415] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 151.781821] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 151.785214] (detected by 2, t=36783 jiffies, g=-243, q=239)
    [ 151.788559] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 151.792515] Call trace:
    [ 151.795912] dump_backtrace+0x0/0x1c0
    [ 151.799342] show_stack+0x18/0x68
    [ 151.802753] sched_show_task+0x154/0x198
    [ 151.806177] rcu_sched_clock_irq+0xbec/0xd78
    [ 151.809606] update_process_times+0x9c/0xd0
    [ 151.813028] tick_sched_handle.isra.19+0x34/0x58
    [ 151.816469] tick_sched_timer+0x4c/0xa8
    [ 151.819902] __hrtimer_run_queues+0x120/0x1b8
    [ 151.823358] hrtimer_interrupt+0xd8/0x238
    [ 151.826832] arch_timer_handler_phys+0x2c/0x50
    [ 151.830321] handle_percpu_devid_irq+0x84/0x138
    [ 151.833799] handle_domain_irq+0x5c/0x90
    [ 151.837288] gic_handle_irq+0xb0/0xd0
    [ 151.840759] call_on_irq_stack+0x28/0x50
    [ 151.844246] do_interrupt_handler+0x58/0x60
    [ 151.847745] el1_interrupt+0x30/0x78
    [ 151.851229] el1h_64_irq_handler+0x18/0x28
    [ 151.854722] el1h_64_irq+0x74/0x78
    [ 151.858177] xas_load+0x5c/0xa8
    [ 151.861608] xas_find+0x190/0x1d8
    [ 151.865034] find_lock_entries+0x7c/0x330
    [ 151.868476] truncate_inode_pages_range+0xb8/0x6c8
    [ 151.871955] truncate_inode_pages_final+0x68/0x78
    [ 151.875409] evict+0x144/0x150
    [ 151.878812] iput+0x134/0x1b8
    [ 151.882175] do_unlinkat+0x17c/0x2a8
    [ 151.885511] __arm64_sys_unlinkat+0x40/0x88
    [ 151.888791] invoke_syscall+0x44/0x100
    [ 151.892012] el0_svc_common.constprop.3+0x6c/0xf0
    [ 151.895267] do_el0_svc+0x24/0x88
    [ 151.898512] el0_svc+0x20/0x60
    [ 151.901748] el0t_64_sync_handler+0x90/0xb8
    [ 151.905002] el0t_64_sync+0x180/0x184
    [ 214.810414] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 214.813818] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P1
    [ 214.817222] (detected by 2, t=52540 jiffies, g=-243, q=239)
    [ 214.820580] task:run-init state:R running task stack: 0 pid: 1 ppid: 0 flags:0x00000004
    [ 214.824547] Call trace:
    [ 214.827950] dump_backtrace+0x0/0x1c0
    [ 214.831384] show_stack+0x18/0x68
    [ 214.834797] sched_show_task+0x154/0x198
    [ 214.838225] rcu_sched_clock_irq+0xbec/0xd78
    [ 214.841662] update_process_times+0x9c/0xd0
    [ 214.845093] tick_sched_handle.isra.19+0x34/0x58
    [ 214.848538] tick_sched_timer+0x4c/0xa8
    [ 214.851964] __hrtimer_run_queues+0x120/0x1b8
    [ 214.855417] hrtimer_interrupt+0xd8/0x238
    [ 214.858879] arch_timer_handler_phys+0x2c/0x50
    [ 214.862375] handle_percpu_devid_irq+0x84/0x138
    [ 214.865871] handle_domain_irq+0x5c/0x90
    [ 214.869343] gic_handle_irq+0xb0/0xd0
    [ 214.872830] call_on_irq_stack+0x28/0x50
    [ 214.876309] do_interrupt_handler+0x58/0x60
    [ 214.879807] el1_interrupt+0x30/0x78
    [ 214.883302] el1h_64_irq_handler+0x18/0x28
    [ 214.886802] el1h_64_irq+0x74/0x78
    [ 214.890268] xas_load+0x60/0xa8
    [ 214.893713] xas_find+0x190/0x1d8
    [ 214.897131] find_lock_entries+0x7c/0x330
    [ 214.900574] truncate_inode_pages_range+0xb8/0x6c8
    [ 214.904044] truncate_inode_pages_final+0x68/0x78
    [ 214.907499] evict+0x144/0x150
    [ 214.910901] iput+0x134/0x1b8
    [ 214.914262] do_unlinkat+0x17c/0x2a8
    [ 214.917596] __arm64_sys_unlinkat+0x40/0x88
    [ 214.920873] invoke_syscall+0x44/0x100
    [ 214.924095] el0_svc_common.constprop.3+0x6c/0xf0
    [ 214.927351] do_el0_svc+0x24/0x88
    [ 214.930596] el0_svc+0x20/0x60
    [ 214.933830] el0t_64_sync_handler+0x90/0xb8
    [ 214.937081] el0t_64_sync+0x180/0x184

dsx724 pushed a commit that referenced this issue Jul 23, 2022
…tion

Each cset (css_set) is pinned by its tasks. When we're moving tasks around
across csets for a migration, we need to hold the source and destination
csets to ensure that they don't go away while we're moving tasks about. This
is done by linking cset->mg_preload_node on either the
mgctx->preloaded_src_csets or mgctx->preloaded_dst_csets list. Using the
same cset->mg_preload_node for both the src and dst lists was deemed okay as
a cset can't be both the source and destination at the same time.

Unfortunately, this overloading becomes problematic when multiple tasks are
involved in a migration and some of them are identity noop migrations while
others are actually moving across cgroups. For example, this can happen with
the following sequence on cgroup1:

 #1> mkdir -p /sys/fs/cgroup/misc/a/b
 #2> echo $$ > /sys/fs/cgroup/misc/a/cgroup.procs
 #3> RUN_A_COMMAND_WHICH_CREATES_MULTIPLE_THREADS &
 #4> PID=$!
 #5> echo $PID > /sys/fs/cgroup/misc/a/b/tasks
 #6> echo $PID > /sys/fs/cgroup/misc/a/cgroup.procs

the process including the group leader back into a. In this final migration,
non-leader threads would be doing identity migration while the group leader
is doing an actual one.

After #3, let's say the whole process was in cset A, and that after #4, the
leader moves to cset B. Then, during #6, the following happens:

 1. cgroup_migrate_add_src() is called on B for the leader.

 2. cgroup_migrate_add_src() is called on A for the other threads.

 3. cgroup_migrate_prepare_dst() is called. It scans the src list.

 4. It notices that B wants to migrate to A, so it tries to A to the dst
    list but realizes that its ->mg_preload_node is already busy.

 5. and then it notices A wants to migrate to A as it's an identity
    migration, it culls it by list_del_init()'ing its ->mg_preload_node and
    putting references accordingly.

 6. The rest of migration takes place with B on the src list but nothing on
    the dst list.

This means that A isn't held while migration is in progress. If all tasks
leave A before the migration finishes and the incoming task pins it, the
cset will be destroyed leading to use-after-free.

This is caused by overloading cset->mg_preload_node for both src and dst
preload lists. We wanted to exclude the cset from the src list but ended up
inadvertently excluding it from the dst list too.

This patch fixes the issue by separating out cset->mg_preload_node into
->mg_src_preload_node and ->mg_dst_preload_node, so that the src and dst
preloadings don't interfere with each other.

Signed-off-by: Tejun Heo <[email protected]>
Reported-by: Mukesh Ojha <[email protected]>
Reported-by: shisiyuan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Link: https://www.spinics.net/lists/cgroups/msg33313.html
Fixes: f817de9 ("cgroup: prepare migration path for unified hierarchy")
Cc: [email protected] # v3.16+
dsx724 pushed a commit that referenced this issue Jul 23, 2022
On powerpc, 'perf trace' is crashing with a SIGSEGV when trying to
process a perf.data file created with 'perf trace record -p':

  #0  0x00000001225b8988 in syscall_arg__scnprintf_augmented_string <snip> at builtin-trace.c:1492
  #1  syscall_arg__scnprintf_filename <snip> at builtin-trace.c:1492
  #2  syscall_arg__scnprintf_filename <snip> at builtin-trace.c:1486
  #3  0x00000001225bdd9c in syscall_arg_fmt__scnprintf_val <snip> at builtin-trace.c:1973
  #4  syscall__scnprintf_args <snip> at builtin-trace.c:2041
  #5  0x00000001225bff04 in trace__sys_enter <snip> at builtin-trace.c:2319

That points to the below code in tools/perf/builtin-trace.c:
	/*
	 * If this is raw_syscalls.sys_enter, then it always comes with the 6 possible
	 * arguments, even if the syscall being handled, say "openat", uses only 4 arguments
	 * this breaks syscall__augmented_args() check for augmented args, as we calculate
	 * syscall->args_size using each syscalls:sys_enter_NAME tracefs format file,
	 * so when handling, say the openat syscall, we end up getting 6 args for the
	 * raw_syscalls:sys_enter event, when we expected just 4, we end up mistakenly
	 * thinking that the extra 2 u64 args are the augmented filename, so just check
	 * here and avoid using augmented syscalls when the evsel is the raw_syscalls one.
	 */
	if (evsel != trace->syscalls.events.sys_enter)
		augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);

As the comment points out, we should not be trying to augment the args
for raw_syscalls. However, when processing a perf.data file, we are not
initializing those properly. Fix the same.

Reported-by: Claudio Carvalho <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
@dsx724
Copy link
Author

dsx724 commented Jul 26, 2022

I have logged some soft-error conditions here: http://log.libre.computer/manual/2022-07-25/log_error_soft

@dsx724 dsx724 changed the title amlogic: rcu: INFO: rcu_preempt detected stalls on CPUs/tasks amlogic eth mac cause crash and errors Jul 27, 2022
@dsx724 dsx724 changed the title amlogic eth mac cause crash and errors amlogic crashes and errors with 2GB boards on GXL (S905X S905D) Jul 30, 2022
@dsx724 dsx724 changed the title amlogic crashes and errors with 2GB boards on GXL (S905X S905D) amlogic crashes and errors with 2GB boards on GXL (S905X S905D) with ethernet plugged in Jul 30, 2022
@dsx724
Copy link
Author

dsx724 commented Aug 1, 2022

Updated first post.

@dsx724 dsx724 closed this as completed Aug 1, 2022
@dsx724 dsx724 reopened this Aug 1, 2022
@dsx724
Copy link
Author

dsx724 commented Aug 5, 2022

Preliminary results for disabling ethernet completely in u-boot and then initializing the PHY in Linux is promising. Currently testing the fix for long term viability.

@dsx724
Copy link
Author

dsx724 commented Aug 10, 2022

Closing this as an Linux bug. This is a u-boot bug.

@dsx724 dsx724 closed this as completed Aug 10, 2022
dsx724 pushed a commit that referenced this issue Aug 11, 2022
This was missed in c3ed222 ("NFSv4: Fix free of uninitialized
nfs4_label on referral lookup.") and causes a panic when mounting
with '-o trunkdiscovery':

PID: 1604   TASK: ffff93dac3520000  CPU: 3   COMMAND: "mount.nfs"
 #0 [ffffb79140f738f8] machine_kexec at ffffffffaec64bee
 #1 [ffffb79140f73950] __crash_kexec at ffffffffaeda67fd
 #2 [ffffb79140f73a18] crash_kexec at ffffffffaeda76ed
 #3 [ffffb79140f73a30] oops_end at ffffffffaec2658d
 #4 [ffffb79140f73a50] general_protection at ffffffffaf60111e
    [exception RIP: nfs_fattr_init+0x5]
    RIP: ffffffffc0c18265  RSP: ffffb79140f73b08  RFLAGS: 00010246
    RAX: 0000000000000000  RBX: ffff93dac304a800  RCX: 0000000000000000
    RDX: ffffb79140f73bb0  RSI: ffff93dadc8cbb40  RDI: d03ee11cfaf6bd50
    RBP: ffffb79140f73be8   R8: ffffffffc0691560   R9: 0000000000000006
    R10: ffff93db3ffd3df8  R11: 0000000000000000  R12: ffff93dac4040000
    R13: ffff93dac2848e00  R14: ffffb79140f73b60  R15: ffffb79140f73b30
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #5 [ffffb79140f73b08] _nfs41_proc_get_locations at ffffffffc0c73d53 [nfsv4]
 #6 [ffffb79140f73bf0] nfs4_proc_get_locations at ffffffffc0c83e90 [nfsv4]
 #7 [ffffb79140f73c60] nfs4_discover_trunking at ffffffffc0c83fb7 [nfsv4]
 #8 [ffffb79140f73cd8] nfs_probe_fsinfo at ffffffffc0c0f95f [nfs]
 #9 [ffffb79140f73da0] nfs_probe_server at ffffffffc0c1026a [nfs]
    RIP: 00007f6254fce26e  RSP: 00007ffc69496ac8  RFLAGS: 00000246
    RAX: ffffffffffffffda  RBX: 0000000000000000  RCX: 00007f6254fce26e
    RDX: 00005600220a82a0  RSI: 00005600220a64d0  RDI: 00005600220a6520
    RBP: 00007ffc69496c50   R8: 00005600220a8710   R9: 003035322e323231
    R10: 0000000000000000  R11: 0000000000000246  R12: 00007ffc69496c50
    R13: 00005600220a8440  R14: 0000000000000010  R15: 0000560020650ef9
    ORIG_RAX: 00000000000000a5  CS: 0033  SS: 002b

Fixes: c3ed222 ("NFSv4: Fix free of uninitialized nfs4_label on referral lookup.")
Signed-off-by: Scott Mayhew <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 17, 2022
commit 2b12993 upstream.

tl;dr: The Enhanced IBRS mitigation for Spectre v2 does not work as
documented for RET instructions after VM exits. Mitigate it with a new
one-entry RSB stuffing mechanism and a new LFENCE.

== Background ==

Indirect Branch Restricted Speculation (IBRS) was designed to help
mitigate Branch Target Injection and Speculative Store Bypass, i.e.
Spectre, attacks. IBRS prevents software run in less privileged modes
from affecting branch prediction in more privileged modes. IBRS requires
the MSR to be written on every privilege level change.

To overcome some of the performance issues of IBRS, Enhanced IBRS was
introduced.  eIBRS is an "always on" IBRS, in other words, just turn
it on once instead of writing the MSR on every privilege level change.
When eIBRS is enabled, more privileged modes should be protected from
less privileged modes, including protecting VMMs from guests.

== Problem ==

Here's a simplification of how guests are run on Linux' KVM:

void run_kvm_guest(void)
{
	// Prepare to run guest
	VMRESUME();
	// Clean up after guest runs
}

The execution flow for that would look something like this to the
processor:

1. Host-side: call run_kvm_guest()
2. Host-side: VMRESUME
3. Guest runs, does "CALL guest_function"
4. VM exit, host runs again
5. Host might make some "cleanup" function calls
6. Host-side: RET from run_kvm_guest()

Now, when back on the host, there are a couple of possible scenarios of
post-guest activity the host needs to do before executing host code:

* on pre-eIBRS hardware (legacy IBRS, or nothing at all), the RSB is not
touched and Linux has to do a 32-entry stuffing.

* on eIBRS hardware, VM exit with IBRS enabled, or restoring the host
IBRS=1 shortly after VM exit, has a documented side effect of flushing
the RSB except in this PBRSB situation where the software needs to stuff
the last RSB entry "by hand".

IOW, with eIBRS supported, host RET instructions should no longer be
influenced by guest behavior after the host retires a single CALL
instruction.

However, if the RET instructions are "unbalanced" with CALLs after a VM
exit as is the RET in #6, it might speculatively use the address for the
instruction after the CALL in #3 as an RSB prediction. This is a problem
since the (untrusted) guest controls this address.

Balanced CALL/RET instruction pairs such as in step #5 are not affected.

== Solution ==

The PBRSB issue affects a wide variety of Intel processors which
support eIBRS. But not all of them need mitigation. Today,
X86_FEATURE_RSB_VMEXIT triggers an RSB filling sequence that mitigates
PBRSB. Systems setting RSB_VMEXIT need no further mitigation - i.e.,
eIBRS systems which enable legacy IBRS explicitly.

However, such systems (X86_FEATURE_IBRS_ENHANCED) do not set RSB_VMEXIT
and most of them need a new mitigation.

Therefore, introduce a new feature flag X86_FEATURE_RSB_VMEXIT_LITE
which triggers a lighter-weight PBRSB mitigation versus RSB_VMEXIT.

The lighter-weight mitigation performs a CALL instruction which is
immediately followed by a speculative execution barrier (INT3). This
steers speculative execution to the barrier -- just like a retpoline
-- which ensures that speculation can never reach an unbalanced RET.
Then, ensure this CALL is retired before continuing execution with an
LFENCE.

In other words, the window of exposure is opened at VM exit where RET
behavior is troublesome. While the window is open, force RSB predictions
sampling for RET targets to a dead end at the INT3. Close the window
with the LFENCE.

There is a subset of eIBRS systems which are not vulnerable to PBRSB.
Add these systems to the cpu_vuln_whitelist[] as NO_EIBRS_PBRSB.
Future systems that aren't vulnerable will set ARCH_CAP_PBRSB_NO.

  [ bp: Massage, incorporate review comments from Andy Cooper. ]

Signed-off-by: Daniel Sneddon <[email protected]>
Co-developed-by: Pawan Gupta <[email protected]>
Signed-off-by: Pawan Gupta <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 25, 2022
commit 2b12993 upstream.

tl;dr: The Enhanced IBRS mitigation for Spectre v2 does not work as
documented for RET instructions after VM exits. Mitigate it with a new
one-entry RSB stuffing mechanism and a new LFENCE.

== Background ==

Indirect Branch Restricted Speculation (IBRS) was designed to help
mitigate Branch Target Injection and Speculative Store Bypass, i.e.
Spectre, attacks. IBRS prevents software run in less privileged modes
from affecting branch prediction in more privileged modes. IBRS requires
the MSR to be written on every privilege level change.

To overcome some of the performance issues of IBRS, Enhanced IBRS was
introduced.  eIBRS is an "always on" IBRS, in other words, just turn
it on once instead of writing the MSR on every privilege level change.
When eIBRS is enabled, more privileged modes should be protected from
less privileged modes, including protecting VMMs from guests.

== Problem ==

Here's a simplification of how guests are run on Linux' KVM:

void run_kvm_guest(void)
{
	// Prepare to run guest
	VMRESUME();
	// Clean up after guest runs
}

The execution flow for that would look something like this to the
processor:

1. Host-side: call run_kvm_guest()
2. Host-side: VMRESUME
3. Guest runs, does "CALL guest_function"
4. VM exit, host runs again
5. Host might make some "cleanup" function calls
6. Host-side: RET from run_kvm_guest()

Now, when back on the host, there are a couple of possible scenarios of
post-guest activity the host needs to do before executing host code:

* on pre-eIBRS hardware (legacy IBRS, or nothing at all), the RSB is not
touched and Linux has to do a 32-entry stuffing.

* on eIBRS hardware, VM exit with IBRS enabled, or restoring the host
IBRS=1 shortly after VM exit, has a documented side effect of flushing
the RSB except in this PBRSB situation where the software needs to stuff
the last RSB entry "by hand".

IOW, with eIBRS supported, host RET instructions should no longer be
influenced by guest behavior after the host retires a single CALL
instruction.

However, if the RET instructions are "unbalanced" with CALLs after a VM
exit as is the RET in #6, it might speculatively use the address for the
instruction after the CALL in #3 as an RSB prediction. This is a problem
since the (untrusted) guest controls this address.

Balanced CALL/RET instruction pairs such as in step #5 are not affected.

== Solution ==

The PBRSB issue affects a wide variety of Intel processors which
support eIBRS. But not all of them need mitigation. Today,
X86_FEATURE_RSB_VMEXIT triggers an RSB filling sequence that mitigates
PBRSB. Systems setting RSB_VMEXIT need no further mitigation - i.e.,
eIBRS systems which enable legacy IBRS explicitly.

However, such systems (X86_FEATURE_IBRS_ENHANCED) do not set RSB_VMEXIT
and most of them need a new mitigation.

Therefore, introduce a new feature flag X86_FEATURE_RSB_VMEXIT_LITE
which triggers a lighter-weight PBRSB mitigation versus RSB_VMEXIT.

The lighter-weight mitigation performs a CALL instruction which is
immediately followed by a speculative execution barrier (INT3). This
steers speculative execution to the barrier -- just like a retpoline
-- which ensures that speculation can never reach an unbalanced RET.
Then, ensure this CALL is retired before continuing execution with an
LFENCE.

In other words, the window of exposure is opened at VM exit where RET
behavior is troublesome. While the window is open, force RSB predictions
sampling for RET targets to a dead end at the INT3. Close the window
with the LFENCE.

There is a subset of eIBRS systems which are not vulnerable to PBRSB.
Add these systems to the cpu_vuln_whitelist[] as NO_EIBRS_PBRSB.
Future systems that aren't vulnerable will set ARCH_CAP_PBRSB_NO.

  [ bp: Massage, incorporate review comments from Andy Cooper. ]

Signed-off-by: Daniel Sneddon <[email protected]>
Co-developed-by: Pawan Gupta <[email protected]>
Signed-off-by: Pawan Gupta <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 25, 2022
commit 59c026c upstream.

When use 'echo c > /proc/sysrq-trigger' to trigger kdump, riscv_crash_save_regs()
will be called to save regs for vmcore, we found "epc" value 00ffffffa5537400
is not a valid kernel virtual address, but is a user virtual address. Other
regs(eg, ra, sp, gp...) are correct kernel virtual address.
Actually 0x00ffffffb0dd9400 is the user mode PC of 'PID: 113 Comm: sh', which
is saved in the task's stack.

[   21.201701] CPU: 0 PID: 113 Comm: sh Kdump: loaded Not tainted 5.18.9 #45
[   21.201979] Hardware name: riscv-virtio,qemu (DT)
[   21.202160] epc : 00ffffffa5537400 ra : ffffffff80088640 sp : ff20000010333b90
[   21.202435]  gp : ffffffff810dde38 tp : ff6000000226c200 t0 : ffffffff8032be7c
[   21.202707]  t1 : 0720072007200720 t2 : 30203a7375746174 s0 : ff20000010333cf0
[   21.202973]  s1 : 0000000000000000 a0 : ff20000010333b98 a1 : 0000000000000001
[   21.203243]  a2 : 0000000000000010 a3 : 0000000000000000 a4 : 28c8f0aeffea4e00
[   21.203519]  a5 : 28c8f0aeffea4e00 a6 : 0000000000000009 a7 : ffffffff8035c9b8
[   21.203794]  s2 : ffffffff810df0a8 s3 : ffffffff810df718 s4 : ff20000010333b98
[   21.204062]  s5 : 0000000000000000 s6 : 0000000000000007 s7 : ffffffff80c4a468
[   21.204331]  s8 : 00ffffffef451410 s9 : 0000000000000007 s10: 00aaaaaac0510700
[   21.204606]  s11: 0000000000000001 t3 : ff60000001218f00 t4 : ff60000001218f00
[   21.204876]  t5 : ff60000001218000 t6 : ff200000103338b8
[   21.205079] status: 0000000200000020 badaddr: 0000000000000000 cause: 0000000000000008

With the incorrect PC, the backtrace showed by crash tool as below, the first
stack frame is abnormal,

crash> bt
PID: 113      TASK: ff60000002269600  CPU: 0    COMMAND: "sh"
 #0 [ff2000001039bb90] __efistub_.Ldebug_info0 at 00ffffffa5537400 <-- Abnormal
 #1 [ff2000001039bcf0] panic at ffffffff806578ba
 #2 [ff2000001039bd50] sysrq_reset_seq_param_set at ffffffff8038c030
 #3 [ff2000001039bda0] __handle_sysrq at ffffffff8038c5f8
 #4 [ff2000001039be00] write_sysrq_trigger at ffffffff8038cad8
 #5 [ff2000001039be20] proc_reg_write at ffffffff801b7edc
 #6 [ff2000001039be40] vfs_write at ffffffff80152ba6
 #7 [ff2000001039be80] ksys_write at ffffffff80152ece
 #8 [ff2000001039bed0] sys_write at ffffffff80152f46

With the patch, we can get current kernel mode PC, the output as below,

[   17.607658] CPU: 0 PID: 113 Comm: sh Kdump: loaded Not tainted 5.18.9 #42
[   17.607937] Hardware name: riscv-virtio,qemu (DT)
[   17.608150] epc : ffffffff800078f8 ra : ffffffff8008862c sp : ff20000010333b90
[   17.608441]  gp : ffffffff810dde38 tp : ff6000000226c200 t0 : ffffffff8032be68
[   17.608741]  t1 : 0720072007200720 t2 : 666666666666663c s0 : ff20000010333cf0
[   17.609025]  s1 : 0000000000000000 a0 : ff20000010333b98 a1 : 0000000000000001
[   17.609320]  a2 : 0000000000000010 a3 : 0000000000000000 a4 : 0000000000000000
[   17.609601]  a5 : ff60000001c78000 a6 : 000000000000003c a7 : ffffffff8035c9a4
[   17.609894]  s2 : ffffffff810df0a8 s3 : ffffffff810df718 s4 : ff20000010333b98
[   17.610186]  s5 : 0000000000000000 s6 : 0000000000000007 s7 : ffffffff80c4a468
[   17.610469]  s8 : 00ffffffca281410 s9 : 0000000000000007 s10: 00aaaaaab5bb6700
[   17.610755]  s11: 0000000000000001 t3 : ff60000001218f00 t4 : ff60000001218f00
[   17.611041]  t5 : ff60000001218000 t6 : ff20000010333988
[   17.611255] status: 0000000200000020 badaddr: 0000000000000000 cause: 0000000000000008

With the correct PC, the backtrace showed by crash tool as below,

crash> bt
PID: 113      TASK: ff6000000226c200  CPU: 0    COMMAND: "sh"
 #0 [ff20000010333b90] riscv_crash_save_regs at ffffffff800078f8 <--- Normal
 #1 [ff20000010333cf0] panic at ffffffff806578c6
 #2 [ff20000010333d50] sysrq_reset_seq_param_set at ffffffff8038c03c
 #3 [ff20000010333da0] __handle_sysrq at ffffffff8038c604
 #4 [ff20000010333e00] write_sysrq_trigger at ffffffff8038cae4
 #5 [ff20000010333e20] proc_reg_write at ffffffff801b7ee8
 #6 [ff20000010333e40] vfs_write at ffffffff80152bb2
 #7 [ff20000010333e80] ksys_write at ffffffff80152eda
 #8 [ff20000010333ed0] sys_write at ffffffff80152f52

Fixes: e53d281 ("RISC-V: Add kdump support")
Co-developed-by: Guo Ren <[email protected]>
Signed-off-by: Xianting Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 25, 2022
This reverts commit 07313a2.

Commit 0c24e06 ("mm: kmemleak: add rbtree and store physical
address for objects allocated with PA") is not yet in 5.19 (but appears
in 6.0). Without 0c24e06, kmemleak still stores phys objects
and non-phys objects in the same tree, and ignoring (instead of freeing)
will cause insertions into the kmemleak object tree by the slab
post-alloc hook to conflict with the pool object (see comment).

Reports such as the following would appear on boot, and effectively
disable kmemleak:

 | kmemleak: Cannot insert 0xffffff806e24f000 into the object search tree (overlaps existing)
 | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-v8-0815+ #5
 | Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
 | Call trace:
 |  dump_backtrace.part.0+0x1dc/0x1ec
 |  show_stack+0x24/0x80
 |  dump_stack_lvl+0x8c/0xb8
 |  dump_stack+0x1c/0x38
 |  create_object.isra.0+0x490/0x4b0
 |  kmemleak_alloc+0x3c/0x50
 |  kmem_cache_alloc+0x2f8/0x450
 |  __proc_create+0x18c/0x400
 |  proc_create_reg+0x54/0xd0
 |  proc_create_seq_private+0x94/0x120
 |  init_mm_internals+0x1d8/0x248
 |  kernel_init_freeable+0x188/0x388
 |  kernel_init+0x30/0x150
 |  ret_from_fork+0x10/0x20
 | kmemleak: Kernel memory leak detector disabled
 | kmemleak: Object 0xffffff806e24d000 (size 2097152):
 | kmemleak:   comm "swapper", pid 0, jiffies 4294892296
 | kmemleak:   min_count = -1
 | kmemleak:   count = 0
 | kmemleak:   flags = 0x5
 | kmemleak:   checksum = 0
 | kmemleak:   backtrace:
 |      kmemleak_alloc_phys+0x94/0xb0
 |      memblock_alloc_range_nid+0x1c0/0x20c
 |      memblock_alloc_internal+0x88/0x100
 |      memblock_alloc_try_nid+0x148/0x1ac
 |      kfence_alloc_pool+0x44/0x6c
 |      mm_init+0x28/0x98
 |      start_kernel+0x178/0x3e8
 |      __primary_switched+0xc4/0xcc

Reported-by: Max Schulze <[email protected]>
Signed-off-by: Marco Elver <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Sep 5, 2022
commit 0c7d7cc upstream.

There are two problems with the current code of memory_intersects:

First, it doesn't check whether the region (begin, end) falls inside the
region (virt, vend), that is (virt < begin && vend > end).

The second problem is if vend is equal to begin, it will return true but
this is wrong since vend (virt + size) is not the last address of the
memory region but (virt + size -1) is.  The wrong determination will
trigger the misreporting when the function check_for_illegal_area calls
memory_intersects to check if the dma region intersects with stext region.

The misreporting is as below (stext is at 0x80100000):
 WARNING: CPU: 0 PID: 77 at kernel/dma/debug.c:1073 check_for_illegal_area+0x130/0x168
 DMA-API: chipidea-usb2 e0002000.usb: device driver maps memory from kernel text or rodata [addr=800f0000] [len=65536]
 Modules linked in:
 CPU: 1 PID: 77 Comm: usb-storage Not tainted 5.19.0-yocto-standard #5
 Hardware name: Xilinx Zynq Platform
  unwind_backtrace from show_stack+0x18/0x1c
  show_stack from dump_stack_lvl+0x58/0x70
  dump_stack_lvl from __warn+0xb0/0x198
  __warn from warn_slowpath_fmt+0x80/0xb4
  warn_slowpath_fmt from check_for_illegal_area+0x130/0x168
  check_for_illegal_area from debug_dma_map_sg+0x94/0x368
  debug_dma_map_sg from __dma_map_sg_attrs+0x114/0x128
  __dma_map_sg_attrs from dma_map_sg_attrs+0x18/0x24
  dma_map_sg_attrs from usb_hcd_map_urb_for_dma+0x250/0x3b4
  usb_hcd_map_urb_for_dma from usb_hcd_submit_urb+0x194/0x214
  usb_hcd_submit_urb from usb_sg_wait+0xa4/0x118
  usb_sg_wait from usb_stor_bulk_transfer_sglist+0xa0/0xec
  usb_stor_bulk_transfer_sglist from usb_stor_bulk_srb+0x38/0x70
  usb_stor_bulk_srb from usb_stor_Bulk_transport+0x150/0x360
  usb_stor_Bulk_transport from usb_stor_invoke_transport+0x38/0x440
  usb_stor_invoke_transport from usb_stor_control_thread+0x1e0/0x238
  usb_stor_control_thread from kthread+0xf8/0x104
  kthread from ret_from_fork+0x14/0x2c

Refactor memory_intersects to fix the two problems above.

Before the 1d7db83 ("dma-debug: use memory_intersects()
directly"), memory_intersects is called only by printk_late_init:

printk_late_init -> init_section_intersects ->memory_intersects.

There were few places where memory_intersects was called.

When commit 1d7db83 ("dma-debug: use memory_intersects()
directly") was merged and CONFIG_DMA_API_DEBUG is enabled, the DMA
subsystem uses it to check for an illegal area and the calltrace above
is triggered.

[[email protected]: fix nearby comment typo]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 9795593 ("asm/sections: add helpers to check for section data")
Signed-off-by: Quanyang Wang <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Sep 17, 2022
[ Upstream commit b40130b ]

We have been hitting the following lockdep splat with btrfs/187 recently

  WARNING: possible circular locking dependency detected
  5.19.0-rc8+ #775 Not tainted
  ------------------------------------------------------
  btrfs/752500 is trying to acquire lock:
  ffff97e1875a97b8 (btrfs-treloc-02#2){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110

  but task is already holding lock:
  ffff97e1875a9278 (btrfs-tree-01/1){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #2 (btrfs-tree-01/1){+.+.}-{3:3}:
	 down_write_nested+0x41/0x80
	 __btrfs_tree_lock+0x24/0x110
	 btrfs_init_new_buffer+0x7d/0x2c0
	 btrfs_alloc_tree_block+0x120/0x3b0
	 __btrfs_cow_block+0x136/0x600
	 btrfs_cow_block+0x10b/0x230
	 btrfs_search_slot+0x53b/0xb70
	 btrfs_lookup_inode+0x2a/0xa0
	 __btrfs_update_delayed_inode+0x5f/0x280
	 btrfs_async_run_delayed_root+0x24c/0x290
	 btrfs_work_helper+0xf2/0x3e0
	 process_one_work+0x271/0x590
	 worker_thread+0x52/0x3b0
	 kthread+0xf0/0x120
	 ret_from_fork+0x1f/0x30

  -> #1 (btrfs-tree-01){++++}-{3:3}:
	 down_write_nested+0x41/0x80
	 __btrfs_tree_lock+0x24/0x110
	 btrfs_search_slot+0x3c3/0xb70
	 do_relocation+0x10c/0x6b0
	 relocate_tree_blocks+0x317/0x6d0
	 relocate_block_group+0x1f1/0x560
	 btrfs_relocate_block_group+0x23e/0x400
	 btrfs_relocate_chunk+0x4c/0x140
	 btrfs_balance+0x755/0xe40
	 btrfs_ioctl+0x1ea2/0x2c90
	 __x64_sys_ioctl+0x88/0xc0
	 do_syscall_64+0x38/0x90
	 entry_SYSCALL_64_after_hwframe+0x63/0xcd

  -> #0 (btrfs-treloc-02#2){+.+.}-{3:3}:
	 __lock_acquire+0x1122/0x1e10
	 lock_acquire+0xc2/0x2d0
	 down_write_nested+0x41/0x80
	 __btrfs_tree_lock+0x24/0x110
	 btrfs_lock_root_node+0x31/0x50
	 btrfs_search_slot+0x1cb/0xb70
	 replace_path+0x541/0x9f0
	 merge_reloc_root+0x1d6/0x610
	 merge_reloc_roots+0xe2/0x260
	 relocate_block_group+0x2c8/0x560
	 btrfs_relocate_block_group+0x23e/0x400
	 btrfs_relocate_chunk+0x4c/0x140
	 btrfs_balance+0x755/0xe40
	 btrfs_ioctl+0x1ea2/0x2c90
	 __x64_sys_ioctl+0x88/0xc0
	 do_syscall_64+0x38/0x90
	 entry_SYSCALL_64_after_hwframe+0x63/0xcd

  other info that might help us debug this:

  Chain exists of:
    btrfs-treloc-02#2 --> btrfs-tree-01 --> btrfs-tree-01/1

   Possible unsafe locking scenario:

	 CPU0                    CPU1
	 ----                    ----
    lock(btrfs-tree-01/1);
				 lock(btrfs-tree-01);
				 lock(btrfs-tree-01/1);
    lock(btrfs-treloc-02#2);

   *** DEADLOCK ***

  7 locks held by btrfs/752500:
   #0: ffff97e292fdf460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0x208/0x2c90
   #1: ffff97e284c02050 (&fs_info->reclaim_bgs_lock){+.+.}-{3:3}, at: btrfs_balance+0x55f/0xe40
   #2: ffff97e284c00878 (&fs_info->cleaner_mutex){+.+.}-{3:3}, at: btrfs_relocate_block_group+0x236/0x400
   #3: ffff97e292fdf650 (sb_internal#2){.+.+}-{0:0}, at: merge_reloc_root+0xef/0x610
   #4: ffff97e284c02378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1a8/0x5a0
   #5: ffff97e284c023a0 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x1a8/0x5a0
   #6: ffff97e1875a9278 (btrfs-tree-01/1){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110

  stack backtrace:
  CPU: 1 PID: 752500 Comm: btrfs Not tainted 5.19.0-rc8+ #775
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
  Call Trace:

   dump_stack_lvl+0x56/0x73
   check_noncircular+0xd6/0x100
   ? lock_is_held_type+0xe2/0x140
   __lock_acquire+0x1122/0x1e10
   lock_acquire+0xc2/0x2d0
   ? __btrfs_tree_lock+0x24/0x110
   down_write_nested+0x41/0x80
   ? __btrfs_tree_lock+0x24/0x110
   __btrfs_tree_lock+0x24/0x110
   btrfs_lock_root_node+0x31/0x50
   btrfs_search_slot+0x1cb/0xb70
   ? lock_release+0x137/0x2d0
   ? _raw_spin_unlock+0x29/0x50
   ? release_extent_buffer+0x128/0x180
   replace_path+0x541/0x9f0
   merge_reloc_root+0x1d6/0x610
   merge_reloc_roots+0xe2/0x260
   relocate_block_group+0x2c8/0x560
   btrfs_relocate_block_group+0x23e/0x400
   btrfs_relocate_chunk+0x4c/0x140
   btrfs_balance+0x755/0xe40
   btrfs_ioctl+0x1ea2/0x2c90
   ? lock_is_held_type+0xe2/0x140
   ? lock_is_held_type+0xe2/0x140
   ? __x64_sys_ioctl+0x88/0xc0
   __x64_sys_ioctl+0x88/0xc0
   do_syscall_64+0x38/0x90
   entry_SYSCALL_64_after_hwframe+0x63/0xcd

This isn't necessarily new, it's just tricky to hit in practice.  There
are two competing things going on here.  With relocation we create a
snapshot of every fs tree with a reloc tree.  Any extent buffers that
get initialized here are initialized with the reloc root lockdep key.
However since it is a snapshot, any blocks that are currently in cache
that originally belonged to the fs tree will have the normal tree
lockdep key set.  This creates the lock dependency of

  reloc tree -> normal tree

for the extent buffer locking during the first phase of the relocation
as we walk down the reloc root to relocate blocks.

However this is problematic because the final phase of the relocation is
merging the reloc root into the original fs root.  This involves
searching down to any keys that exist in the original fs root and then
swapping the relocated block and the original fs root block.  We have to
search down to the fs root first, and then go search the reloc root for
the block we need to replace.  This creates the dependency of

  normal tree -> reloc tree

which is why lockdep complains.

Additionally even if we were to fix this particular mismatch with a
different nesting for the merge case, we're still slotting in a block
that has a owner of the reloc root objectid into a normal tree, so that
block will have its lockdep key set to the tree reloc root, and create a
lockdep splat later on when we wander into that block from the fs root.

Unfortunately the only solution here is to make sure we do not set the
lockdep key to the reloc tree lockdep key normally, and then reset any
blocks we wander into from the reloc root when we're doing the merged.

This solves the problem of having mixed tree reloc keys intermixed with
normal tree keys, and then allows us to make sure in the merge case we
maintain the lock order of

  normal tree -> reloc tree

We handle this by setting a bit on the reloc root when we do the search
for the block we want to relocate, and any block we search into or COW
at that point gets set to the reloc tree key.  This works correctly
because we only ever COW down to the parent node, so we aren't resetting
the key for the block we're linking into the fs root.

With this patch we no longer have the lockdep splat in btrfs/187.

Signed-off-by: Josef Bacik <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Sep 17, 2022
[ Upstream commit 84a5358 ]

The SRv6 layer allows defining HMAC data that can later be used to sign IPv6
Segment Routing Headers. This configuration is realised via netlink through
four attributes: SEG6_ATTR_HMACKEYID, SEG6_ATTR_SECRET, SEG6_ATTR_SECRETLEN and
SEG6_ATTR_ALGID. Because the SECRETLEN attribute is decoupled from the actual
length of the SECRET attribute, it is possible to provide invalid combinations
(e.g., secret = "", secretlen = 64). This case is not checked in the code and
with an appropriately crafted netlink message, an out-of-bounds read of up
to 64 bytes (max secret length) can occur past the skb end pointer and into
skb_shared_info:

Breakpoint 1, seg6_genl_sethmac (skb=<optimized out>, info=<optimized out>) at net/ipv6/seg6.c:208
208		memcpy(hinfo->secret, secret, slen);
(gdb) bt
 #0  seg6_genl_sethmac (skb=<optimized out>, info=<optimized out>) at net/ipv6/seg6.c:208
 #1  0xffffffff81e012e9 in genl_family_rcv_msg_doit (skb=skb@entry=0xffff88800b1f9f00, nlh=nlh@entry=0xffff88800b1b7600,
    extack=extack@entry=0xffffc90000ba7af0, ops=ops@entry=0xffffc90000ba7a80, hdrlen=4, net=0xffffffff84237580 <init_net>, family=<optimized out>,
    family=<optimized out>) at net/netlink/genetlink.c:731
 #2  0xffffffff81e01435 in genl_family_rcv_msg (extack=0xffffc90000ba7af0, nlh=0xffff88800b1b7600, skb=0xffff88800b1f9f00,
    family=0xffffffff82fef6c0 <seg6_genl_family>) at net/netlink/genetlink.c:775
 #3  genl_rcv_msg (skb=0xffff88800b1f9f00, nlh=0xffff88800b1b7600, extack=0xffffc90000ba7af0) at net/netlink/genetlink.c:792
 #4  0xffffffff81dfffc3 in netlink_rcv_skb (skb=skb@entry=0xffff88800b1f9f00, cb=cb@entry=0xffffffff81e01350 <genl_rcv_msg>)
    at net/netlink/af_netlink.c:2501
 #5  0xffffffff81e00919 in genl_rcv (skb=0xffff88800b1f9f00) at net/netlink/genetlink.c:803
 #6  0xffffffff81dff6ae in netlink_unicast_kernel (ssk=0xffff888010eec800, skb=0xffff88800b1f9f00, sk=0xffff888004aed000)
    at net/netlink/af_netlink.c:1319
 #7  netlink_unicast (ssk=ssk@entry=0xffff888010eec800, skb=skb@entry=0xffff88800b1f9f00, portid=portid@entry=0, nonblock=<optimized out>)
    at net/netlink/af_netlink.c:1345
 #8  0xffffffff81dff9a4 in netlink_sendmsg (sock=<optimized out>, msg=0xffffc90000ba7e48, len=<optimized out>) at net/netlink/af_netlink.c:1921
...
(gdb) p/x ((struct sk_buff *)0xffff88800b1f9f00)->head + ((struct sk_buff *)0xffff88800b1f9f00)->end
$1 = 0xffff88800b1b76c0
(gdb) p/x secret
$2 = 0xffff88800b1b76c0
(gdb) p slen
$3 = 64 '@'

The OOB data can then be read back from userspace by dumping HMAC state. This
commit fixes this by ensuring SECRETLEN cannot exceed the actual length of
SECRET.

Reported-by: Lucas Leong <[email protected]>
Tested: verified that EINVAL is correctly returned when secretlen > len(secret)
Fixes: 4f4853d ("ipv6: sr: implement API to control SR HMAC structure")
Signed-off-by: David Lebrun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Oct 26, 2022
commit 1b513f6 upstream.

Syzkaller reported BUG_ON as follows:

------------[ cut here ]------------
kernel BUG at fs/ntfs/dir.c:86!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 3 PID: 758 Comm: a.out Not tainted 5.19.0-next-20220808 #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
RIP: 0010:ntfs_lookup_inode_by_name+0xd11/0x2d10
Code: ff e9 b9 01 00 00 e8 1e fe d6 fe 48 8b 7d 98 49 8d 5d 07 e8 91 85 29 ff 48 c7 45 98 00 00 00 00 e9 5a fb ff ff e8 ff fd d6 fe <0f> 0b e8 f8 fd d6 fe 0f 0b e8 f1 fd d6 fe 48 8b b5 50 ff ff ff 4c
RSP: 0018:ffff888079607978 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000008000 RCX: 0000000000000000
RDX: ffff88807cf10000 RSI: ffffffff82a4a081 RDI: 0000000000000003
RBP: ffff888079607a70 R08: 0000000000000001 R09: ffff88807a6d01d7
R10: ffffed100f4da03a R11: 0000000000000000 R12: ffff88800f0fb110
R13: ffff88800f0ee000 R14: ffff88800f0fb000 R15: 0000000000000001
FS:  00007f33b63c7540(0000) GS:ffff888108580000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f33b635c090 CR3: 000000000f39e005 CR4: 0000000000770ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 <TASK>
 load_system_files+0x1f7f/0x3620
 ntfs_fill_super+0xa01/0x1be0
 mount_bdev+0x36a/0x440
 ntfs_mount+0x3a/0x50
 legacy_get_tree+0xfb/0x210
 vfs_get_tree+0x8f/0x2f0
 do_new_mount+0x30a/0x760
 path_mount+0x4de/0x1880
 __x64_sys_mount+0x2b3/0x340
 do_syscall_64+0x38/0x90
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f33b62ff9ea
Code: 48 8b 0d a9 f4 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 76 f4 0b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffd0c471aa8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f33b62ff9ea
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffd0c471be0
RBP: 00007ffd0c471c60 R08: 00007ffd0c471ae0 R09: 00007ffd0c471c24
R10: 0000000000000000 R11: 0000000000000202 R12: 000055bac5afc160
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---

Fix this by adding sanity check on extended system files' directory inode
to ensure that it is directory, just like ntfs_extend_init() when mounting
ntfs3.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: ChenXiaoSong <[email protected]>
Cc: Anton Altaparmakov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Nov 21, 2022
commit 9b2f203 upstream.

The btrfs_alloc_dummy_root() uses ERR_PTR as the error return value
rather than NULL, if error happened, there will be a NULL pointer
dereference:

  BUG: KASAN: null-ptr-deref in btrfs_free_dummy_root+0x21/0x50 [btrfs]
  Read of size 8 at addr 000000000000002c by task insmod/258926

  CPU: 2 PID: 258926 Comm: insmod Tainted: G        W          6.1.0-rc2+ #5
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
  Call Trace:
   <TASK>
   dump_stack_lvl+0x34/0x44
   kasan_report+0xb7/0x140
   kasan_check_range+0x145/0x1a0
   btrfs_free_dummy_root+0x21/0x50 [btrfs]
   btrfs_test_free_space_cache+0x1a8c/0x1add [btrfs]
   btrfs_run_sanity_tests+0x65/0x80 [btrfs]
   init_btrfs_fs+0xec/0x154 [btrfs]
   do_one_initcall+0x87/0x2a0
   do_init_module+0xdf/0x320
   load_module+0x3006/0x3390
   __do_sys_finit_module+0x113/0x1b0
   do_syscall_64+0x35/0x80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

Fixes: aaedb55 ("Btrfs: add tests for btrfs_get_extent")
CC: [email protected] # 4.9+
Reviewed-by: Anand Jain <[email protected]>
Signed-off-by: Zhang Xiaoxu <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Dec 15, 2022
commit 89d21e2 upstream.

test_bpf tail call tests end up as:

  test_bpf: #0 Tail call leaf jited:1 85 PASS
  test_bpf: #1 Tail call 2 jited:1 111 PASS
  test_bpf: #2 Tail call 3 jited:1 145 PASS
  test_bpf: #3 Tail call 4 jited:1 170 PASS
  test_bpf: #4 Tail call load/store leaf jited:1 190 PASS
  test_bpf: #5 Tail call load/store jited:1
  BUG: Unable to handle kernel data access on write at 0xf1b4e000
  Faulting instruction address: 0xbe86b710
  Oops: Kernel access of bad area, sig: 11 [#1]
  BE PAGE_SIZE=4K MMU=Hash PowerMac
  Modules linked in: test_bpf(+)
  CPU: 0 PID: 97 Comm: insmod Not tainted 6.1.0-rc4+ #195
  Hardware name: PowerMac3,1 750CL 0x87210 PowerMac
  NIP:  be86b710 LR: be857e88 CTR: be86b704
  REGS: f1b4df20 TRAP: 0300   Not tainted  (6.1.0-rc4+)
  MSR:  00009032 <EE,ME,IR,DR,RI>  CR: 28008242  XER: 00000000
  DAR: f1b4e000 DSISR: 42000000
  GPR00: 00000001 f1b4dfe0 c11d2280 00000000 00000000 00000000 00000002 00000000
  GPR08: f1b4e000 be86b704 f1b4e000 00000000 00000000 100d816a f2440000 fe73baa8
  GPR16: f2458000 00000000 c1941ae4 f1fe2248 00000045 c0de0000 f2458030 00000000
  GPR24: 000003e8 0000000f f2458000 f1b4dc90 3e584b46 00000000 f24466a0 c1941a00
  NIP [be86b710] 0xbe86b710
  LR [be857e88] __run_one+0xec/0x264 [test_bpf]
  Call Trace:
  [f1b4dfe0] [00000002] 0x2 (unreliable)
  Instruction dump:
  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
  ---[ end trace 0000000000000000 ]---

This is a tentative to write above the stack. The problem is encoutered
with tests added by commit 38608ee ("bpf, tests: Add load store
test case for tail call")

This happens because tail call is done to a BPF prog with a different
stack_depth. At the time being, the stack is kept as is when the caller
tail calls its callee. But at exit, the callee restores the stack based
on its own properties. Therefore here, at each run, r1 is erroneously
increased by 32 - 16 = 16 bytes.

This was done that way in order to pass the tail call count from caller
to callee through the stack. As powerpc32 doesn't have a red zone in
the stack, it was necessary the maintain the stack as is for the tail
call. But it was not anticipated that the BPF frame size could be
different.

Let's take a new approach. Use register r4 to carry the tail call count
during the tail call, and save it into the stack at function entry if
required. This means the input parameter must be in r3, which is more
correct as it is a 32 bits parameter, then tail call better match with
normal BPF function entry, the down side being that we move that input
parameter back and forth between r3 and r4. That can be optimised later.

Doing that also has the advantage of maximising the common parts between
tail calls and a normal function exit.

With the fix, tail call tests are now successfull:

  test_bpf: #0 Tail call leaf jited:1 53 PASS
  test_bpf: #1 Tail call 2 jited:1 115 PASS
  test_bpf: #2 Tail call 3 jited:1 154 PASS
  test_bpf: #3 Tail call 4 jited:1 165 PASS
  test_bpf: #4 Tail call load/store leaf jited:1 101 PASS
  test_bpf: #5 Tail call load/store jited:1 141 PASS
  test_bpf: #6 Tail call error path, max count reached jited:1 994 PASS
  test_bpf: #7 Tail call count preserved across function calls jited:1 140975 PASS
  test_bpf: #8 Tail call error path, NULL target jited:1 110 PASS
  test_bpf: #9 Tail call error path, index out of range jited:1 69 PASS
  test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]

Suggested-by: Naveen N. Rao <[email protected]>
Fixes: 51c66ad ("powerpc/bpf: Implement extended BPF on PPC32")
Cc: [email protected]
Signed-off-by: Christophe Leroy <[email protected]>
Tested-by: Naveen N. Rao <[email protected]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/757acccb7fbfc78efa42dcf3c974b46678198905.1669278887.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Apr 28, 2024
commit 89f9a1e upstream.

On the time to free xbc memory in xbc_exit(), memblock may has handed
over memory to buddy allocator. So it doesn't make sense to free memory
back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs
on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled like x86.
Following KASAN logs shows this case.

This patch fixes the xbc memory free problem by calling memblock_free()
in early xbc init error rewind path and calling memblock_free_late() in
xbc exit path to free memory to buddy allocator.

[    9.410890] ==================================================================
[    9.418962] BUG: KASAN: use-after-free in memblock_isolate_range+0x12d/0x260
[    9.426850] Read of size 8 at addr ffff88845dd30000 by task swapper/0/1

[    9.435901] CPU: 9 PID: 1 Comm: swapper/0 Tainted: G     U             6.9.0-rc3-00208-g586b5dfb51b9 #5
[    9.446403] Hardware name: Intel Corporation RPLP LP5 (CPU:RaptorLake)/RPLP LP5 (ID:13), BIOS IRPPN02.01.01.00.00.19.015.D-00000000 Dec 28 2023
[    9.460789] Call Trace:
[    9.463518]  <TASK>
[    9.465859]  dump_stack_lvl+0x53/0x70
[    9.469949]  print_report+0xce/0x610
[    9.473944]  ? __virt_addr_valid+0xf5/0x1b0
[    9.478619]  ? memblock_isolate_range+0x12d/0x260
[    9.483877]  kasan_report+0xc6/0x100
[    9.487870]  ? memblock_isolate_range+0x12d/0x260
[    9.493125]  memblock_isolate_range+0x12d/0x260
[    9.498187]  memblock_phys_free+0xb4/0x160
[    9.502762]  ? __pfx_memblock_phys_free+0x10/0x10
[    9.508021]  ? mutex_unlock+0x7e/0xd0
[    9.512111]  ? __pfx_mutex_unlock+0x10/0x10
[    9.516786]  ? kernel_init_freeable+0x2d4/0x430
[    9.521850]  ? __pfx_kernel_init+0x10/0x10
[    9.526426]  xbc_exit+0x17/0x70
[    9.529935]  kernel_init+0x38/0x1e0
[    9.533829]  ? _raw_spin_unlock_irq+0xd/0x30
[    9.538601]  ret_from_fork+0x2c/0x50
[    9.542596]  ? __pfx_kernel_init+0x10/0x10
[    9.547170]  ret_from_fork_asm+0x1a/0x30
[    9.551552]  </TASK>

[    9.555649] The buggy address belongs to the physical page:
[    9.561875] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x45dd30
[    9.570821] flags: 0x200000000000000(node=0|zone=2)
[    9.576271] page_type: 0xffffffff()
[    9.580167] raw: 0200000000000000 ffffea0011774c48 ffffea0012ba1848 0000000000000000
[    9.588823] raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
[    9.597476] page dumped because: kasan: bad access detected

[    9.605362] Memory state around the buggy address:
[    9.610714]  ffff88845dd2ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    9.618786]  ffff88845dd2ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    9.626857] >ffff88845dd30000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[    9.634930]                    ^
[    9.638534]  ffff88845dd30080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[    9.646605]  ffff88845dd30100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[    9.654675] ==================================================================

Link: https://lore.kernel.org/all/[email protected]/

Fixes: 40caa12 ("init: bootconfig: Remove all bootconfig data when the init memory is removed")
Cc: [email protected]
Signed-off-by: Qiang Zhang <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Apr 30, 2024
The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
dsx724 pushed a commit that referenced this issue May 3, 2024
[ Upstream commit 5422598 ]

The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 3, 2024
[ Upstream commit f8bbc07 ]

vhost_worker will call tun call backs to receive packets. If too many
illegal packets arrives, tun_do_read will keep dumping packet contents.
When console is enabled, it will costs much more cpu time to dump
packet and soft lockup will be detected.

net_ratelimit mechanism can be used to limit the dumping rate.

PID: 33036    TASK: ffff949da6f20000  CPU: 23   COMMAND: "vhost-32980"
 #0 [fffffe00003fce50] crash_nmi_callback at ffffffff89249253
 #1 [fffffe00003fce58] nmi_handle at ffffffff89225fa3
 #2 [fffffe00003fceb0] default_do_nmi at ffffffff8922642e
 #3 [fffffe00003fced0] do_nmi at ffffffff8922660d
 #4 [fffffe00003fcef0] end_repeat_nmi at ffffffff89c01663
    [exception RIP: io_serial_in+20]
    RIP: ffffffff89792594  RSP: ffffa655314979e8  RFLAGS: 00000002
    RAX: ffffffff89792500  RBX: ffffffff8af428a0  RCX: 0000000000000000
    RDX: 00000000000003fd  RSI: 0000000000000005  RDI: ffffffff8af428a0
    RBP: 0000000000002710   R8: 0000000000000004   R9: 000000000000000f
    R10: 0000000000000000  R11: ffffffff8acbf64f  R12: 0000000000000020
    R13: ffffffff8acbf698  R14: 0000000000000058  R15: 0000000000000000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #5 [ffffa655314979e8] io_serial_in at ffffffff89792594
 #6 [ffffa655314979e8] wait_for_xmitr at ffffffff89793470
 #7 [ffffa65531497a08] serial8250_console_putchar at ffffffff897934f6
 #8 [ffffa65531497a20] uart_console_write at ffffffff8978b605
 #9 [ffffa65531497a48] serial8250_console_write at ffffffff89796558
 #10 [ffffa65531497ac8] console_unlock at ffffffff89316124
 #11 [ffffa65531497b10] vprintk_emit at ffffffff89317c07
 #12 [ffffa65531497b68] printk at ffffffff89318306
 #13 [ffffa65531497bc8] print_hex_dump at ffffffff89650765
 #14 [ffffa65531497ca8] tun_do_read at ffffffffc0b06c27 [tun]
 #15 [ffffa65531497d38] tun_recvmsg at ffffffffc0b06e34 [tun]
 #16 [ffffa65531497d68] handle_rx at ffffffffc0c5d682 [vhost_net]
 #17 [ffffa65531497ed0] vhost_worker at ffffffffc0c644dc [vhost]
 #18 [ffffa65531497f10] kthread at ffffffff892d2e72
 #19 [ffffa65531497f50] ret_from_fork at ffffffff89c0022f

Fixes: ef3db4a ("tun: avoid BUG, dump packet on GSO errors")
Signed-off-by: Lei Chen <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Acked-by: Jason Wang <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 3, 2024
[ Upstream commit 5422598 ]

The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 3, 2024
[ Upstream commit 5422598 ]

The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 4, 2024
[ Upstream commit 5422598 ]

The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 4, 2024
[ Upstream commit 5422598 ]

The rehash delayed work migrates filters from one region to another
according to the number of available credits.

The migrated from region is destroyed at the end of the work if the
number of credits is non-negative as the assumption is that this is
indicative of migration being complete. This assumption is incorrect as
a non-negative number of credits can also be the result of a failed
migration.

The destruction of a region that still has filters referencing it can
result in a use-after-free [1].

Fix by not destroying the region if migration failed.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
Read of size 8 at addr ffff8881735319e8 by task kworker/0:31/3858

CPU: 0 PID: 3858 Comm: kworker/0:31 Tainted: G        W          6.9.0-rc2-custom-00782-gf2275c2157d8 #5
Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019
Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xce/0x670
 kasan_report+0xd7/0x110
 mlxsw_sp_acl_ctcam_region_entry_remove+0x21d/0x230
 mlxsw_sp_acl_ctcam_entry_del+0x2e/0x70
 mlxsw_sp_acl_atcam_entry_del+0x81/0x210
 mlxsw_sp_acl_tcam_vchunk_migrate_all+0x3cd/0xb50
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x157/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 174:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 __kasan_kmalloc+0x8f/0xa0
 __kmalloc+0x19c/0x360
 mlxsw_sp_acl_tcam_region_create+0xdf/0x9c0
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x954/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Freed by task 7:
 kasan_save_stack+0x33/0x60
 kasan_save_track+0x14/0x30
 kasan_save_free_info+0x3b/0x60
 poison_slab_object+0x102/0x170
 __kasan_slab_free+0x14/0x30
 kfree+0xc1/0x290
 mlxsw_sp_acl_tcam_region_destroy+0x272/0x310
 mlxsw_sp_acl_tcam_vregion_rehash_work+0x731/0x1300
 process_one_work+0x8eb/0x19b0
 worker_thread+0x6c9/0xf70
 kthread+0x2c9/0x3b0
 ret_from_fork+0x4d/0x80
 ret_from_fork_asm+0x1a/0x30

Fixes: c9c9af9 ("mlxsw: spectrum_acl: Allow to interrupt/continue rehash work")
Signed-off-by: Ido Schimmel <[email protected]>
Tested-by: Alexander Zubkov <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/3e412b5659ec2310c5c615760dfe5eac18dd7ebd.1713797103.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue May 31, 2024
commit c2274b9 upstream.

The reader code in rb_get_reader_page() swaps a new reader page into the
ring buffer by doing cmpxchg on old->list.prev->next to point it to the
new page. Following that, if the operation is successful,
old->list.next->prev gets updated too. This means the underlying
doubly-linked list is temporarily inconsistent, page->prev->next or
page->next->prev might not be equal back to page for some page in the
ring buffer.

The resize operation in ring_buffer_resize() can be invoked in parallel.
It calls rb_check_pages() which can detect the described inconsistency
and stop further tracing:

[  190.271762] ------------[ cut here ]------------
[  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
[  190.271789] Modules linked in: [...]
[  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
[  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
[  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
[  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
[  190.272023] Code: [...]
[  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
[  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
[  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
[  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
[  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
[  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
[  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
[  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
[  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  190.272077] Call Trace:
[  190.272098]  <TASK>
[  190.272189]  ring_buffer_resize+0x2ab/0x460
[  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
[  190.272206]  tracing_resize_ring_buffer+0x65/0x90
[  190.272216]  tracing_entries_write+0x74/0xc0
[  190.272225]  vfs_write+0xf5/0x420
[  190.272248]  ksys_write+0x67/0xe0
[  190.272256]  do_syscall_64+0x82/0x170
[  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  190.272373] RIP: 0033:0x7f1bd657d263
[  190.272381] Code: [...]
[  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
[  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
[  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
[  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
[  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
[  190.272412]  </TASK>
[  190.272414] ---[ end trace 0000000000000000 ]---

Note that ring_buffer_resize() calls rb_check_pages() only if the parent
trace_buffer has recording disabled. Recent commit d78ab79
("tracing: Stop current tracer when resizing buffer") causes that it is
now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help
reproducing it, one can add a delay loop in rb_get_reader_page():

 ret = rb_head_page_replace(reader, cpu_buffer->reader_page);
 if (!ret)
 	goto spin;
 for (unsigned i = 0; i < 1U << 26; i++)  /* inserted delay loop */
 	__asm__ __volatile__ ("" : : : "memory");
 rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;

.. and then run the following commands on the target system:

 echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
 while true; do
 	echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 	echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 done &
 while true; do
 	for i in /sys/kernel/tracing/per_cpu/*; do
 		timeout 0.1 cat $i/trace_pipe; sleep 0.2
 	done
 done

To fix the problem, make sure ring_buffer_resize() doesn't invoke
rb_check_pages() concurrently with a reader operating on the same
ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]

Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 659f451 ("ring-buffer: Add integrity check at end of iter read")
Signed-off-by: Petr Pavlu <[email protected]>
[ Fixed whitespace ]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 4, 2024
…git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for net:

Patch #1 syzbot reports that nf_reinject() could be called without
         rcu_read_lock() when flushing pending packets at nfnetlink
         queue removal, from Eric Dumazet.

Patch #2 flushes ipset list:set when canceling garbage collection to
         reference to other lists to fix a race, from Jozsef Kadlecsik.

Patch #3 restores q-in-q matching with nft_payload by reverting
         f6ae9f1 ("netfilter: nft_payload: add C-VLAN support").

Patch #4 fixes vlan mangling in skbuff when vlan offload is present
         in skbuff, without this patch nft_payload corrupts packets
         in this case.

Patch #5 fixes possible nul-deref in tproxy no IP address is found in
         netdevice, reported by syzbot and patch from Florian Westphal.

Patch #6 removes a superfluous restriction which prevents loose fib
         lookups from input and forward hooks, from Eric Garver.

My assessment is that patches #1, #2 and #5 address possible kernel
crash, anything else in this batch fixes broken features.

netfilter pull request 24-05-29

* tag 'nf-24-05-29' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
  netfilter: nft_fib: allow from forward/input without iif selector
  netfilter: tproxy: bail out if IP has been disabled on the device
  netfilter: nft_payload: skbuff vlan metadata mangle support
  netfilter: nft_payload: restore vlan q-in-q match support
  netfilter: ipset: Add list flush to cancel_gc
  netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()
====================

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 11, 2024
With commit c4cb231 ("iommu/amd: Add support for enable/disable IOPF")
we are hitting below issue. This happens because in IOPF enablement path
it holds spin lock with irq disable and then tries to take mutex lock.

dmesg:
-----
[    0.938739] =============================
[    0.938740] [ BUG: Invalid wait context ]
[    0.938742] 6.10.0-rc1+ #1 Not tainted
[    0.938745] -----------------------------
[    0.938746] swapper/0/1 is trying to lock:
[    0.938748] ffffffff8c9f01d8 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x78/0x4a0
[    0.938767] other info that might help us debug this:
[    0.938768] context-{5:5}
[    0.938769] 7 locks held by swapper/0/1:
[    0.938772]  #0: ffff888101a91310 (&group->mutex){+.+.}-{4:4}, at: bus_iommu_probe+0x70/0x160
[    0.938790]  #1: ffff888101d1f1b8 (&domain->lock){....}-{3:3}, at: amd_iommu_attach_device+0xa5/0x700
[    0.938799]  #2: ffff888101cc3d18 (&dev_data->lock){....}-{3:3}, at: amd_iommu_attach_device+0xc5/0x700
[    0.938806]  #3: ffff888100052830 (&iommu->lock){....}-{2:2}, at: amd_iommu_iopf_add_device+0x3f/0xa0
[    0.938813]  #4: ffffffff8945a340 (console_lock){+.+.}-{0:0}, at: _printk+0x48/0x50
[    0.938822]  #5: ffffffff8945a390 (console_srcu){....}-{0:0}, at: console_flush_all+0x58/0x4e0
[    0.938867]  #6: ffffffff82459f80 (console_owner){....}-{0:0}, at: console_flush_all+0x1f0/0x4e0
[    0.938872] stack backtrace:
[    0.938874] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.10.0-rc1+ #1
[    0.938877] Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.39 04/16/2019

Fix above issue by re-arranging code in attach device path:
  - move device PASID/IOPF enablement outside lock in AMD IOMMU driver.
    This is safe as core layer holds group->mutex lock before calling
    iommu_ops->attach_dev.

Reported-by: Borislav Petkov <[email protected]>
Reported-by: Mikhail Gavrilov <[email protected]>
Reported-by: Chris Bainbridge <[email protected]>
Fixes: c4cb231 ("iommu/amd: Add support for enable/disable IOPF")
Tested-by: Borislav Petkov <[email protected]>
Tested-by: Chris Bainbridge <[email protected]>
Tested-by: Mikhail Gavrilov <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 11, 2024
…PLES event"

This reverts commit 7d1405c.

This causes segfaults in some cases, as reported by Milian:

  ```
  sudo /usr/bin/perf record -z --call-graph dwarf -e cycles -e
  raw_syscalls:sys_enter ls
  ...
  [ perf record: Woken up 3 times to write data ]
  malloc(): invalid next size (unsorted)
  Aborted
  ```

  Backtrace with GDB + debuginfod:

  ```
  malloc(): invalid next size (unsorted)

  Thread 1 "perf" received signal SIGABRT, Aborted.
  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
  no_tid=no_tid@entry=0) at pthread_kill.c:44
  Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_kill.c
  44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
  (ret) : 0;
  (gdb) bt
  #0  __pthread_kill_implementation (threadid=<optimized out>,
  signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
  #1  0x00007ffff6ea8eb3 in __pthread_kill_internal (threadid=<optimized out>,
  signo=6) at pthread_kill.c:78
  #2  0x00007ffff6e50a30 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/
  raise.c:26
  #3  0x00007ffff6e384c3 in __GI_abort () at abort.c:79
  #4  0x00007ffff6e39354 in __libc_message_impl (fmt=fmt@entry=0x7ffff6fc22ea
  "%s\n") at ../sysdeps/posix/libc_fatal.c:132
  #5  0x00007ffff6eb3085 in malloc_printerr (str=str@entry=0x7ffff6fc5850
  "malloc(): invalid next size (unsorted)") at malloc.c:5772
  #6  0x00007ffff6eb657c in _int_malloc (av=av@entry=0x7ffff6ff6ac0
  <main_arena>, bytes=bytes@entry=368) at malloc.c:4081
  #7  0x00007ffff6eb877e in __libc_calloc (n=<optimized out>,
  elem_size=<optimized out>) at malloc.c:3754
  #8  0x000055555569bdb6 in perf_session.do_write_header ()
  #9  0x00005555555a373a in __cmd_record.constprop.0 ()
  #10 0x00005555555a6846 in cmd_record ()
  #11 0x000055555564db7f in run_builtin ()
  #12 0x000055555558ed77 in main ()
  ```

  Valgrind memcheck:
  ```
  ==45136== Invalid write of size 8
  ==45136==    at 0x2B38A5: perf_event__synthesize_id_sample (in /usr/bin/perf)
  ==45136==    by 0x157069: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==  Address 0x6a866a8 is 0 bytes after a block of size 40 alloc'd
  ==45136==    at 0x4849BF3: calloc (vg_replace_malloc.c:1675)
  ==45136==    by 0x3574AB: zalloc (in /usr/bin/perf)
  ==45136==    by 0x1570E0: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==
  ==45136== Syscall param write(buf) points to unaddressable byte(s)
  ==45136==    at 0x575953D: __libc_write (write.c:26)
  ==45136==    by 0x575953D: write (write.c:24)
  ==45136==    by 0x35761F: ion (in /usr/bin/perf)
  ==45136==    by 0x357778: writen (in /usr/bin/perf)
  ==45136==    by 0x1548F7: record__write (in /usr/bin/perf)
  ==45136==    by 0x15708A: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==  Address 0x6a866a8 is 0 bytes after a block of size 40 alloc'd
  ==45136==    at 0x4849BF3: calloc (vg_replace_malloc.c:1675)
  ==45136==    by 0x3574AB: zalloc (in /usr/bin/perf)
  ==45136==    by 0x1570E0: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==
 -----

Closes: https://lore.kernel.org/linux-perf-users/23879991.0LEYPuXRzz@milian-workstation/
Reported-by: Milian Wolff <[email protected]>
Tested-by: Milian Wolff <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected] # 6.8+
Link: https://lore.kernel.org/lkml/Zl9ksOlHJHnKM70p@x1
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 11, 2024
We have been seeing crashes on duplicate keys in
btrfs_set_item_key_safe():

  BTRFS critical (device vdb): slot 4 key (450 108 8192) new key (450 108 8192)
  ------------[ cut here ]------------
  kernel BUG at fs/btrfs/ctree.c:2620!
  invalid opcode: 0000 [#1] PREEMPT SMP PTI
  CPU: 0 PID: 3139 Comm: xfs_io Kdump: loaded Not tainted 6.9.0 #6
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
  RIP: 0010:btrfs_set_item_key_safe+0x11f/0x290 [btrfs]

With the following stack trace:

  #0  btrfs_set_item_key_safe (fs/btrfs/ctree.c:2620:4)
  #1  btrfs_drop_extents (fs/btrfs/file.c:411:4)
  #2  log_one_extent (fs/btrfs/tree-log.c:4732:9)
  #3  btrfs_log_changed_extents (fs/btrfs/tree-log.c:4955:9)
  #4  btrfs_log_inode (fs/btrfs/tree-log.c:6626:9)
  #5  btrfs_log_inode_parent (fs/btrfs/tree-log.c:7070:8)
  #6  btrfs_log_dentry_safe (fs/btrfs/tree-log.c:7171:8)
  #7  btrfs_sync_file (fs/btrfs/file.c:1933:8)
  #8  vfs_fsync_range (fs/sync.c:188:9)
  #9  vfs_fsync (fs/sync.c:202:9)
  #10 do_fsync (fs/sync.c:212:9)
  #11 __do_sys_fdatasync (fs/sync.c:225:9)
  #12 __se_sys_fdatasync (fs/sync.c:223:1)
  #13 __x64_sys_fdatasync (fs/sync.c:223:1)
  #14 do_syscall_x64 (arch/x86/entry/common.c:52:14)
  #15 do_syscall_64 (arch/x86/entry/common.c:83:7)
  #16 entry_SYSCALL_64+0xaf/0x14c (arch/x86/entry/entry_64.S:121)

So we're logging a changed extent from fsync, which is splitting an
extent in the log tree. But this split part already exists in the tree,
triggering the BUG().

This is the state of the log tree at the time of the crash, dumped with
drgn (https://github.com/osandov/drgn/blob/main/contrib/btrfs_tree.py)
to get more details than btrfs_print_leaf() gives us:

  >>> print_extent_buffer(prog.crashed_thread().stack_trace()[0]["eb"])
  leaf 33439744 level 0 items 72 generation 9 owner 18446744073709551610
  leaf 33439744 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
          item 0 key (450 INODE_ITEM 0) itemoff 16123 itemsize 160
                  generation 7 transid 9 size 8192 nbytes 8473563889606862198
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 204 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417704.983333333 (2024-05-22 15:41:44)
                  mtime 1716417704.983333333 (2024-05-22 15:41:44)
                  otime 17592186044416.000000000 (559444-03-08 01:40:16)
          item 1 key (450 INODE_REF 256) itemoff 16110 itemsize 13
                  index 195 namelen 3 name: 193
          item 2 key (450 XATTR_ITEM 1640047104) itemoff 16073 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 3 key (450 EXTENT_DATA 0) itemoff 16020 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 4096 ram 12288
                  extent compression 0 (none)
          item 4 key (450 EXTENT_DATA 4096) itemoff 15967 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 4096 nr 8192
          item 5 key (450 EXTENT_DATA 8192) itemoff 15914 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096
  ...

So the real problem happened earlier: notice that items 4 (4k-12k) and 5
(8k-12k) overlap. Both are prealloc extents. Item 4 straddles i_size and
item 5 starts at i_size.

Here is the state of the filesystem tree at the time of the crash:

  >>> root = prog.crashed_thread().stack_trace()[2]["inode"].root
  >>> ret, nodes, slots = btrfs_search_slot(root, BtrfsKey(450, 0, 0))
  >>> print_extent_buffer(nodes[0])
  leaf 30425088 level 0 items 184 generation 9 owner 5
  leaf 30425088 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
  	...
          item 179 key (450 INODE_ITEM 0) itemoff 4907 itemsize 160
                  generation 7 transid 7 size 4096 nbytes 12288
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 6 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417703.220000000 (2024-05-22 15:41:43)
                  mtime 1716417703.220000000 (2024-05-22 15:41:43)
                  otime 1716417703.220000000 (2024-05-22 15:41:43)
          item 180 key (450 INODE_REF 256) itemoff 4894 itemsize 13
                  index 195 namelen 3 name: 193
          item 181 key (450 XATTR_ITEM 1640047104) itemoff 4857 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 182 key (450 EXTENT_DATA 0) itemoff 4804 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 8192 ram 12288
                  extent compression 0 (none)
          item 183 key (450 EXTENT_DATA 8192) itemoff 4751 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096

Item 5 in the log tree corresponds to item 183 in the filesystem tree,
but nothing matches item 4. Furthermore, item 183 is the last item in
the leaf.

btrfs_log_prealloc_extents() is responsible for logging prealloc extents
beyond i_size. It first truncates any previously logged prealloc extents
that start beyond i_size. Then, it walks the filesystem tree and copies
the prealloc extent items to the log tree.

If it hits the end of a leaf, then it calls btrfs_next_leaf(), which
unlocks the tree and does another search. However, while the filesystem
tree is unlocked, an ordered extent completion may modify the tree. In
particular, it may insert an extent item that overlaps with an extent
item that was already copied to the log tree.

This may manifest in several ways depending on the exact scenario,
including an EEXIST error that is silently translated to a full sync,
overlapping items in the log tree, or this crash. This particular crash
is triggered by the following sequence of events:

- Initially, the file has i_size=4k, a regular extent from 0-4k, and a
  prealloc extent beyond i_size from 4k-12k. The prealloc extent item is
  the last item in its B-tree leaf.
- The file is fsync'd, which copies its inode item and both extent items
  to the log tree.
- An xattr is set on the file, which sets the
  BTRFS_INODE_COPY_EVERYTHING flag.
- The range 4k-8k in the file is written using direct I/O. i_size is
  extended to 8k, but the ordered extent is still in flight.
- The file is fsync'd. Since BTRFS_INODE_COPY_EVERYTHING is set, this
  calls copy_inode_items_to_log(), which calls
  btrfs_log_prealloc_extents().
- btrfs_log_prealloc_extents() finds the 4k-12k prealloc extent in the
  filesystem tree. Since it starts before i_size, it skips it. Since it
  is the last item in its B-tree leaf, it calls btrfs_next_leaf().
- btrfs_next_leaf() unlocks the path.
- The ordered extent completion runs, which converts the 4k-8k part of
  the prealloc extent to written and inserts the remaining prealloc part
  from 8k-12k.
- btrfs_next_leaf() does a search and finds the new prealloc extent
  8k-12k.
- btrfs_log_prealloc_extents() copies the 8k-12k prealloc extent into
  the log tree. Note that it overlaps with the 4k-12k prealloc extent
  that was copied to the log tree by the first fsync.
- fsync calls btrfs_log_changed_extents(), which tries to log the 4k-8k
  extent that was written.
- This tries to drop the range 4k-8k in the log tree, which requires
  adjusting the start of the 4k-12k prealloc extent in the log tree to
  8k.
- btrfs_set_item_key_safe() sees that there is already an extent
  starting at 8k in the log tree and calls BUG().

Fix this by detecting when we're about to insert an overlapping file
extent item in the log tree and truncating the part that would overlap.

CC: [email protected] # 6.1+
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: David Sterba <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 88ce010 ]

The session has a header in it which contains a perf env with
bpf_progs. The bpf_progs are accessed by the sideband thread and so
the sideband thread must be stopped before the session is deleted, to
avoid a use after free.  This error was detected by AddressSanitizer
in the following:

  ==2054673==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000161e00 at pc 0x55769289de54 bp 0x7f9df36d4ab0 sp 0x7f9df36d4aa8
  READ of size 8 at 0x61d000161e00 thread T1
      #0 0x55769289de53 in __perf_env__insert_bpf_prog_info util/env.c:42
      #1 0x55769289dbb1 in perf_env__insert_bpf_prog_info util/env.c:29
      #2 0x557692bbae29 in perf_env__add_bpf_info util/bpf-event.c:483
      #3 0x557692bbb01a in bpf_event__sb_cb util/bpf-event.c:512
      #4 0x5576928b75f4 in perf_evlist__poll_thread util/sideband_evlist.c:68
      #5 0x7f9df96a63eb in start_thread nptl/pthread_create.c:444
      #6 0x7f9df9726a4b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

  0x61d000161e00 is located 384 bytes inside of 2136-byte region [0x61d000161c80,0x61d0001624d8)
  freed by thread T0 here:
      #0 0x7f9dfa6d7288 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52
      #1 0x557692978d50 in perf_session__delete util/session.c:319
      #2 0x557692673959 in __cmd_record tools/perf/builtin-record.c:2884
      #3 0x55769267a9f0 in cmd_record tools/perf/builtin-record.c:4259
      #4 0x55769286710c in run_builtin tools/perf/perf.c:349
      #5 0x557692867678 in handle_internal_command tools/perf/perf.c:402
      #6 0x557692867a40 in run_argv tools/perf/perf.c:446
      #7 0x557692867fae in main tools/perf/perf.c:562
      #8 0x7f9df96456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: 657ee55 ("perf evlist: Introduce side band thread")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 769e6a1 ]

ui_browser__show() is capturing the input title that is stack allocated
memory in hist_browser__run().

Avoid a use after return by strdup-ing the string.

Committer notes:

Further explanation from Ian Rogers:

My command line using tui is:
$ sudo bash -c 'rm /tmp/asan.log*; export
ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a
sleep 1; /tmp/perf/perf mem report'
I then go to the perf annotate view and quit. This triggers the asan
error (from the log file):
```
==1254591==ERROR: AddressSanitizer: stack-use-after-return on address
0x7f2813331920 at pc 0x7f28180
65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10
READ of size 80 at 0x7f2813331920 thread T0
    #0 0x7f2818065990 in __interceptor_strlen
../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461
    #1 0x7f2817698251 in SLsmg_write_wrapped_string
(/lib/x86_64-linux-gnu/libslang.so.2+0x98251)
    #2 0x7f28176984b9 in SLsmg_write_nstring
(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9)
    #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60
    #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266
    #5 0x55c94045c776 in ui_browser__show ui/browser.c:288
    #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206
    #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458
    #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412
    #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527
    #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613
    #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661
    #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671
    #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141
    #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805
    #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374
    #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516
    #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350
    #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403
    #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447
    #20 0x55c9400e53ad in main tools/perf/perf.c:561
    #21 0x7f28170456c9 in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360
    #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId:
84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93)

Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame
    #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746

  This frame has 1 object(s):
    [32, 192) 'title' (line 747) <== Memory access at offset 32 is
inside this variable
HINT: this may be a false positive if your program uses some custom
stack unwind mechanism, swapcontext or vfork
```
hist_browser__run isn't on the stack so the asan error looks legit.
There's no clean init/exit on struct ui_browser so I may be trading a
use-after-return for a memory leak, but that seems look a good trade
anyway.

Fixes: 05e8b08 ("perf ui browser: Stop using 'self'")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ben Gainey <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Li Dong <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Paran Lee <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Sun Haiyong <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yanteng Si <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
commit c2274b9 upstream.

The reader code in rb_get_reader_page() swaps a new reader page into the
ring buffer by doing cmpxchg on old->list.prev->next to point it to the
new page. Following that, if the operation is successful,
old->list.next->prev gets updated too. This means the underlying
doubly-linked list is temporarily inconsistent, page->prev->next or
page->next->prev might not be equal back to page for some page in the
ring buffer.

The resize operation in ring_buffer_resize() can be invoked in parallel.
It calls rb_check_pages() which can detect the described inconsistency
and stop further tracing:

[  190.271762] ------------[ cut here ]------------
[  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
[  190.271789] Modules linked in: [...]
[  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
[  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
[  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
[  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
[  190.272023] Code: [...]
[  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
[  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
[  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
[  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
[  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
[  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
[  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
[  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
[  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  190.272077] Call Trace:
[  190.272098]  <TASK>
[  190.272189]  ring_buffer_resize+0x2ab/0x460
[  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
[  190.272206]  tracing_resize_ring_buffer+0x65/0x90
[  190.272216]  tracing_entries_write+0x74/0xc0
[  190.272225]  vfs_write+0xf5/0x420
[  190.272248]  ksys_write+0x67/0xe0
[  190.272256]  do_syscall_64+0x82/0x170
[  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  190.272373] RIP: 0033:0x7f1bd657d263
[  190.272381] Code: [...]
[  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
[  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
[  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
[  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
[  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
[  190.272412]  </TASK>
[  190.272414] ---[ end trace 0000000000000000 ]---

Note that ring_buffer_resize() calls rb_check_pages() only if the parent
trace_buffer has recording disabled. Recent commit d78ab79
("tracing: Stop current tracer when resizing buffer") causes that it is
now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help
reproducing it, one can add a delay loop in rb_get_reader_page():

 ret = rb_head_page_replace(reader, cpu_buffer->reader_page);
 if (!ret)
 	goto spin;
 for (unsigned i = 0; i < 1U << 26; i++)  /* inserted delay loop */
 	__asm__ __volatile__ ("" : : : "memory");
 rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;

.. and then run the following commands on the target system:

 echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
 while true; do
 	echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 	echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 done &
 while true; do
 	for i in /sys/kernel/tracing/per_cpu/*; do
 		timeout 0.1 cat $i/trace_pipe; sleep 0.2
 	done
 done

To fix the problem, make sure ring_buffer_resize() doesn't invoke
rb_check_pages() concurrently with a reader operating on the same
ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]

Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 659f451 ("ring-buffer: Add integrity check at end of iter read")
Signed-off-by: Petr Pavlu <[email protected]>
[ Fixed whitespace ]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 88ce010 ]

The session has a header in it which contains a perf env with
bpf_progs. The bpf_progs are accessed by the sideband thread and so
the sideband thread must be stopped before the session is deleted, to
avoid a use after free.  This error was detected by AddressSanitizer
in the following:

  ==2054673==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000161e00 at pc 0x55769289de54 bp 0x7f9df36d4ab0 sp 0x7f9df36d4aa8
  READ of size 8 at 0x61d000161e00 thread T1
      #0 0x55769289de53 in __perf_env__insert_bpf_prog_info util/env.c:42
      #1 0x55769289dbb1 in perf_env__insert_bpf_prog_info util/env.c:29
      #2 0x557692bbae29 in perf_env__add_bpf_info util/bpf-event.c:483
      #3 0x557692bbb01a in bpf_event__sb_cb util/bpf-event.c:512
      #4 0x5576928b75f4 in perf_evlist__poll_thread util/sideband_evlist.c:68
      #5 0x7f9df96a63eb in start_thread nptl/pthread_create.c:444
      #6 0x7f9df9726a4b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

  0x61d000161e00 is located 384 bytes inside of 2136-byte region [0x61d000161c80,0x61d0001624d8)
  freed by thread T0 here:
      #0 0x7f9dfa6d7288 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52
      #1 0x557692978d50 in perf_session__delete util/session.c:319
      #2 0x557692673959 in __cmd_record tools/perf/builtin-record.c:2884
      #3 0x55769267a9f0 in cmd_record tools/perf/builtin-record.c:4259
      #4 0x55769286710c in run_builtin tools/perf/perf.c:349
      #5 0x557692867678 in handle_internal_command tools/perf/perf.c:402
      #6 0x557692867a40 in run_argv tools/perf/perf.c:446
      #7 0x557692867fae in main tools/perf/perf.c:562
      #8 0x7f9df96456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: 657ee55 ("perf evlist: Introduce side band thread")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 769e6a1 ]

ui_browser__show() is capturing the input title that is stack allocated
memory in hist_browser__run().

Avoid a use after return by strdup-ing the string.

Committer notes:

Further explanation from Ian Rogers:

My command line using tui is:
$ sudo bash -c 'rm /tmp/asan.log*; export
ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a
sleep 1; /tmp/perf/perf mem report'
I then go to the perf annotate view and quit. This triggers the asan
error (from the log file):
```
==1254591==ERROR: AddressSanitizer: stack-use-after-return on address
0x7f2813331920 at pc 0x7f28180
65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10
READ of size 80 at 0x7f2813331920 thread T0
    #0 0x7f2818065990 in __interceptor_strlen
../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461
    #1 0x7f2817698251 in SLsmg_write_wrapped_string
(/lib/x86_64-linux-gnu/libslang.so.2+0x98251)
    #2 0x7f28176984b9 in SLsmg_write_nstring
(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9)
    #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60
    #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266
    #5 0x55c94045c776 in ui_browser__show ui/browser.c:288
    #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206
    #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458
    #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412
    #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527
    #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613
    #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661
    #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671
    #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141
    #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805
    #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374
    #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516
    #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350
    #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403
    #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447
    #20 0x55c9400e53ad in main tools/perf/perf.c:561
    #21 0x7f28170456c9 in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360
    #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId:
84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93)

Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame
    #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746

  This frame has 1 object(s):
    [32, 192) 'title' (line 747) <== Memory access at offset 32 is
inside this variable
HINT: this may be a false positive if your program uses some custom
stack unwind mechanism, swapcontext or vfork
```
hist_browser__run isn't on the stack so the asan error looks legit.
There's no clean init/exit on struct ui_browser so I may be trading a
use-after-return for a memory leak, but that seems look a good trade
anyway.

Fixes: 05e8b08 ("perf ui browser: Stop using 'self'")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ben Gainey <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Li Dong <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Paran Lee <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Sun Haiyong <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yanteng Si <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
commit c2274b9 upstream.

The reader code in rb_get_reader_page() swaps a new reader page into the
ring buffer by doing cmpxchg on old->list.prev->next to point it to the
new page. Following that, if the operation is successful,
old->list.next->prev gets updated too. This means the underlying
doubly-linked list is temporarily inconsistent, page->prev->next or
page->next->prev might not be equal back to page for some page in the
ring buffer.

The resize operation in ring_buffer_resize() can be invoked in parallel.
It calls rb_check_pages() which can detect the described inconsistency
and stop further tracing:

[  190.271762] ------------[ cut here ]------------
[  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
[  190.271789] Modules linked in: [...]
[  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
[  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
[  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
[  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
[  190.272023] Code: [...]
[  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
[  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
[  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
[  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
[  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
[  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
[  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
[  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
[  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  190.272077] Call Trace:
[  190.272098]  <TASK>
[  190.272189]  ring_buffer_resize+0x2ab/0x460
[  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
[  190.272206]  tracing_resize_ring_buffer+0x65/0x90
[  190.272216]  tracing_entries_write+0x74/0xc0
[  190.272225]  vfs_write+0xf5/0x420
[  190.272248]  ksys_write+0x67/0xe0
[  190.272256]  do_syscall_64+0x82/0x170
[  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  190.272373] RIP: 0033:0x7f1bd657d263
[  190.272381] Code: [...]
[  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
[  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
[  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
[  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
[  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
[  190.272412]  </TASK>
[  190.272414] ---[ end trace 0000000000000000 ]---

Note that ring_buffer_resize() calls rb_check_pages() only if the parent
trace_buffer has recording disabled. Recent commit d78ab79
("tracing: Stop current tracer when resizing buffer") causes that it is
now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help
reproducing it, one can add a delay loop in rb_get_reader_page():

 ret = rb_head_page_replace(reader, cpu_buffer->reader_page);
 if (!ret)
 	goto spin;
 for (unsigned i = 0; i < 1U << 26; i++)  /* inserted delay loop */
 	__asm__ __volatile__ ("" : : : "memory");
 rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;

.. and then run the following commands on the target system:

 echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
 while true; do
 	echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 	echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 done &
 while true; do
 	for i in /sys/kernel/tracing/per_cpu/*; do
 		timeout 0.1 cat $i/trace_pipe; sleep 0.2
 	done
 done

To fix the problem, make sure ring_buffer_resize() doesn't invoke
rb_check_pages() concurrently with a reader operating on the same
ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]

Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 659f451 ("ring-buffer: Add integrity check at end of iter read")
Signed-off-by: Petr Pavlu <[email protected]>
[ Fixed whitespace ]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 88ce010 ]

The session has a header in it which contains a perf env with
bpf_progs. The bpf_progs are accessed by the sideband thread and so
the sideband thread must be stopped before the session is deleted, to
avoid a use after free.  This error was detected by AddressSanitizer
in the following:

  ==2054673==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000161e00 at pc 0x55769289de54 bp 0x7f9df36d4ab0 sp 0x7f9df36d4aa8
  READ of size 8 at 0x61d000161e00 thread T1
      #0 0x55769289de53 in __perf_env__insert_bpf_prog_info util/env.c:42
      #1 0x55769289dbb1 in perf_env__insert_bpf_prog_info util/env.c:29
      #2 0x557692bbae29 in perf_env__add_bpf_info util/bpf-event.c:483
      #3 0x557692bbb01a in bpf_event__sb_cb util/bpf-event.c:512
      #4 0x5576928b75f4 in perf_evlist__poll_thread util/sideband_evlist.c:68
      #5 0x7f9df96a63eb in start_thread nptl/pthread_create.c:444
      #6 0x7f9df9726a4b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

  0x61d000161e00 is located 384 bytes inside of 2136-byte region [0x61d000161c80,0x61d0001624d8)
  freed by thread T0 here:
      #0 0x7f9dfa6d7288 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52
      #1 0x557692978d50 in perf_session__delete util/session.c:319
      #2 0x557692673959 in __cmd_record tools/perf/builtin-record.c:2884
      #3 0x55769267a9f0 in cmd_record tools/perf/builtin-record.c:4259
      #4 0x55769286710c in run_builtin tools/perf/perf.c:349
      #5 0x557692867678 in handle_internal_command tools/perf/perf.c:402
      #6 0x557692867a40 in run_argv tools/perf/perf.c:446
      #7 0x557692867fae in main tools/perf/perf.c:562
      #8 0x7f9df96456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Fixes: 657ee55 ("perf evlist: Introduce side band thread")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 13, 2024
[ Upstream commit 769e6a1 ]

ui_browser__show() is capturing the input title that is stack allocated
memory in hist_browser__run().

Avoid a use after return by strdup-ing the string.

Committer notes:

Further explanation from Ian Rogers:

My command line using tui is:
$ sudo bash -c 'rm /tmp/asan.log*; export
ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a
sleep 1; /tmp/perf/perf mem report'
I then go to the perf annotate view and quit. This triggers the asan
error (from the log file):
```
==1254591==ERROR: AddressSanitizer: stack-use-after-return on address
0x7f2813331920 at pc 0x7f28180
65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10
READ of size 80 at 0x7f2813331920 thread T0
    #0 0x7f2818065990 in __interceptor_strlen
../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461
    #1 0x7f2817698251 in SLsmg_write_wrapped_string
(/lib/x86_64-linux-gnu/libslang.so.2+0x98251)
    #2 0x7f28176984b9 in SLsmg_write_nstring
(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9)
    #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60
    #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266
    #5 0x55c94045c776 in ui_browser__show ui/browser.c:288
    #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206
    #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458
    #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412
    #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527
    #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613
    #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661
    #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671
    #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141
    #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805
    #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374
    #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516
    #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350
    #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403
    #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447
    #20 0x55c9400e53ad in main tools/perf/perf.c:561
    #21 0x7f28170456c9 in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360
    #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId:
84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93)

Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame
    #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746

  This frame has 1 object(s):
    [32, 192) 'title' (line 747) <== Memory access at offset 32 is
inside this variable
HINT: this may be a false positive if your program uses some custom
stack unwind mechanism, swapcontext or vfork
```
hist_browser__run isn't on the stack so the asan error looks legit.
There's no clean init/exit on struct ui_browser so I may be trading a
use-after-return for a memory leak, but that seems look a good trade
anyway.

Fixes: 05e8b08 ("perf ui browser: Stop using 'self'")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ben Gainey <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Li Dong <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Paran Lee <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Sun Haiyong <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Yanteng Si <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 17, 2024
…PLES event"

commit 5b3cde1 upstream.

This reverts commit 7d1405c.

This causes segfaults in some cases, as reported by Milian:

  ```
  sudo /usr/bin/perf record -z --call-graph dwarf -e cycles -e
  raw_syscalls:sys_enter ls
  ...
  [ perf record: Woken up 3 times to write data ]
  malloc(): invalid next size (unsorted)
  Aborted
  ```

  Backtrace with GDB + debuginfod:

  ```
  malloc(): invalid next size (unsorted)

  Thread 1 "perf" received signal SIGABRT, Aborted.
  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
  no_tid=no_tid@entry=0) at pthread_kill.c:44
  Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_kill.c
  44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
  (ret) : 0;
  (gdb) bt
  #0  __pthread_kill_implementation (threadid=<optimized out>,
  signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
  #1  0x00007ffff6ea8eb3 in __pthread_kill_internal (threadid=<optimized out>,
  signo=6) at pthread_kill.c:78
  #2  0x00007ffff6e50a30 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/
  raise.c:26
  #3  0x00007ffff6e384c3 in __GI_abort () at abort.c:79
  #4  0x00007ffff6e39354 in __libc_message_impl (fmt=fmt@entry=0x7ffff6fc22ea
  "%s\n") at ../sysdeps/posix/libc_fatal.c:132
  #5  0x00007ffff6eb3085 in malloc_printerr (str=str@entry=0x7ffff6fc5850
  "malloc(): invalid next size (unsorted)") at malloc.c:5772
  #6  0x00007ffff6eb657c in _int_malloc (av=av@entry=0x7ffff6ff6ac0
  <main_arena>, bytes=bytes@entry=368) at malloc.c:4081
  #7  0x00007ffff6eb877e in __libc_calloc (n=<optimized out>,
  elem_size=<optimized out>) at malloc.c:3754
  #8  0x000055555569bdb6 in perf_session.do_write_header ()
  #9  0x00005555555a373a in __cmd_record.constprop.0 ()
  #10 0x00005555555a6846 in cmd_record ()
  #11 0x000055555564db7f in run_builtin ()
  #12 0x000055555558ed77 in main ()
  ```

  Valgrind memcheck:
  ```
  ==45136== Invalid write of size 8
  ==45136==    at 0x2B38A5: perf_event__synthesize_id_sample (in /usr/bin/perf)
  ==45136==    by 0x157069: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==  Address 0x6a866a8 is 0 bytes after a block of size 40 alloc'd
  ==45136==    at 0x4849BF3: calloc (vg_replace_malloc.c:1675)
  ==45136==    by 0x3574AB: zalloc (in /usr/bin/perf)
  ==45136==    by 0x1570E0: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==
  ==45136== Syscall param write(buf) points to unaddressable byte(s)
  ==45136==    at 0x575953D: __libc_write (write.c:26)
  ==45136==    by 0x575953D: write (write.c:24)
  ==45136==    by 0x35761F: ion (in /usr/bin/perf)
  ==45136==    by 0x357778: writen (in /usr/bin/perf)
  ==45136==    by 0x1548F7: record__write (in /usr/bin/perf)
  ==45136==    by 0x15708A: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==  Address 0x6a866a8 is 0 bytes after a block of size 40 alloc'd
  ==45136==    at 0x4849BF3: calloc (vg_replace_malloc.c:1675)
  ==45136==    by 0x3574AB: zalloc (in /usr/bin/perf)
  ==45136==    by 0x1570E0: __cmd_record.constprop.0 (in /usr/bin/perf)
  ==45136==    by 0x15A845: cmd_record (in /usr/bin/perf)
  ==45136==    by 0x201B7E: run_builtin (in /usr/bin/perf)
  ==45136==    by 0x142D76: main (in /usr/bin/perf)
  ==45136==
 -----

Closes: https://lore.kernel.org/linux-perf-users/23879991.0LEYPuXRzz@milian-workstation/
Reported-by: Milian Wolff <[email protected]>
Tested-by: Milian Wolff <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected] # 6.8+
Link: https://lore.kernel.org/lkml/Zl9ksOlHJHnKM70p@x1
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 17, 2024
commit 9d274c1 upstream.

We have been seeing crashes on duplicate keys in
btrfs_set_item_key_safe():

  BTRFS critical (device vdb): slot 4 key (450 108 8192) new key (450 108 8192)
  ------------[ cut here ]------------
  kernel BUG at fs/btrfs/ctree.c:2620!
  invalid opcode: 0000 [#1] PREEMPT SMP PTI
  CPU: 0 PID: 3139 Comm: xfs_io Kdump: loaded Not tainted 6.9.0 #6
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
  RIP: 0010:btrfs_set_item_key_safe+0x11f/0x290 [btrfs]

With the following stack trace:

  #0  btrfs_set_item_key_safe (fs/btrfs/ctree.c:2620:4)
  #1  btrfs_drop_extents (fs/btrfs/file.c:411:4)
  #2  log_one_extent (fs/btrfs/tree-log.c:4732:9)
  #3  btrfs_log_changed_extents (fs/btrfs/tree-log.c:4955:9)
  #4  btrfs_log_inode (fs/btrfs/tree-log.c:6626:9)
  #5  btrfs_log_inode_parent (fs/btrfs/tree-log.c:7070:8)
  #6  btrfs_log_dentry_safe (fs/btrfs/tree-log.c:7171:8)
  #7  btrfs_sync_file (fs/btrfs/file.c:1933:8)
  #8  vfs_fsync_range (fs/sync.c:188:9)
  #9  vfs_fsync (fs/sync.c:202:9)
  #10 do_fsync (fs/sync.c:212:9)
  #11 __do_sys_fdatasync (fs/sync.c:225:9)
  #12 __se_sys_fdatasync (fs/sync.c:223:1)
  #13 __x64_sys_fdatasync (fs/sync.c:223:1)
  #14 do_syscall_x64 (arch/x86/entry/common.c:52:14)
  #15 do_syscall_64 (arch/x86/entry/common.c:83:7)
  #16 entry_SYSCALL_64+0xaf/0x14c (arch/x86/entry/entry_64.S:121)

So we're logging a changed extent from fsync, which is splitting an
extent in the log tree. But this split part already exists in the tree,
triggering the BUG().

This is the state of the log tree at the time of the crash, dumped with
drgn (https://github.com/osandov/drgn/blob/main/contrib/btrfs_tree.py)
to get more details than btrfs_print_leaf() gives us:

  >>> print_extent_buffer(prog.crashed_thread().stack_trace()[0]["eb"])
  leaf 33439744 level 0 items 72 generation 9 owner 18446744073709551610
  leaf 33439744 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
          item 0 key (450 INODE_ITEM 0) itemoff 16123 itemsize 160
                  generation 7 transid 9 size 8192 nbytes 8473563889606862198
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 204 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417704.983333333 (2024-05-22 15:41:44)
                  mtime 1716417704.983333333 (2024-05-22 15:41:44)
                  otime 17592186044416.000000000 (559444-03-08 01:40:16)
          item 1 key (450 INODE_REF 256) itemoff 16110 itemsize 13
                  index 195 namelen 3 name: 193
          item 2 key (450 XATTR_ITEM 1640047104) itemoff 16073 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 3 key (450 EXTENT_DATA 0) itemoff 16020 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 4096 ram 12288
                  extent compression 0 (none)
          item 4 key (450 EXTENT_DATA 4096) itemoff 15967 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 4096 nr 8192
          item 5 key (450 EXTENT_DATA 8192) itemoff 15914 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096
  ...

So the real problem happened earlier: notice that items 4 (4k-12k) and 5
(8k-12k) overlap. Both are prealloc extents. Item 4 straddles i_size and
item 5 starts at i_size.

Here is the state of the filesystem tree at the time of the crash:

  >>> root = prog.crashed_thread().stack_trace()[2]["inode"].root
  >>> ret, nodes, slots = btrfs_search_slot(root, BtrfsKey(450, 0, 0))
  >>> print_extent_buffer(nodes[0])
  leaf 30425088 level 0 items 184 generation 9 owner 5
  leaf 30425088 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
  	...
          item 179 key (450 INODE_ITEM 0) itemoff 4907 itemsize 160
                  generation 7 transid 7 size 4096 nbytes 12288
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 6 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417703.220000000 (2024-05-22 15:41:43)
                  mtime 1716417703.220000000 (2024-05-22 15:41:43)
                  otime 1716417703.220000000 (2024-05-22 15:41:43)
          item 180 key (450 INODE_REF 256) itemoff 4894 itemsize 13
                  index 195 namelen 3 name: 193
          item 181 key (450 XATTR_ITEM 1640047104) itemoff 4857 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 182 key (450 EXTENT_DATA 0) itemoff 4804 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 8192 ram 12288
                  extent compression 0 (none)
          item 183 key (450 EXTENT_DATA 8192) itemoff 4751 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096

Item 5 in the log tree corresponds to item 183 in the filesystem tree,
but nothing matches item 4. Furthermore, item 183 is the last item in
the leaf.

btrfs_log_prealloc_extents() is responsible for logging prealloc extents
beyond i_size. It first truncates any previously logged prealloc extents
that start beyond i_size. Then, it walks the filesystem tree and copies
the prealloc extent items to the log tree.

If it hits the end of a leaf, then it calls btrfs_next_leaf(), which
unlocks the tree and does another search. However, while the filesystem
tree is unlocked, an ordered extent completion may modify the tree. In
particular, it may insert an extent item that overlaps with an extent
item that was already copied to the log tree.

This may manifest in several ways depending on the exact scenario,
including an EEXIST error that is silently translated to a full sync,
overlapping items in the log tree, or this crash. This particular crash
is triggered by the following sequence of events:

- Initially, the file has i_size=4k, a regular extent from 0-4k, and a
  prealloc extent beyond i_size from 4k-12k. The prealloc extent item is
  the last item in its B-tree leaf.
- The file is fsync'd, which copies its inode item and both extent items
  to the log tree.
- An xattr is set on the file, which sets the
  BTRFS_INODE_COPY_EVERYTHING flag.
- The range 4k-8k in the file is written using direct I/O. i_size is
  extended to 8k, but the ordered extent is still in flight.
- The file is fsync'd. Since BTRFS_INODE_COPY_EVERYTHING is set, this
  calls copy_inode_items_to_log(), which calls
  btrfs_log_prealloc_extents().
- btrfs_log_prealloc_extents() finds the 4k-12k prealloc extent in the
  filesystem tree. Since it starts before i_size, it skips it. Since it
  is the last item in its B-tree leaf, it calls btrfs_next_leaf().
- btrfs_next_leaf() unlocks the path.
- The ordered extent completion runs, which converts the 4k-8k part of
  the prealloc extent to written and inserts the remaining prealloc part
  from 8k-12k.
- btrfs_next_leaf() does a search and finds the new prealloc extent
  8k-12k.
- btrfs_log_prealloc_extents() copies the 8k-12k prealloc extent into
  the log tree. Note that it overlaps with the 4k-12k prealloc extent
  that was copied to the log tree by the first fsync.
- fsync calls btrfs_log_changed_extents(), which tries to log the 4k-8k
  extent that was written.
- This tries to drop the range 4k-8k in the log tree, which requires
  adjusting the start of the 4k-12k prealloc extent in the log tree to
  8k.
- btrfs_set_item_key_safe() sees that there is already an extent
  starting at 8k in the log tree and calls BUG().

Fix this by detecting when we're about to insert an overlapping file
extent item in the log tree and truncating the part that would overlap.

CC: [email protected] # 6.1+
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 17, 2024
commit 9d274c1 upstream.

We have been seeing crashes on duplicate keys in
btrfs_set_item_key_safe():

  BTRFS critical (device vdb): slot 4 key (450 108 8192) new key (450 108 8192)
  ------------[ cut here ]------------
  kernel BUG at fs/btrfs/ctree.c:2620!
  invalid opcode: 0000 [#1] PREEMPT SMP PTI
  CPU: 0 PID: 3139 Comm: xfs_io Kdump: loaded Not tainted 6.9.0 #6
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
  RIP: 0010:btrfs_set_item_key_safe+0x11f/0x290 [btrfs]

With the following stack trace:

  #0  btrfs_set_item_key_safe (fs/btrfs/ctree.c:2620:4)
  #1  btrfs_drop_extents (fs/btrfs/file.c:411:4)
  #2  log_one_extent (fs/btrfs/tree-log.c:4732:9)
  #3  btrfs_log_changed_extents (fs/btrfs/tree-log.c:4955:9)
  #4  btrfs_log_inode (fs/btrfs/tree-log.c:6626:9)
  #5  btrfs_log_inode_parent (fs/btrfs/tree-log.c:7070:8)
  #6  btrfs_log_dentry_safe (fs/btrfs/tree-log.c:7171:8)
  #7  btrfs_sync_file (fs/btrfs/file.c:1933:8)
  #8  vfs_fsync_range (fs/sync.c:188:9)
  #9  vfs_fsync (fs/sync.c:202:9)
  #10 do_fsync (fs/sync.c:212:9)
  #11 __do_sys_fdatasync (fs/sync.c:225:9)
  #12 __se_sys_fdatasync (fs/sync.c:223:1)
  #13 __x64_sys_fdatasync (fs/sync.c:223:1)
  #14 do_syscall_x64 (arch/x86/entry/common.c:52:14)
  #15 do_syscall_64 (arch/x86/entry/common.c:83:7)
  #16 entry_SYSCALL_64+0xaf/0x14c (arch/x86/entry/entry_64.S:121)

So we're logging a changed extent from fsync, which is splitting an
extent in the log tree. But this split part already exists in the tree,
triggering the BUG().

This is the state of the log tree at the time of the crash, dumped with
drgn (https://github.com/osandov/drgn/blob/main/contrib/btrfs_tree.py)
to get more details than btrfs_print_leaf() gives us:

  >>> print_extent_buffer(prog.crashed_thread().stack_trace()[0]["eb"])
  leaf 33439744 level 0 items 72 generation 9 owner 18446744073709551610
  leaf 33439744 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
          item 0 key (450 INODE_ITEM 0) itemoff 16123 itemsize 160
                  generation 7 transid 9 size 8192 nbytes 8473563889606862198
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 204 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417704.983333333 (2024-05-22 15:41:44)
                  mtime 1716417704.983333333 (2024-05-22 15:41:44)
                  otime 17592186044416.000000000 (559444-03-08 01:40:16)
          item 1 key (450 INODE_REF 256) itemoff 16110 itemsize 13
                  index 195 namelen 3 name: 193
          item 2 key (450 XATTR_ITEM 1640047104) itemoff 16073 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 3 key (450 EXTENT_DATA 0) itemoff 16020 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 4096 ram 12288
                  extent compression 0 (none)
          item 4 key (450 EXTENT_DATA 4096) itemoff 15967 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 4096 nr 8192
          item 5 key (450 EXTENT_DATA 8192) itemoff 15914 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096
  ...

So the real problem happened earlier: notice that items 4 (4k-12k) and 5
(8k-12k) overlap. Both are prealloc extents. Item 4 straddles i_size and
item 5 starts at i_size.

Here is the state of the filesystem tree at the time of the crash:

  >>> root = prog.crashed_thread().stack_trace()[2]["inode"].root
  >>> ret, nodes, slots = btrfs_search_slot(root, BtrfsKey(450, 0, 0))
  >>> print_extent_buffer(nodes[0])
  leaf 30425088 level 0 items 184 generation 9 owner 5
  leaf 30425088 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
  	...
          item 179 key (450 INODE_ITEM 0) itemoff 4907 itemsize 160
                  generation 7 transid 7 size 4096 nbytes 12288
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 6 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417703.220000000 (2024-05-22 15:41:43)
                  mtime 1716417703.220000000 (2024-05-22 15:41:43)
                  otime 1716417703.220000000 (2024-05-22 15:41:43)
          item 180 key (450 INODE_REF 256) itemoff 4894 itemsize 13
                  index 195 namelen 3 name: 193
          item 181 key (450 XATTR_ITEM 1640047104) itemoff 4857 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 182 key (450 EXTENT_DATA 0) itemoff 4804 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 8192 ram 12288
                  extent compression 0 (none)
          item 183 key (450 EXTENT_DATA 8192) itemoff 4751 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096

Item 5 in the log tree corresponds to item 183 in the filesystem tree,
but nothing matches item 4. Furthermore, item 183 is the last item in
the leaf.

btrfs_log_prealloc_extents() is responsible for logging prealloc extents
beyond i_size. It first truncates any previously logged prealloc extents
that start beyond i_size. Then, it walks the filesystem tree and copies
the prealloc extent items to the log tree.

If it hits the end of a leaf, then it calls btrfs_next_leaf(), which
unlocks the tree and does another search. However, while the filesystem
tree is unlocked, an ordered extent completion may modify the tree. In
particular, it may insert an extent item that overlaps with an extent
item that was already copied to the log tree.

This may manifest in several ways depending on the exact scenario,
including an EEXIST error that is silently translated to a full sync,
overlapping items in the log tree, or this crash. This particular crash
is triggered by the following sequence of events:

- Initially, the file has i_size=4k, a regular extent from 0-4k, and a
  prealloc extent beyond i_size from 4k-12k. The prealloc extent item is
  the last item in its B-tree leaf.
- The file is fsync'd, which copies its inode item and both extent items
  to the log tree.
- An xattr is set on the file, which sets the
  BTRFS_INODE_COPY_EVERYTHING flag.
- The range 4k-8k in the file is written using direct I/O. i_size is
  extended to 8k, but the ordered extent is still in flight.
- The file is fsync'd. Since BTRFS_INODE_COPY_EVERYTHING is set, this
  calls copy_inode_items_to_log(), which calls
  btrfs_log_prealloc_extents().
- btrfs_log_prealloc_extents() finds the 4k-12k prealloc extent in the
  filesystem tree. Since it starts before i_size, it skips it. Since it
  is the last item in its B-tree leaf, it calls btrfs_next_leaf().
- btrfs_next_leaf() unlocks the path.
- The ordered extent completion runs, which converts the 4k-8k part of
  the prealloc extent to written and inserts the remaining prealloc part
  from 8k-12k.
- btrfs_next_leaf() does a search and finds the new prealloc extent
  8k-12k.
- btrfs_log_prealloc_extents() copies the 8k-12k prealloc extent into
  the log tree. Note that it overlaps with the 4k-12k prealloc extent
  that was copied to the log tree by the first fsync.
- fsync calls btrfs_log_changed_extents(), which tries to log the 4k-8k
  extent that was written.
- This tries to drop the range 4k-8k in the log tree, which requires
  adjusting the start of the 4k-12k prealloc extent in the log tree to
  8k.
- btrfs_set_item_key_safe() sees that there is already an extent
  starting at 8k in the log tree and calls BUG().

Fix this by detecting when we're about to insert an overlapping file
extent item in the log tree and truncating the part that would overlap.

CC: [email protected] # 6.1+
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 17, 2024
commit 9d274c1 upstream.

We have been seeing crashes on duplicate keys in
btrfs_set_item_key_safe():

  BTRFS critical (device vdb): slot 4 key (450 108 8192) new key (450 108 8192)
  ------------[ cut here ]------------
  kernel BUG at fs/btrfs/ctree.c:2620!
  invalid opcode: 0000 [#1] PREEMPT SMP PTI
  CPU: 0 PID: 3139 Comm: xfs_io Kdump: loaded Not tainted 6.9.0 #6
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
  RIP: 0010:btrfs_set_item_key_safe+0x11f/0x290 [btrfs]

With the following stack trace:

  #0  btrfs_set_item_key_safe (fs/btrfs/ctree.c:2620:4)
  #1  btrfs_drop_extents (fs/btrfs/file.c:411:4)
  #2  log_one_extent (fs/btrfs/tree-log.c:4732:9)
  #3  btrfs_log_changed_extents (fs/btrfs/tree-log.c:4955:9)
  #4  btrfs_log_inode (fs/btrfs/tree-log.c:6626:9)
  #5  btrfs_log_inode_parent (fs/btrfs/tree-log.c:7070:8)
  #6  btrfs_log_dentry_safe (fs/btrfs/tree-log.c:7171:8)
  #7  btrfs_sync_file (fs/btrfs/file.c:1933:8)
  #8  vfs_fsync_range (fs/sync.c:188:9)
  #9  vfs_fsync (fs/sync.c:202:9)
  #10 do_fsync (fs/sync.c:212:9)
  #11 __do_sys_fdatasync (fs/sync.c:225:9)
  #12 __se_sys_fdatasync (fs/sync.c:223:1)
  #13 __x64_sys_fdatasync (fs/sync.c:223:1)
  #14 do_syscall_x64 (arch/x86/entry/common.c:52:14)
  #15 do_syscall_64 (arch/x86/entry/common.c:83:7)
  #16 entry_SYSCALL_64+0xaf/0x14c (arch/x86/entry/entry_64.S:121)

So we're logging a changed extent from fsync, which is splitting an
extent in the log tree. But this split part already exists in the tree,
triggering the BUG().

This is the state of the log tree at the time of the crash, dumped with
drgn (https://github.com/osandov/drgn/blob/main/contrib/btrfs_tree.py)
to get more details than btrfs_print_leaf() gives us:

  >>> print_extent_buffer(prog.crashed_thread().stack_trace()[0]["eb"])
  leaf 33439744 level 0 items 72 generation 9 owner 18446744073709551610
  leaf 33439744 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
          item 0 key (450 INODE_ITEM 0) itemoff 16123 itemsize 160
                  generation 7 transid 9 size 8192 nbytes 8473563889606862198
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 204 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417704.983333333 (2024-05-22 15:41:44)
                  mtime 1716417704.983333333 (2024-05-22 15:41:44)
                  otime 17592186044416.000000000 (559444-03-08 01:40:16)
          item 1 key (450 INODE_REF 256) itemoff 16110 itemsize 13
                  index 195 namelen 3 name: 193
          item 2 key (450 XATTR_ITEM 1640047104) itemoff 16073 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 3 key (450 EXTENT_DATA 0) itemoff 16020 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 4096 ram 12288
                  extent compression 0 (none)
          item 4 key (450 EXTENT_DATA 4096) itemoff 15967 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 4096 nr 8192
          item 5 key (450 EXTENT_DATA 8192) itemoff 15914 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096
  ...

So the real problem happened earlier: notice that items 4 (4k-12k) and 5
(8k-12k) overlap. Both are prealloc extents. Item 4 straddles i_size and
item 5 starts at i_size.

Here is the state of the filesystem tree at the time of the crash:

  >>> root = prog.crashed_thread().stack_trace()[2]["inode"].root
  >>> ret, nodes, slots = btrfs_search_slot(root, BtrfsKey(450, 0, 0))
  >>> print_extent_buffer(nodes[0])
  leaf 30425088 level 0 items 184 generation 9 owner 5
  leaf 30425088 flags 0x100000000000000
  fs uuid e5bd3946-400c-4223-8923-190ef1f18677
  chunk uuid d58cb17e-6d02-494a-829a-18b7d8a399da
  	...
          item 179 key (450 INODE_ITEM 0) itemoff 4907 itemsize 160
                  generation 7 transid 7 size 4096 nbytes 12288
                  block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0
                  sequence 6 flags 0x10(PREALLOC)
                  atime 1716417703.220000000 (2024-05-22 15:41:43)
                  ctime 1716417703.220000000 (2024-05-22 15:41:43)
                  mtime 1716417703.220000000 (2024-05-22 15:41:43)
                  otime 1716417703.220000000 (2024-05-22 15:41:43)
          item 180 key (450 INODE_REF 256) itemoff 4894 itemsize 13
                  index 195 namelen 3 name: 193
          item 181 key (450 XATTR_ITEM 1640047104) itemoff 4857 itemsize 37
                  location key (0 UNKNOWN.0 0) type XATTR
                  transid 7 data_len 1 name_len 6
                  name: user.a
                  data a
          item 182 key (450 EXTENT_DATA 0) itemoff 4804 itemsize 53
                  generation 9 type 1 (regular)
                  extent data disk byte 303144960 nr 12288
                  extent data offset 0 nr 8192 ram 12288
                  extent compression 0 (none)
          item 183 key (450 EXTENT_DATA 8192) itemoff 4751 itemsize 53
                  generation 9 type 2 (prealloc)
                  prealloc data disk byte 303144960 nr 12288
                  prealloc data offset 8192 nr 4096

Item 5 in the log tree corresponds to item 183 in the filesystem tree,
but nothing matches item 4. Furthermore, item 183 is the last item in
the leaf.

btrfs_log_prealloc_extents() is responsible for logging prealloc extents
beyond i_size. It first truncates any previously logged prealloc extents
that start beyond i_size. Then, it walks the filesystem tree and copies
the prealloc extent items to the log tree.

If it hits the end of a leaf, then it calls btrfs_next_leaf(), which
unlocks the tree and does another search. However, while the filesystem
tree is unlocked, an ordered extent completion may modify the tree. In
particular, it may insert an extent item that overlaps with an extent
item that was already copied to the log tree.

This may manifest in several ways depending on the exact scenario,
including an EEXIST error that is silently translated to a full sync,
overlapping items in the log tree, or this crash. This particular crash
is triggered by the following sequence of events:

- Initially, the file has i_size=4k, a regular extent from 0-4k, and a
  prealloc extent beyond i_size from 4k-12k. The prealloc extent item is
  the last item in its B-tree leaf.
- The file is fsync'd, which copies its inode item and both extent items
  to the log tree.
- An xattr is set on the file, which sets the
  BTRFS_INODE_COPY_EVERYTHING flag.
- The range 4k-8k in the file is written using direct I/O. i_size is
  extended to 8k, but the ordered extent is still in flight.
- The file is fsync'd. Since BTRFS_INODE_COPY_EVERYTHING is set, this
  calls copy_inode_items_to_log(), which calls
  btrfs_log_prealloc_extents().
- btrfs_log_prealloc_extents() finds the 4k-12k prealloc extent in the
  filesystem tree. Since it starts before i_size, it skips it. Since it
  is the last item in its B-tree leaf, it calls btrfs_next_leaf().
- btrfs_next_leaf() unlocks the path.
- The ordered extent completion runs, which converts the 4k-8k part of
  the prealloc extent to written and inserts the remaining prealloc part
  from 8k-12k.
- btrfs_next_leaf() does a search and finds the new prealloc extent
  8k-12k.
- btrfs_log_prealloc_extents() copies the 8k-12k prealloc extent into
  the log tree. Note that it overlaps with the 4k-12k prealloc extent
  that was copied to the log tree by the first fsync.
- fsync calls btrfs_log_changed_extents(), which tries to log the 4k-8k
  extent that was written.
- This tries to drop the range 4k-8k in the log tree, which requires
  adjusting the start of the 4k-12k prealloc extent in the log tree to
  8k.
- btrfs_set_item_key_safe() sees that there is already an extent
  starting at 8k in the log tree and calls BUG().

Fix this by detecting when we're about to insert an overlapping file
extent item in the log tree and truncating the part that would overlap.

CC: [email protected] # 6.1+
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Jun 18, 2024
The syzbot fuzzer found that the interrupt-URB completion callback in
the cdc-wdm driver was taking too long, and the driver's immediate
resubmission of interrupt URBs with -EPROTO status combined with the
dummy-hcd emulation to cause a CPU lockup:

cdc_wdm 1-1:1.0: nonzero urb status received: -71
cdc_wdm 1-1:1.0: wdm_int_callback - 0 bytes
watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [syz-executor782:6625]
CPU#0 Utilization every 4s during lockup:
	#1:  98% system,	  0% softirq,	  3% hardirq,	  0% idle
	#2:  98% system,	  0% softirq,	  3% hardirq,	  0% idle
	#3:  98% system,	  0% softirq,	  3% hardirq,	  0% idle
	#4:  98% system,	  0% softirq,	  3% hardirq,	  0% idle
	#5:  98% system,	  1% softirq,	  3% hardirq,	  0% idle
Modules linked in:
irq event stamp: 73096
hardirqs last  enabled at (73095): [<ffff80008037bc00>] console_emit_next_record kernel/printk/printk.c:2935 [inline]
hardirqs last  enabled at (73095): [<ffff80008037bc00>] console_flush_all+0x650/0xb74 kernel/printk/printk.c:2994
hardirqs last disabled at (73096): [<ffff80008af10b00>] __el1_irq arch/arm64/kernel/entry-common.c:533 [inline]
hardirqs last disabled at (73096): [<ffff80008af10b00>] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:551
softirqs last  enabled at (73048): [<ffff8000801ea530>] softirq_handle_end kernel/softirq.c:400 [inline]
softirqs last  enabled at (73048): [<ffff8000801ea530>] handle_softirqs+0xa60/0xc34 kernel/softirq.c:582
softirqs last disabled at (73043): [<ffff800080020de8>] __do_softirq+0x14/0x20 kernel/softirq.c:588
CPU: 0 PID: 6625 Comm: syz-executor782 Tainted: G        W          6.10.0-rc2-syzkaller-g8867bbd4a056 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024

Testing showed that the problem did not occur if the two error
messages -- the first two lines above -- were removed; apparently adding
material to the kernel log takes a surprisingly large amount of time.

In any case, the best approach for preventing these lockups and to
avoid spamming the log with thousands of error messages per second is
to ratelimit the two dev_err() calls.  Therefore we replace them with
dev_err_ratelimited().

Signed-off-by: Alan Stern <[email protected]>
Suggested-by: Greg KH <[email protected]>
Reported-and-tested-by: [email protected]
Closes: https://lore.kernel.org/linux-usb/[email protected]/
Reported-and-tested-by: [email protected]
Closes: https://lore.kernel.org/linux-usb/[email protected]/
Fixes: 9908a32 ("USB: remove err() macro from usb class drivers")
Link: https://lore.kernel.org/linux-usb/[email protected]/
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 13, 2024
commit be346c1 upstream.

The code in ocfs2_dio_end_io_write() estimates number of necessary
transaction credits using ocfs2_calc_extend_credits().  This however does
not take into account that the IO could be arbitrarily large and can
contain arbitrary number of extents.

Extent tree manipulations do often extend the current transaction but not
in all of the cases.  For example if we have only single block extents in
the tree, ocfs2_mark_extent_written() will end up calling
ocfs2_replace_extent_rec() all the time and we will never extend the
current transaction and eventually exhaust all the transaction credits if
the IO contains many single block extents.  Once that happens a
WARN_ON(jbd2_handle_buffer_credits(handle) <= 0) is triggered in
jbd2_journal_dirty_metadata() and subsequently OCFS2 aborts in response to
this error.  This was actually triggered by one of our customers on a
heavily fragmented OCFS2 filesystem.

To fix the issue make sure the transaction always has enough credits for
one extent insert before each call of ocfs2_mark_extent_written().

Heming Zhao said:

------
PANIC: "Kernel panic - not syncing: OCFS2: (device dm-1): panic forced after error"

PID: xxx  TASK: xxxx  CPU: 5  COMMAND: "SubmitThread-CA"
  #0 machine_kexec at ffffffff8c069932
  #1 __crash_kexec at ffffffff8c1338fa
  #2 panic at ffffffff8c1d69b9
  #3 ocfs2_handle_error at ffffffffc0c86c0c [ocfs2]
  #4 __ocfs2_abort at ffffffffc0c88387 [ocfs2]
  #5 ocfs2_journal_dirty at ffffffffc0c51e98 [ocfs2]
  #6 ocfs2_split_extent at ffffffffc0c27ea3 [ocfs2]
  #7 ocfs2_change_extent_flag at ffffffffc0c28053 [ocfs2]
  #8 ocfs2_mark_extent_written at ffffffffc0c28347 [ocfs2]
  #9 ocfs2_dio_end_io_write at ffffffffc0c2bef9 [ocfs2]
#10 ocfs2_dio_end_io at ffffffffc0c2c0f5 [ocfs2]
#11 dio_complete at ffffffff8c2b9fa7
#12 do_blockdev_direct_IO at ffffffff8c2bc09f
#13 ocfs2_direct_IO at ffffffffc0c2b653 [ocfs2]
#14 generic_file_direct_write at ffffffff8c1dcf14
#15 __generic_file_write_iter at ffffffff8c1dd07b
#16 ocfs2_file_write_iter at ffffffffc0c49f1f [ocfs2]
#17 aio_write at ffffffff8c2cc72e
#18 kmem_cache_alloc at ffffffff8c248dde
#19 do_io_submit at ffffffff8c2ccada
#20 do_syscall_64 at ffffffff8c004984
#21 entry_SYSCALL_64_after_hwframe at ffffffff8c8000ba

Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: c15471f ("ocfs2: fix sparse file & data ordering issue in direct io")
Signed-off-by: Jan Kara <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Reviewed-by: Heming Zhao <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 13, 2024
… __netif_rx()

[ Upstream commit e15a5d8 ]

The following is emitted when using idxd (DSA) dmanegine as the data
mover for ntb_transport that ntb_netdev uses.

[74412.546922] BUG: using smp_processor_id() in preemptible [00000000] code: irq/52-idxd-por/14526
[74412.556784] caller is netif_rx_internal+0x42/0x130
[74412.562282] CPU: 6 PID: 14526 Comm: irq/52-idxd-por Not tainted 6.9.5 #5
[74412.569870] Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.E9I.1752.P05.2402080856 02/08/2024
[74412.581699] Call Trace:
[74412.584514]  <TASK>
[74412.586933]  dump_stack_lvl+0x55/0x70
[74412.591129]  check_preemption_disabled+0xc8/0xf0
[74412.596374]  netif_rx_internal+0x42/0x130
[74412.600957]  __netif_rx+0x20/0xd0
[74412.604743]  ntb_netdev_rx_handler+0x66/0x150 [ntb_netdev]
[74412.610985]  ntb_complete_rxc+0xed/0x140 [ntb_transport]
[74412.617010]  ntb_rx_copy_callback+0x53/0x80 [ntb_transport]
[74412.623332]  idxd_dma_complete_txd+0xe3/0x160 [idxd]
[74412.628963]  idxd_wq_thread+0x1a6/0x2b0 [idxd]
[74412.634046]  irq_thread_fn+0x21/0x60
[74412.638134]  ? irq_thread+0xa8/0x290
[74412.642218]  irq_thread+0x1a0/0x290
[74412.646212]  ? __pfx_irq_thread_fn+0x10/0x10
[74412.651071]  ? __pfx_irq_thread_dtor+0x10/0x10
[74412.656117]  ? __pfx_irq_thread+0x10/0x10
[74412.660686]  kthread+0x100/0x130
[74412.664384]  ? __pfx_kthread+0x10/0x10
[74412.668639]  ret_from_fork+0x31/0x50
[74412.672716]  ? __pfx_kthread+0x10/0x10
[74412.676978]  ret_from_fork_asm+0x1a/0x30
[74412.681457]  </TASK>

The cause is due to the idxd driver interrupt completion handler uses
threaded interrupt and the threaded handler is not hard or soft interrupt
context. However __netif_rx() can only be called from interrupt context.
Change the call to netif_rx() in order to allow completion via normal
context for dmaengine drivers that utilize threaded irq handling.

While the following commit changed from netif_rx() to __netif_rx(),
baebdf4 ("net: dev: Makes sure netif_rx() can be invoked in any context."),
the change should've been a noop instead. However, the code precedes this
fix should've been using netif_rx_ni() or netif_rx_any_context().

Fixes: 548c237 ("net: Add support for NTB virtual ethernet device")
Reported-by: Jerry Dai <[email protected]>
Tested-by: Jerry Dai <[email protected]>
Signed-off-by: Dave Jiang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 23, 2024
[ Upstream commit 86a41ea ]

When l2tp tunnels use a socket provided by userspace, we can hit
lockdep splats like the below when data is transmitted through another
(unrelated) userspace socket which then gets routed over l2tp.

This issue was previously discussed here:
https://lore.kernel.org/netdev/[email protected]/

The solution is to have lockdep treat socket locks of l2tp tunnel
sockets separately than those of standard INET sockets. To do so, use
a different lockdep subclass where lock nesting is possible.

  ============================================
  WARNING: possible recursive locking detected
  6.10.0+ #34 Not tainted
  --------------------------------------------
  iperf3/771 is trying to acquire lock:
  ffff8881027601d8 (slock-AF_INET/1){+.-.}-{2:2}, at: l2tp_xmit_skb+0x243/0x9d0

  but task is already holding lock:
  ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10

  other info that might help us debug this:
   Possible unsafe locking scenario:

         CPU0
         ----
    lock(slock-AF_INET/1);
    lock(slock-AF_INET/1);

   *** DEADLOCK ***

   May be due to missing lock nesting notation

  10 locks held by iperf3/771:
   #0: ffff888102650258 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x1a/0x40
   #1: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0
   #2: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130
   #3: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x28b/0x9f0
   #4: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0xf9/0x260
   #5: ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10
   #6: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0
   #7: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130
   #8: ffffffff822ac1e0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0xcc/0x1450
   #9: ffff888101f33258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: __dev_queue_xmit+0x513/0x1450

  stack backtrace:
  CPU: 2 UID: 0 PID: 771 Comm: iperf3 Not tainted 6.10.0+ #34
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
  Call Trace:
   <IRQ>
   dump_stack_lvl+0x69/0xa0
   dump_stack+0xc/0x20
   __lock_acquire+0x135d/0x2600
   ? srso_alias_return_thunk+0x5/0xfbef5
   lock_acquire+0xc4/0x2a0
   ? l2tp_xmit_skb+0x243/0x9d0
   ? __skb_checksum+0xa3/0x540
   _raw_spin_lock_nested+0x35/0x50
   ? l2tp_xmit_skb+0x243/0x9d0
   l2tp_xmit_skb+0x243/0x9d0
   l2tp_eth_dev_xmit+0x3c/0xc0
   dev_hard_start_xmit+0x11e/0x420
   sch_direct_xmit+0xc3/0x640
   __dev_queue_xmit+0x61c/0x1450
   ? ip_finish_output2+0xf4c/0x1130
   ip_finish_output2+0x6b6/0x1130
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __ip_finish_output+0x217/0x380
   ? srso_alias_return_thunk+0x5/0xfbef5
   __ip_finish_output+0x217/0x380
   ip_output+0x99/0x120
   __ip_queue_xmit+0xae4/0xbc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? tcp_options_write.constprop.0+0xcb/0x3e0
   ip_queue_xmit+0x34/0x40
   __tcp_transmit_skb+0x1625/0x1890
   __tcp_send_ack+0x1b8/0x340
   tcp_send_ack+0x23/0x30
   __tcp_ack_snd_check+0xa8/0x530
   ? srso_alias_return_thunk+0x5/0xfbef5
   tcp_rcv_established+0x412/0xd70
   tcp_v4_do_rcv+0x299/0x420
   tcp_v4_rcv+0x1991/0x1e10
   ip_protocol_deliver_rcu+0x50/0x220
   ip_local_deliver_finish+0x158/0x260
   ip_local_deliver+0xc8/0xe0
   ip_rcv+0xe5/0x1d0
   ? __pfx_ip_rcv+0x10/0x10
   __netif_receive_skb_one_core+0xce/0xe0
   ? process_backlog+0x28b/0x9f0
   __netif_receive_skb+0x34/0xd0
   ? process_backlog+0x28b/0x9f0
   process_backlog+0x2cb/0x9f0
   __napi_poll.constprop.0+0x61/0x280
   net_rx_action+0x332/0x670
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? find_held_lock+0x2b/0x80
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   handle_softirqs+0xda/0x480
   ? __dev_queue_xmit+0xa2c/0x1450
   do_softirq+0xa1/0xd0
   </IRQ>
   <TASK>
   __local_bh_enable_ip+0xc8/0xe0
   ? __dev_queue_xmit+0xa2c/0x1450
   __dev_queue_xmit+0xa48/0x1450
   ? ip_finish_output2+0xf4c/0x1130
   ip_finish_output2+0x6b6/0x1130
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __ip_finish_output+0x217/0x380
   ? srso_alias_return_thunk+0x5/0xfbef5
   __ip_finish_output+0x217/0x380
   ip_output+0x99/0x120
   __ip_queue_xmit+0xae4/0xbc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? tcp_options_write.constprop.0+0xcb/0x3e0
   ip_queue_xmit+0x34/0x40
   __tcp_transmit_skb+0x1625/0x1890
   tcp_write_xmit+0x766/0x2fb0
   ? __entry_text_end+0x102ba9/0x102bad
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __might_fault+0x74/0xc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   __tcp_push_pending_frames+0x56/0x190
   tcp_push+0x117/0x310
   tcp_sendmsg_locked+0x14c1/0x1740
   tcp_sendmsg+0x28/0x40
   inet_sendmsg+0x5d/0x90
   sock_write_iter+0x242/0x2b0
   vfs_write+0x68d/0x800
   ? __pfx_sock_write_iter+0x10/0x10
   ksys_write+0xc8/0xf0
   __x64_sys_write+0x3d/0x50
   x64_sys_call+0xfaf/0x1f50
   do_syscall_64+0x6d/0x140
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
  RIP: 0033:0x7f4d143af992
  Code: c3 8b 07 85 c0 75 24 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> e9 01 cc ff ff 41 54 b8 02 00 00 0
  RSP: 002b:00007ffd65032058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
  RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f4d143af992
  RDX: 0000000000000025 RSI: 00007f4d143f3bcc RDI: 0000000000000005
  RBP: 00007f4d143f2b28 R08: 0000000000000000 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4d143f3bcc
  R13: 0000000000000005 R14: 0000000000000000 R15: 00007ffd650323f0
   </TASK>

Fixes: 0b2c597 ("l2tp: close all race conditions in l2tp_tunnel_register()")
Suggested-by: Eric Dumazet <[email protected]>
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=6acef9e0a4d1f46c83d4
CC: [email protected]
CC: [email protected]
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: Tom Parkin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
dsx724 pushed a commit that referenced this issue Aug 23, 2024
[ Upstream commit 86a41ea ]

When l2tp tunnels use a socket provided by userspace, we can hit
lockdep splats like the below when data is transmitted through another
(unrelated) userspace socket which then gets routed over l2tp.

This issue was previously discussed here:
https://lore.kernel.org/netdev/[email protected]/

The solution is to have lockdep treat socket locks of l2tp tunnel
sockets separately than those of standard INET sockets. To do so, use
a different lockdep subclass where lock nesting is possible.

  ============================================
  WARNING: possible recursive locking detected
  6.10.0+ #34 Not tainted
  --------------------------------------------
  iperf3/771 is trying to acquire lock:
  ffff8881027601d8 (slock-AF_INET/1){+.-.}-{2:2}, at: l2tp_xmit_skb+0x243/0x9d0

  but task is already holding lock:
  ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10

  other info that might help us debug this:
   Possible unsafe locking scenario:

         CPU0
         ----
    lock(slock-AF_INET/1);
    lock(slock-AF_INET/1);

   *** DEADLOCK ***

   May be due to missing lock nesting notation

  10 locks held by iperf3/771:
   #0: ffff888102650258 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x1a/0x40
   #1: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0
   #2: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130
   #3: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x28b/0x9f0
   #4: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0xf9/0x260
   #5: ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10
   #6: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0
   #7: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130
   #8: ffffffff822ac1e0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0xcc/0x1450
   #9: ffff888101f33258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: __dev_queue_xmit+0x513/0x1450

  stack backtrace:
  CPU: 2 UID: 0 PID: 771 Comm: iperf3 Not tainted 6.10.0+ #34
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
  Call Trace:
   <IRQ>
   dump_stack_lvl+0x69/0xa0
   dump_stack+0xc/0x20
   __lock_acquire+0x135d/0x2600
   ? srso_alias_return_thunk+0x5/0xfbef5
   lock_acquire+0xc4/0x2a0
   ? l2tp_xmit_skb+0x243/0x9d0
   ? __skb_checksum+0xa3/0x540
   _raw_spin_lock_nested+0x35/0x50
   ? l2tp_xmit_skb+0x243/0x9d0
   l2tp_xmit_skb+0x243/0x9d0
   l2tp_eth_dev_xmit+0x3c/0xc0
   dev_hard_start_xmit+0x11e/0x420
   sch_direct_xmit+0xc3/0x640
   __dev_queue_xmit+0x61c/0x1450
   ? ip_finish_output2+0xf4c/0x1130
   ip_finish_output2+0x6b6/0x1130
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __ip_finish_output+0x217/0x380
   ? srso_alias_return_thunk+0x5/0xfbef5
   __ip_finish_output+0x217/0x380
   ip_output+0x99/0x120
   __ip_queue_xmit+0xae4/0xbc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? tcp_options_write.constprop.0+0xcb/0x3e0
   ip_queue_xmit+0x34/0x40
   __tcp_transmit_skb+0x1625/0x1890
   __tcp_send_ack+0x1b8/0x340
   tcp_send_ack+0x23/0x30
   __tcp_ack_snd_check+0xa8/0x530
   ? srso_alias_return_thunk+0x5/0xfbef5
   tcp_rcv_established+0x412/0xd70
   tcp_v4_do_rcv+0x299/0x420
   tcp_v4_rcv+0x1991/0x1e10
   ip_protocol_deliver_rcu+0x50/0x220
   ip_local_deliver_finish+0x158/0x260
   ip_local_deliver+0xc8/0xe0
   ip_rcv+0xe5/0x1d0
   ? __pfx_ip_rcv+0x10/0x10
   __netif_receive_skb_one_core+0xce/0xe0
   ? process_backlog+0x28b/0x9f0
   __netif_receive_skb+0x34/0xd0
   ? process_backlog+0x28b/0x9f0
   process_backlog+0x2cb/0x9f0
   __napi_poll.constprop.0+0x61/0x280
   net_rx_action+0x332/0x670
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? find_held_lock+0x2b/0x80
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   handle_softirqs+0xda/0x480
   ? __dev_queue_xmit+0xa2c/0x1450
   do_softirq+0xa1/0xd0
   </IRQ>
   <TASK>
   __local_bh_enable_ip+0xc8/0xe0
   ? __dev_queue_xmit+0xa2c/0x1450
   __dev_queue_xmit+0xa48/0x1450
   ? ip_finish_output2+0xf4c/0x1130
   ip_finish_output2+0x6b6/0x1130
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __ip_finish_output+0x217/0x380
   ? srso_alias_return_thunk+0x5/0xfbef5
   __ip_finish_output+0x217/0x380
   ip_output+0x99/0x120
   __ip_queue_xmit+0xae4/0xbc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? tcp_options_write.constprop.0+0xcb/0x3e0
   ip_queue_xmit+0x34/0x40
   __tcp_transmit_skb+0x1625/0x1890
   tcp_write_xmit+0x766/0x2fb0
   ? __entry_text_end+0x102ba9/0x102bad
   ? srso_alias_return_thunk+0x5/0xfbef5
   ? __might_fault+0x74/0xc0
   ? srso_alias_return_thunk+0x5/0xfbef5
   __tcp_push_pending_frames+0x56/0x190
   tcp_push+0x117/0x310
   tcp_sendmsg_locked+0x14c1/0x1740
   tcp_sendmsg+0x28/0x40
   inet_sendmsg+0x5d/0x90
   sock_write_iter+0x242/0x2b0
   vfs_write+0x68d/0x800
   ? __pfx_sock_write_iter+0x10/0x10
   ksys_write+0xc8/0xf0
   __x64_sys_write+0x3d/0x50
   x64_sys_call+0xfaf/0x1f50
   do_syscall_64+0x6d/0x140
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
  RIP: 0033:0x7f4d143af992
  Code: c3 8b 07 85 c0 75 24 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> e9 01 cc ff ff 41 54 b8 02 00 00 0
  RSP: 002b:00007ffd65032058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
  RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f4d143af992
  RDX: 0000000000000025 RSI: 00007f4d143f3bcc RDI: 0000000000000005
  RBP: 00007f4d143f2b28 R08: 0000000000000000 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4d143f3bcc
  R13: 0000000000000005 R14: 0000000000000000 R15: 00007ffd650323f0
   </TASK>

Fixes: 0b2c597 ("l2tp: close all race conditions in l2tp_tunnel_register()")
Suggested-by: Eric Dumazet <[email protected]>
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=6acef9e0a4d1f46c83d4
CC: [email protected]
CC: [email protected]
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: Tom Parkin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant