Skip to content

high iowait with 5.15.50 #7

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

Open
freemangordon opened this issue Sep 13, 2022 · 20 comments
Open

high iowait with 5.15.50 #7

freemangordon opened this issue Sep 13, 2022 · 20 comments

Comments

@freemangordon
Copy link
Contributor

after upgrade from 5.15.21 to 5.15.50 I see extremely high iowait % when doing intensive load (like compiling). See iostat sample:

avg-cpu: %user %nice %system %iowait %steal %idle
6.27 0.00 2.01 91.23 0.00 0.50

The same load on 5.15.21 results in 2% - 3% iowait.

Any hints what to look for?

@freemangordon
Copy link
Contributor Author

@rafael2k

@rafael2k
Copy link
Collaborator

Good question. There should be not much difference between 5.15.21 and 5.15.50. Did you have any storage changes in between the use of the 5.15.21 and this 5.15.50 tests? I can only think of storage issues, file filesystem fragmentation or storage near-failure signs. Otherwise, it could be some pinephone storage driver related issue too.

@freemangordon
Copy link
Contributor Author

the thing is, that if I downgrade, the issue is no more. And it re-appears as soon as I upgrade to .50

@freemangordon
Copy link
Contributor Author

dmesg log, in case it can help:

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.15.50 (pbuilder@devuan-arm64) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP Mon Jul 4 07:51:00 UTC 2022
[ 0.000000] Machine model: Pine64 PinePhone Braveheart (1.1)
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x00000000bfffffff]
[ 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 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] cma: Reserved 256 MiB at 0x00000000ad800000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.2
[ 0.000000] percpu: Embedded 29 pages/cpu s80472 r8192 d30120 u118784
[ 0.000000] pcpu-alloc: s80472 r8192 d30120 u118784 alloc=29*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 disabled by kernel configuration
[ 0.000000] CPU features: detected: ARM erratum 843419
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 fbcon=rotate:1
[ 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:on, heap free:off
[ 0.000000] Memory: 109640K/2097152K available (11200K kernel code, 1934K rwdata, 3488K rodata, 4224K init, 524K bss, 62236K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 37866 entries in 148 pages
[ 0.000000] ftrace: allocated 148 pages with 3 groups
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] Rude 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: Enabling global workaround for Allwinner erratum UNKNOWN1
[ 0.000000] arch_timer: CPU0: Trapping CNTVCT access
[ 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.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000243] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000772] Console: colour dummy device 80x25
[ 0.001221] printk: console [tty0] enabled
[ 0.001282] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.001311] pid_max: default: 32768 minimum: 301
[ 0.001610] LSM: Security Framework initializing
[ 0.001702] Yama: becoming mindful.
[ 0.001888] AppArmor: AppArmor initialized
[ 0.001910] TOMOYO Linux initialized
[ 0.002135] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.002173] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.005066] rcu: Hierarchical SRCU implementation.
[ 0.007023] smp: Bringing up secondary CPUs ...
[ 0.009130] Detected VIPT I-cache on CPU1
[ 0.009199] arch_timer: CPU1: Trapping CNTVCT access
[ 0.009215] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.010515] Detected VIPT I-cache on CPU2
[ 0.010552] arch_timer: CPU2: Trapping CNTVCT access
[ 0.010563] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.011741] Detected VIPT I-cache on CPU3
[ 0.011774] arch_timer: CPU3: Trapping CNTVCT access
[ 0.011785] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.011877] smp: Brought up 1 node, 4 CPUs
[ 0.011981] SMP: Total of 4 processors activated.
[ 0.011995] CPU features: detected: 32-bit EL0 Support
[ 0.012008] CPU features: detected: 32-bit EL1 Support
[ 0.012022] CPU features: detected: CRC32 instructions
[ 0.012110] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[ 0.012438] CPU: All CPU(s) started at EL2
[ 0.012533] alternatives: patching kernel code
[ 0.089373] node 0 deferred pages initialised in 76ms
[ 0.090932] devtmpfs: initialized
[ 0.103264] Registered cp15_barrier emulation handler
[ 0.103341] KASLR disabled due to lack of seed
[ 0.103662] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.103723] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.115388] pinctrl core: initialized pinctrl subsystem
[ 0.117332] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.120719] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.120971] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.121323] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.121406] audit: initializing netlink subsys (disabled)
[ 0.121659] audit: type=2000 audit(0.120:1): state=initialized audit_enabled=0 res=1
[ 0.122383] thermal_sys: Registered thermal governor 'fair_share'
[ 0.122391] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.122409] thermal_sys: Registered thermal governor 'step_wise'
[ 0.122424] thermal_sys: Registered thermal governor 'user_space'
[ 0.122438] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.123007] cpuidle: using governor ladder
[ 0.123053] cpuidle: using governor menu
[ 0.123229] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.123376] ASID allocator initialised with 65536 entries
[ 0.142324] platform 1ca0000.dsi: Fixing up cyclic dependency with 1c0c000.lcd-controller
[ 0.143543] platform 1ee0000.hdmi: Fixing up cyclic dependency with 1c0d000.lcd-controller
[ 0.146603] platform hdmi-connector: Fixing up cyclic dependency with 1ee0000.hdmi
[ 0.157304] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.157348] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.157366] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.157383] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 1.014251] fbcon: Taking over console
[ 1.016043] iommu: Default domain type: Translated
[ 1.016075] iommu: DMA domain TLB invalidation policy: strict mode
[ 1.016675] usbcore: registered new interface driver usbfs
[ 1.016736] usbcore: registered new interface driver hub
[ 1.016785] usbcore: registered new device driver usb
[ 1.016992] power_supply_init_attrs: Property 37 skipped because it is missing from power_supply_attrs
[ 1.018479] NetLabel: Initializing
[ 1.018498] NetLabel: domain hash size = 128
[ 1.018512] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 1.018605] NetLabel: unlabeled traffic allowed by default
[ 1.019247] clocksource: Switched to clocksource arch_sys_counter
[ 1.079750] VFS: Disk quotas dquot_6.6.0
[ 1.079907] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.080905] AppArmor: AppArmor Filesystem Enabled
[ 1.090674] NET: Registered PF_INET protocol family
[ 1.090940] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 1.092655] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 1.092812] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 1.092889] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 1.093153] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 1.093549] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.093906] MPTCP token hash table entries: 2048 (order: 3, 49152 bytes, linear)
[ 1.094070] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.094156] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.094474] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 1.094517] NET: Registered PF_XDP protocol family
[ 1.119922] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 1.120593] kvm [1]: IPA Size Limit: 40 bits
[ 1.121566] kvm [1]: vgic interrupt IRQ9
[ 1.121759] kvm [1]: Hyp mode initialized successfully
[ 1.128280] Initialise system trusted keyrings
[ 1.128392] Key type blacklist registered
[ 1.128603] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 1.136293] zbud: loaded
[ 1.138716] integrity: Platform Keyring initialized
[ 1.138743] Key type asymmetric registered
[ 1.138760] Asymmetric key parser 'x509' registered
[ 1.138860] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 1.139185] io scheduler mq-deadline registered
[ 1.145002] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 1.146226] sun50i-a64-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[ 1.156402] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.161693] Error: Driver 'sun8i-hdmi-phy' is already registered, aborting...
[ 1.167019] lima 1c40000.gpu: gp - mali400 version major 1 minor 1
[ 1.167106] lima 1c40000.gpu: pp0 - mali400 version major 1 minor 1
[ 1.167178] lima 1c40000.gpu: pp1 - mali400 version major 1 minor 1
[ 1.167228] lima 1c40000.gpu: l2 cache 64K, 4-way, 64byte cache line, 64bit external bus
[ 1.167871] lima 1c40000.gpu: bus rate = 200000000
[ 1.167894] lima 1c40000.gpu: mod rate = 500000000
[ 1.168345] [drm] Initialized lima 1.1.0 20191231 for 1c40000.gpu on minor 0
[ 1.170648] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.170684] ehci-platform: EHCI generic platform driver
[ 1.170900] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.170975] ohci-platform: OHCI generic platform driver
[ 1.171593] mousedev: PS/2 mouse device common for all mice
[ 1.172550] sun6i-rtc 1f00000.rtc: registered as rtc0
[ 1.172587] sun6i-rtc 1f00000.rtc: setting system clock to 2022-09-13T11:03:25 UTC (1663067005)
[ 1.172618] sun6i-rtc 1f00000.rtc: RTC enabled
[ 1.174224] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.175929] Synopsys Designware Multimedia Card Interface Driver
[ 1.176717] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.176905] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 1.176971] hid: raw HID events driver (C) Jiri Kosina
[ 1.177471] usbcore: registered new interface driver usbhid
[ 1.177489] usbhid: USB HID core driver
[ 1.177870] ashmem: initialized
[ 1.181935] NET: Registered PF_INET6 protocol family
[ 1.189452] Segment Routing with IPv6
[ 1.189565] In-situ OAM (IOAM) with IPv6
[ 1.189666] mip6: Mobile IPv6
[ 1.189685] NET: Registered PF_PACKET protocol family
[ 1.189898] mpls_gso: MPLS GSO support
[ 1.190835] registered taskstats version 1
[ 1.190864] Loading compiled-in X.509 certificates
[ 1.192522] zswap: loaded using pool lz4hc/z3fold
[ 1.193424] Key type ._fscrypt registered
[ 1.193443] Key type .fscrypt registered
[ 1.193456] Key type fscrypt-provisioning registered
[ 1.193739] AppArmor: AppArmor sha1 policy hashing enabled
[ 1.193782] ima: No TPM chip found, activating TPM-bypass!
[ 1.193815] ima: Allocated hash algorithm: sha256
[ 1.193887] ima: No architecture policies found
[ 1.210469] platform 1100000.mixer: Fixing up cyclic dependency with 1c0d000.lcd-controller
[ 1.210585] platform 1100000.mixer: Fixing up cyclic dependency with 1c0c000.lcd-controller
[ 1.211651] platform 1200000.mixer: Fixing up cyclic dependency with 1c0d000.lcd-controller
[ 1.211763] platform 1200000.mixer: Fixing up cyclic dependency with 1c0c000.lcd-controller
[ 1.212753] sunxi-rsb 1f03400.rsb: RSB running at 4000000 Hz
[ 1.213232] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP803 found
[ 1.215763] axp20x-gpio axp20x-gpio: DMA mask not set
[ 1.216416] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[ 1.218068] vcc-3v3: supplied by regulator-dummy
[ 1.218655] vdd-cpux: supplied by regulator-dummy
[ 1.219542] dcdc4: supplied by regulator-dummy
[ 1.219761] vcc-dram: supplied by regulator-dummy
[ 1.220344] vdd-sys: supplied by regulator-dummy
[ 1.221039] dc1sw: supplied by regulator-dummy
[ 1.221215] dovdd-csi: Bringing 3300000uV into 1800000-1800000uV
[ 1.221666] dovdd-csi: supplied by regulator-dummy
[ 1.221927] vcc-pl: supplied by regulator-dummy
[ 1.222451] vcc-pll-avcc: supplied by regulator-dummy
[ 1.223267] vcc-dsi-sensor: supplied by regulator-dummy
[ 1.223739] vcc-mipi-io: supplied by regulator-dummy
[ 1.224206] avdd-csi: supplied by regulator-dummy
[ 1.224710] vcc-wifi-io: supplied by regulator-dummy
[ 1.224958] vcc-lpddr: supplied by regulator-dummy
[ 1.225722] eldo2: supplied by regulator-dummy
[ 1.225959] dvdd-1v8-csi: Bringing 700000uV into 1800000-1800000uV
[ 1.226457] dvdd-1v8-csi: supplied by regulator-dummy
[ 1.226941] vcc-1v2-hsic: supplied by regulator-dummy
[ 1.227183] vdd-cpus: supplied by regulator-dummy
[ 1.227767] vcc-rtc: supplied by regulator-dummy
[ 1.228311] vcc-lcd-ctp-stk: supplied by regulator-dummy
[ 1.228547] vcc-1v8-typec: Bringing 3300000uV into 1800000-1800000uV
[ 1.229054] vcc-1v8-typec: supplied by regulator-dummy
[ 1.229209] axp20x-regulator axp20x-regulator: drivevbus has vin
[ 1.229591] axp20x-rsb sunxi-rsb-3a3: AXP20X driver loaded
[ 1.234895] sun50i-a64-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 1.237029] printk: console [ttyS0] disabled
[ 1.257244] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 43, base_baud = 1500000) is a U6_16550A
[ 2.553242] printk: console [ttyS0] enabled
[ 2.579230] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 44, base_baud = 1500000) is a U6_16550A
[ 2.588408] serial serial0: tty port ttyS1 registered
[ 2.614697] 1c28c00.serial: ttyS2 at MMIO 0x1c28c00 (irq = 45, base_baud = 1500000) is a U6_16550A
[ 2.626460] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 2.637846] i2c 0-0028: Fixing up cyclic dependency with 1c19400.phy
[ 2.659150] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 2.659427] drivevbus: supplied by vcc5v0
[ 2.667791] usb0-vbus: supplied by drivevbus
[ 2.673410] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 2.682988] phy id_det change to device
[ 2.689126] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 2.689358] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 2.690052] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 2.742046] mmc1: new high speed SDIO card at address 0001
[ 2.756715] mmc0: new high speed SDXC card at address 0001
[ 2.765061] mmcblk0: mmc0:0001 00000 59.6 GiB
[ 2.776217] mmcblk0: p1 p2
[ 2.825384] mmc2: new DDR MMC card at address 0001
[ 2.831827] mmcblk2: mmc2:0001 14.7 GiB
[ 2.842419] mmcblk2: p1 p2
[ 2.846710] mmcblk2boot0: mmc2:0001 4.00 MiB
[ 2.857082] mmcblk2boot1: mmc2:0001 4.00 MiB
[ 3.715402] phy phy-1c19400.phy.1: Changing dr_mode to 1
[ 3.720827] phy id_det change to host
[ 3.935400] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 3.944702] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 3.956083] ehci-platform 1c1a000.usb: irq 29, io mem 0x01c1a000
[ 3.978309] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 3.984865] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 3.993157] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.000401] usb usb1: Product: EHCI Host Controller
[ 4.005297] usb usb1: Manufacturer: Linux 5.15.50 ehci_hcd
[ 4.010820] usb usb1: SerialNumber: 1c1a000.usb
[ 4.016010] hub 1-0:1.0: USB hub found
[ 4.019817] hub 1-0:1.0: 1 port detected
[ 4.027965] ehci-platform 1c1b000.usb: EHCI Host Controller
[ 4.033821] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 2
[ 4.045556] ehci-platform 1c1b000.usb: irq 31, io mem 0x01c1b000
[ 4.067269] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[ 4.073626] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 4.081918] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.089180] usb usb2: Product: EHCI Host Controller
[ 4.094075] usb usb2: Manufacturer: Linux 5.15.50 ehci_hcd
[ 4.099575] usb usb2: SerialNumber: 1c1b000.usb
[ 4.111323] hub 2-0:1.0: USB hub found
[ 4.118172] hub 2-0:1.0: 1 port detected
[ 4.123218] phy id_det change to host
[ 4.331344] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 4.342139] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 3
[ 4.353564] ohci-platform 1c1a400.usb: irq 30, io mem 0x01c1a400
[ 4.426800] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.15
[ 4.435109] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.442368] usb usb3: Product: Generic Platform OHCI controller
[ 4.448314] usb usb3: Manufacturer: Linux 5.15.50 ohci_hcd
[ 4.453826] usb usb3: SerialNumber: 1c1a400.usb
[ 4.459097] hub 3-0:1.0: USB hub found
[ 4.462925] hub 3-0:1.0: 1 port detected
[ 4.468163] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[ 4.475158] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[ 4.483127] ohci-platform 1c1b400.usb: irq 32, io mem 0x01c1b400
[ 4.551571] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.15
[ 4.559879] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.567132] usb usb4: Product: Generic Platform OHCI controller
[ 4.573078] usb usb4: Manufacturer: Linux 5.15.50 ohci_hcd
[ 4.578588] usb usb4: SerialNumber: 1c1b400.usb
[ 4.583894] hub 4-0:1.0: USB hub found
[ 4.587719] hub 4-0:1.0: 1 port detected
[ 4.592929] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 4.607195] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 4.619516] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 4.627033] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 4.747731] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 4.757659] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 4.773333] Freeing unused kernel memory: 4224K
[ 4.778116] Run /sbin/init as init process
[ 4.782245] with arguments:
[ 4.782255] /sbin/init
[ 4.782262] with environment:
[ 4.782268] HOME=/
[ 4.782275] TERM=linux
[ 4.797034] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
[ 8.915698] udevd[585]: starting version 3.2.9
[ 8.969745] random: udevd: uninitialized urandom read (16 bytes read)
[ 8.981674] random: udevd: uninitialized urandom read (16 bytes read)
[ 8.990294] random: udevd: uninitialized urandom read (16 bytes read)
[ 9.175858] udevd[586]: starting eudev-3.2.9
[ 9.457232] soundcore: module verification failed: signature and/or required key missing - tainting kernel
[ 9.477938] i2c 3-003c: Fixing up cyclic dependency with 1cb0000.csi
[ 9.511563] mc: Linux media interface: v0.10
[ 9.527850] i2c 3-004c: Fixing up cyclic dependency with 1cb0000.csi
[ 9.566042] videodev: Linux video capture interface: v2.00
[ 9.571844] i2c-gpio i2c-csi: using lines 141 (SDA) and 140 (SCL)
[ 9.578549] scpi_protocol scpi: SCP Protocol 1.2 Firmware 0.5.0 version
[ 9.582586] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 9.595974] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 9.657081] sun8i-ce 1c15000.crypto: Set mod clock to 300000000 (300 Mhz) from 24000000 (24 Mhz)
[ 9.668475] sun8i-ce 1c15000.crypto: will run requests pump with realtime priority
[ 9.672451] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 9.676667] sun8i-ce 1c15000.crypto: will run requests pump with realtime priority
[ 9.693083] sun8i-ce 1c15000.crypto: will run requests pump with realtime priority
[ 9.701299] sun8i-ce 1c15000.crypto: will run requests pump with realtime priority
[ 9.709317] sun8i-ce 1c15000.crypto: Register cbc(aes)
[ 9.879476] cryptd: max_cpu_qlen set to 1000
[ 9.897016] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 9.928520] input: 1c21800.lradc as /devices/platform/soc/1c21800.lradc/input/input1
[ 9.937697] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 9.994345] musb-sunxi 1c19000.usb: Disabling musb host side code due to re-routed phy
[ 10.003445] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.003562] sun8i-rotate 1020000.rotate: Device registered as /dev/video0
[ 10.019673] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.026360] usb_phy_generic usb_phy_generic.1.auto: supply vcc not found, using dummy regulator
[ 10.044327] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[ 10.046822] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.073818] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.083412] alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
[ 10.092512] sunxi_cedrus: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.121786] cedrus 1c0e000.video-codec: Device registered as /dev/video1
[ 10.132208] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.171605] pinephone-keyboard 2-0015: error -ENXIO: Failed to read device ID
[ 10.203779] bt-sco bt-sco-codec: ASoC: sink widget Capture overwritten
[ 10.211457] bt-sco bt-sco-codec: ASoC: source widget Playback overwritten
[ 10.219323] Goodix-TS 0-005d: ID 917S, version: 0200
[ 10.224918] simple-amplifier audio-amplifier: supply VCC not found, using dummy regulator
[ 10.241660] debugfs: File 'AIF3 Playback' in directory 'dapm' already present!
[ 10.253771] Goodix-TS 0-005d: Direct firmware load for goodix_917S_cfg.bin failed with error -2
[ 10.255419] debugfs: File 'AIF3 Capture' in directory 'dapm' already present!
[ 10.270297] input: Goodix Capacitive TouchScreen as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-005d/input/input3
[ 10.274084] debugfs: File 'Playback' in directory 'dapm' already present!
[ 10.280536] af8133j 1-001c: Error reading product code
[ 10.287304] debugfs: File 'Capture' in directory 'dapm' already present!
[ 10.295832] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 10.300381] input: PinePhone Headset Jack as /devices/platform/sound/sound/card0/input2
[ 10.317554] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.318179] axp20x-adc axp813-adc: DMA mask not set
[ 10.329395] axp20x-battery-power-supply axp20x-battery-power-supply: DMA mask not set
[ 10.339813] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.341145] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[ 10.349245] input: axp20x-pek as /devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/input/input5
[ 10.362259] input: gpio-vibrator as /devices/platform/vibrator/input/input4
[ 10.374914] axp20x-usb-power-supply axp20x-usb-power-supply: Increasing Vbus hold voltage to 4.5V
[ 10.385396] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.405795] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.421360] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.483350] anx7688 0-0028: power enabled
[ 10.483656] anx7688 0-0028: Vendor id 0x1f29
[ 10.503367] anx7688 0-0028: power disabled
[ 10.503631] anx7688 0-0028: enabling USB BC 1.2 detection
[ 10.503830] anx7688 0-0028: plug irq (cd=1)
[ 10.508585] panel-sitronix-st7703 1ca0000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?
[ 10.519354] anx7688 0-0028: cable inserted
[ 10.544382] sun4i-drm display-engine: bound 1100000.mixer (ops 0xffffffc008be5728)
[ 10.553533] sun4i-drm display-engine: bound 1200000.mixer (ops 0xffffffc008be5728)
[ 10.559331] anx7688 0-0028: power enabled
[ 10.562013] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[ 10.565455] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 10.570035] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xffffffc008be0e38)
[ 10.577023] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 10.585546] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xffffffc008be0e38)
[ 10.593853] cfg80211: failed to load regulatory.db
[ 10.602151] sun4i-drm display-engine: bound 1ca0000.dsi (ops 0xffffffc008be4588)
[ 10.617863] sun8i-dw-hdmi 1ee0000.hdmi: Detected HDMI TX controller v1.32a with HDCP (sun8i_dw_hdmi_phy)
[ 10.635789] sun8i-dw-hdmi 1ee0000.hdmi: registered DesignWare HDMI I2C bus driver
[ 10.647186] sun4i-drm display-engine: bound 1ee0000.hdmi (ops 0xffffffc008be4a60)
[ 10.659944] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 1
[ 10.671421] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[ 10.720825] Bluetooth: Core ver 2.22
[ 10.720966] NET: Registered PF_BLUETOOTH protocol family
[ 10.720970] Bluetooth: HCI device and connection manager initialized
[ 10.720990] Bluetooth: HCI socket layer initialized
[ 10.721016] Bluetooth: L2CAP socket layer initialized
[ 10.721033] Bluetooth: SCO socket layer initialized
[ 10.759020] Bluetooth: HCI UART driver ver 2.3
[ 10.759052] Bluetooth: HCI UART protocol H4 registered
[ 10.760184] sun8i-ce 1c15000.crypto: Fallback for cbc-aes-sun8i-ce is cbc-aes-ce
[ 10.761311] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 10.762005] Bluetooth: HCI UART protocol Broadcom registered
[ 10.763139] sun8i-ce 1c15000.crypto: Register ecb(aes)
[ 10.764040] sun8i-ce 1c15000.crypto: Fallback for ecb-aes-sun8i-ce is ecb-aes-ce
[ 10.766023] sun8i-ce 1c15000.crypto: Register cbc(des3_ede)
[ 10.829163] sun6i-csi 1cb0000.csi: creating gc2145 3-003c:0 -> sun6i-csi:0 link
[ 10.829194] sun6i-csi 1cb0000.csi: creating ov5640 3-004c:0 -> sun6i-csi:0 link
[ 10.902164] Console: switching to colour frame buffer device 180x45
[ 10.940022] 8723cs: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.944860] sun4i-drm display-engine: [drm] fb0: sun4i-drmdrmfb frame buffer device
[ 10.991269] gc2145 3-003c: [wr fe] <= 00
[ 11.055147] gc2145 3-003c: bank switch: 0x00
[ 11.060237] gc2145 3-003c: [rd f0] => 21 45
[ 11.060259] gc2145 3-003c: device id: 0x2145
[ 11.070098] gc2145 3-003c: [wr fe] <= f0
[ 11.070558] gc2145 3-003c: [wr fc] <= 06
[ 11.070963] gc2145 3-003c: [wr f7] <= 1d
[ 11.071391] gc2145 3-003c: [wr f8] <= 84
[ 11.071796] gc2145 3-003c: [wr fa] <= 00
[ 11.072198] gc2145 3-003c: [wr f9] <= fe
[ 11.072599] gc2145 3-003c: [wr f2] <= 00
[ 11.073003] gc2145 3-003c: [wr 19] <= 0c
[ 11.073408] gc2145 3-003c: [wr 20] <= 01
[ 11.073813] gc2145 3-003c: [wr 80] <= 0b
[ 11.074217] gc2145 3-003c: [wr 86] <= 00
[ 11.074752] sun6i-csi 1cb0000.csi: Direct firmware load for gc2145-init.bin failed with error -2
[ 11.089216] gc2145 3-003c: Failed to read firmware gc2145-init.bin, continuing anyway...
[ 11.089249] gc2145 3-003c: [wr fd] <= 00
[ 11.089699] gc2145 3-003c: [wr 18] <= 0a
[ 11.103347] gc2145 3-003c: [wr 09] <= 00 00
[ 11.103883] gc2145 3-003c: [wr 0b] <= 00 00
[ 11.104409] gc2145 3-003c: [wr 0d] <= 04 d0
[ 11.104934] gc2145 3-003c: [wr 0f] <= 06 50
[ 11.105459] gc2145 3-003c: [wr 05] <= 01 f1
[ 11.105983] gc2145 3-003c: [wr 07] <= 00 08
[ 11.106508] gc2145 3-003c: [wr 11] <= 00 1e
[ 11.107033] gc2145 3-003c: [wr 13] <= 02
[ 11.107480] gc2145 3-003c: [wr 14] <= 02
[ 11.107892] gc2145 3-003c: [wr f7] <= 11
[ 11.108293] gc2145 3-003c: [wr f8] <= 84
[ 11.108704] gc2145 3-003c: [wr fa] <= 10
[ 11.109628] gc2145 3-003c: [rd 82] => 00
[ 11.109635] gc2145 3-003c: [wr 82] <= 00
[ 11.110038] gc2145 3-003c: [wr b3] <= 40
[ 11.110440] gc2145 3-003c: [wr b4] <= 40
[ 11.110841] gc2145 3-003c: [wr b5] <= 40
[ 11.111277] sun6i-mipi-dsi 1ca0000.dsi: Attached device xbd599
[ 11.111280] gc2145 3-003c: [wr fe] <= 01
[ 11.111685] gc2145 3-003c: bank switch: 0x01
[ 11.122863] panel-sitronix-st7703 1ca0000.dsi.0: 720x1440@60 24bpp dsi 4dl - ready
[ 11.132547] gc2145 3-003c: [wr ec] <= 04
[ 11.134041] random: crng init done
[ 11.134045] random: 9 urandom warning(s) missed due to ratelimiting
[ 11.166770] gc2145 3-003c: [wr ed] <= 04
[ 11.167190] gc2145 3-003c: [wr ee] <= c0
[ 11.167621] gc2145 3-003c: [wr ef] <= 8e
[ 11.168028] gc2145 3-003c: [wr fe] <= 00
[ 11.168442] gc2145 3-003c: bank switch: 0x00
[ 11.169003] gc2145 3-003c: [rd 82] => 00
[ 11.169016] gc2145 3-003c: [wr 82] <= 02
[ 11.169456] gc2145 3-003c: [wr b6] <= 00
[ 11.169899] gc2145 3-003c: [wr 03] <= 04 b0
[ 11.170432] gc2145 3-003c: [wr b1] <= 20
[ 11.170833] gc2145 3-003c: [wr b2] <= e0
[ 11.171277] gc2145 3-003c: [wr fe] <= 01
[ 11.171688] gc2145 3-003c: bank switch: 0x01
[ 11.171694] gc2145 3-003c: [wr 01] <= 04
[ 11.172099] gc2145 3-003c: [wr 02] <= c0
[ 11.172505] gc2145 3-003c: [wr 03] <= 04
[ 11.172916] gc2145 3-003c: [wr 04] <= 8e
[ 11.173321] gc2145 3-003c: [wr 05] <= 08
[ 11.173725] gc2145 3-003c: [wr 06] <= b8
[ 11.174127] gc2145 3-003c: [wr 07] <= 08
[ 11.174530] gc2145 3-003c: [wr 08] <= 86
[ 11.174931] gc2145 3-003c: [wr fe] <= 00
[ 11.175370] gc2145 3-003c: bank switch: 0x00
[ 11.175380] gc2145 3-003c: [wr b6] <= 01
[ 11.175786] gc2145 3-003c: [wr fe] <= 01
[ 11.176186] gc2145 3-003c: bank switch: 0x01
[ 11.176191] gc2145 3-003c: [wr 27] <= 01 36
[ 11.176715] gc2145 3-003c: [wr 35] <= 50
[ 11.177116] gc2145 3-003c: [wr 29] <= 02 6c
[ 11.177642] gc2145 3-003c: [wr 36] <= 50
[ 11.178043] gc2145 3-003c: [wr 2b] <= 03 a2
[ 11.178566] gc2145 3-003c: [wr 37] <= 50
[ 11.178967] gc2145 3-003c: [wr 2d] <= 04 d8
[ 11.179502] gc2145 3-003c: [wr 38] <= 50
[ 11.179904] gc2145 3-003c: [wr 2f] <= 06 0e
[ 11.180428] gc2145 3-003c: [wr 39] <= 50
[ 11.180828] gc2145 3-003c: [wr 31] <= 07 44
[ 11.181351] gc2145 3-003c: [wr 3a] <= 50
[ 11.181751] gc2145 3-003c: [wr 33] <= 08 7a
[ 11.182274] gc2145 3-003c: [wr 3b] <= 50
[ 11.182674] gc2145 3-003c: [wr 1f] <= 50
[ 11.183074] gc2145 3-003c: [wr 20] <= e0
[ 11.183486] gc2145 3-003c: [wr fe] <= 00
[ 11.183887] gc2145 3-003c: bank switch: 0x00
[ 11.183892] gc2145 3-003c: [wr 84] <= 00
[ 11.184811] gc2145 3-003c: [rd 80] => 0b
[ 11.184818] gc2145 3-003c: [wr 80] <= 4b
[ 11.185737] gc2145 3-003c: [rd 80] => 0b
[ 11.231988] gc2145 3-003c: [wr 80] <= 0b
[ 11.232469] gc2145 3-003c: [wr 24] <= ff
[ 11.232892] gc2145 3-003c: [wr b6] <= 01
[ 11.233301] gc2145 3-003c: [wr fe] <= 01
[ 11.233707] gc2145 3-003c: bank switch: 0x01
[ 11.242859] gc2145 3-003c: [wr 13] <= 7b
[ 11.243422] gc2145 3-003c: [wr fe] <= 00
[ 11.243836] gc2145 3-003c: bank switch: 0x00
[ 11.253426] gc2145 3-003c: [rd 17] => 00
[ 11.253452] gc2145 3-003c: [wr 17] <= 00
[ 11.254384] gc2145 3-003c: [rd 17] => 00
[ 11.254394] gc2145 3-003c: [wr 17] <= 00
[ 11.254799] gc2145 3-003c: [wr 8c] <= 00
[ 11.255202] gc2145 3-003c: [wr 8d] <= 01
[ 11.320692] sun8i-ce 1c15000.crypto: Fallback for cbc-des3-sun8i-ce is cbc(des3_ede-generic)
[ 11.350452] sun8i-ce 1c15000.crypto: Register ecb(des3_ede)
[ 11.386964] sun8i-ce 1c15000.crypto: Fallback for ecb-des3-sun8i-ce is ecb(des3_ede-generic)
[ 11.406254] sun8i-ce 1c15000.crypto: Register md5
[ 11.418191] sun8i-ce 1c15000.crypto: Fallback for md5-sun8i-ce is md5-generic
[ 11.423454] Bluetooth: hci0: RTL: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8703
[ 11.448534] Bluetooth: hci0: RTL: chip_type status=0 type=5
[ 11.463713] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 11.465119] sun8i-ce 1c15000.crypto: Register sha1
[ 11.474579] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723cs_xx_fw.bin
[ 11.484387] sun8i-ce 1c15000.crypto: Fallback for sha1-sun8i-ce is sha1-ce
[ 11.495427] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723cs_xx_fw.bin failed with error -2
[ 11.520796] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723cs_xx_fw.bin not found
[ 11.525654] sun8i-ce 1c15000.crypto: Register sha224
[ 11.525968] sun8i-ce 1c15000.crypto: Fallback for sha224-sun8i-ce is sha224-ce
[ 11.569518] sun8i-ce 1c15000.crypto: Register sha256
[ 11.572247] sun8i-ce 1c15000.crypto: Fallback for sha256-sun8i-ce is sha256-ce
[ 11.643067] sun8i-ce 1c15000.crypto: DEBUG: Algo of sha384 not supported
[ 11.654990] sun8i-ce 1c15000.crypto: DEBUG: Algo of sha512 not supported
[ 11.655006] sun8i-ce 1c15000.crypto: Register stdrng
[ 11.655813] alg: No test for stdrng (sun8i-ce-prng)
[ 11.655906] sun8i-ce 1c15000.crypto: TRNG not supported
[ 11.655915] sun8i-ce 1c15000.crypto: CryptoEngine Die ID 0
[ 12.324846] anx7688 0-0028: boot firmware load failed (you may need to flash FW to anx7688 first)
[ 12.358436] anx7688 0-0028: power disabled
[ 12.358462] anx7688 0-0028: OCM configuration failed
[ 12.374356] anx7688 0-0028: spurious status irq
[ 12.415306] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 12.432792] iio iio:device2: failed to read Who-Am-I register.
[ 12.449126] st-magn-i2c: probe of 1-001e failed with error -110
[ 12.487335] SPI driver st-magn-spi has no spi_device_id for st,lis3mdl-magn
[ 12.502241] SPI driver st-magn-spi has no spi_device_id for st,lsm303agr-magn
[ 12.517201] SPI driver st-magn-spi has no spi_device_id for st,lsm9ds1-magn
[ 12.729556] i2c i2c-1: Added multiplexed i2c bus 5
[ 14.368106] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none.
[ 16.484921] EXT4-fs (mmcblk0p1): mounting ext2 file system using the ext4 subsystem
[ 16.524268] EXT4-fs (mmcblk0p1): mounted filesystem without journal. Opts: (null). Quota mode: none.
[ 16.540798] ext2 filesystem being mounted at /boot supports timestamps until 2038 (0x7fffffff)
[ 21.889286] zram: Added device: zram0
[ 21.904301] zram: Added device: zram1
[ 21.913890] zram: Added device: zram2
[ 21.923841] zram: Added device: zram3
[ 22.025851] zram0: detected capacity change from 0 to 131072
[ 22.080772] Adding 65532k swap on /dev/zram0. Priority:100 extents:1 across:65532k SSFS
[ 22.103691] zram1: detected capacity change from 0 to 131072
[ 22.148035] Adding 65532k swap on /dev/zram1. Priority:100 extents:1 across:65532k SSFS
[ 22.171111] zram2: detected capacity change from 0 to 131072
[ 22.216784] Adding 65532k swap on /dev/zram2. Priority:100 extents:1 across:65532k SSFS
[ 22.243676] zram3: detected capacity change from 0 to 131072
[ 22.294075] Adding 65532k swap on /dev/zram3. Priority:100 extents:1 across:65532k SSFS
[ 30.543782] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported!
[ 30.564842] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
[ 30.583805] 1c22800.i2s-i2s-hifi: soc_pcm_open() failed (-22)
[ 30.584962] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported!
[ 30.617041] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
[ 30.617123] 1c22800.i2s-i2s-hifi: soc_pcm_open() failed (-22)
[ 30.654355] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported!
[ 30.672997] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
[ 30.692657] 1c22800.i2s-i2s-hifi: soc_pcm_open() failed (-22)
[ 30.709541] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported!
[ 30.728121] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
[ 30.747610] 1c22800.i2s-i2s-hifi: soc_pcm_open() failed (-22)
[ 35.637692] broken atomic modeset userspace detected, disabling atomic
[ 35.807321] ps: disabling
[ 35.810185] dc1sw: disabling
[ 35.816671] vcc-1v2-hsic: disabling
[ 46.512583] defender (2457): /proc/2456/oom_adj is deprecated, please use /proc/2456/oom_score_adj instead.
[ 57.083319] usb 2-1: new high-speed USB device number 2 using ehci-platform
[ 57.265537] usb 2-1: New USB device found, idVendor=2c7c, idProduct=0125, bcdDevice= 3.18
[ 57.273920] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 57.281270] usb 2-1: Product: EG25-G
[ 57.285027] usb 2-1: Manufacturer: Quectel
[ 57.424213] usbcore: registered new interface driver usbserial_generic
[ 57.431346] usbserial: USB Serial support registered for generic
[ 57.491009] usbcore: registered new interface driver option
[ 57.501185] usbserial: USB Serial support registered for GSM modem (1-port)
[ 57.503471] usbcore: registered new interface driver cdc_wdm
[ 57.521193] option 2-1:1.0: GSM modem (1-port) converter detected
[ 57.528267] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 57.535729] option 2-1:1.1: GSM modem (1-port) converter detected
[ 57.543068] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 57.550541] option 2-1:1.2: GSM modem (1-port) converter detected
[ 57.557754] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 57.565347] option 2-1:1.3: GSM modem (1-port) converter detected
[ 57.572288] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 57.581344] qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
[ 57.588778] qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-1c1b000.usb-1, WWAN/QMI device, 22:b4:2e:e9:c9:3e
[ 57.600975] usbcore: registered new interface driver qmi_wwan
[ 80.772392] gc2145 3-003c: [rd f0] => 21 45
[ 80.772439] gc2145 3-003c: device id: 0x2145
[ 80.776799] gc2145 3-003c: [wr fe] <= f0
[ 80.777471] gc2145 3-003c: [wr fc] <= 06
[ 80.778136] gc2145 3-003c: [wr f7] <= 1d
[ 80.778796] gc2145 3-003c: [wr f8] <= 84
[ 80.779524] gc2145 3-003c: [wr fa] <= 00
[ 80.780198] gc2145 3-003c: [wr f9] <= fe
[ 80.780862] gc2145 3-003c: [wr f2] <= 00
[ 80.781529] gc2145 3-003c: [wr 19] <= 0c
[ 80.782195] gc2145 3-003c: [wr 20] <= 01
[ 80.782861] gc2145 3-003c: [wr 80] <= 0b
[ 80.783576] gc2145 3-003c: [wr 86] <= 00
[ 80.784575] sun6i-csi 1cb0000.csi: Direct firmware load for gc2145-init.bin failed with error -2
[ 80.793433] gc2145 3-003c: Failed to read firmware gc2145-init.bin, continuing anyway...
[ 80.801562] gc2145 3-003c: [wr fd] <= 00
[ 80.802243] gc2145 3-003c: [wr 18] <= 0a
[ 80.802912] gc2145 3-003c: [wr 09] <= 00 00
[ 80.803832] gc2145 3-003c: [wr 0b] <= 00 00
[ 80.804702] gc2145 3-003c: [wr 0d] <= 04 d0
[ 80.805567] gc2145 3-003c: [wr 0f] <= 06 50
[ 80.806431] gc2145 3-003c: [wr 05] <= 01 f1
[ 80.807342] gc2145 3-003c: [wr 07] <= 00 08
[ 80.808213] gc2145 3-003c: [wr 11] <= 00 1e
[ 80.809081] gc2145 3-003c: [wr 13] <= 02
[ 80.809745] gc2145 3-003c: [wr 14] <= 02
[ 80.810416] gc2145 3-003c: [wr f7] <= 11
[ 80.811077] gc2145 3-003c: [wr f8] <= 84
[ 80.811784] gc2145 3-003c: [wr fa] <= 10
[ 80.813290] gc2145 3-003c: [rd 82] => 00
[ 80.813308] gc2145 3-003c: [wr 82] <= 00
[ 80.813970] gc2145 3-003c: [wr b3] <= 40
[ 80.814632] gc2145 3-003c: [wr b4] <= 40
[ 80.815342] gc2145 3-003c: [wr b5] <= 40
[ 80.816010] gc2145 3-003c: [wr fe] <= 01
[ 80.816673] gc2145 3-003c: bank switch: 0x01
[ 80.820993] gc2145 3-003c: [wr ec] <= 04
[ 80.821666] gc2145 3-003c: [wr ed] <= 04
[ 80.822328] gc2145 3-003c: [wr ee] <= c0
[ 80.822986] gc2145 3-003c: [wr ef] <= 8e
[ 80.823689] gc2145 3-003c: [wr fe] <= 00
[ 80.824351] gc2145 3-003c: bank switch: 0x00
[ 80.829505] gc2145 3-003c: [rd 82] => 00
[ 80.829525] gc2145 3-003c: [wr 82] <= 02
[ 80.830189] gc2145 3-003c: [wr b6] <= 00
[ 80.830851] gc2145 3-003c: [wr 03] <= 04 b0
[ 80.831827] gc2145 3-003c: [wr b1] <= 20
[ 80.832493] gc2145 3-003c: [wr b2] <= e0
[ 80.833153] gc2145 3-003c: [wr fe] <= 01
[ 80.833810] gc2145 3-003c: bank switch: 0x01
[ 80.838133] gc2145 3-003c: [wr 01] <= 04
[ 80.838806] gc2145 3-003c: [wr 02] <= c0
[ 80.839508] gc2145 3-003c: [wr 03] <= 04
[ 80.840174] gc2145 3-003c: [wr 04] <= 8e
[ 80.840835] gc2145 3-003c: [wr 05] <= 08
[ 80.841497] gc2145 3-003c: [wr 06] <= b8
[ 80.842157] gc2145 3-003c: [wr 07] <= 08
[ 80.842818] gc2145 3-003c: [wr 08] <= 86
[ 80.843522] gc2145 3-003c: [wr fe] <= 00
[ 80.844182] gc2145 3-003c: bank switch: 0x00
[ 80.848501] gc2145 3-003c: [wr b6] <= 01
[ 80.849175] gc2145 3-003c: [wr fe] <= 01
[ 80.849872] gc2145 3-003c: bank switch: 0x01
[ 80.854203] gc2145 3-003c: [wr 27] <= 01 36
[ 80.855075] gc2145 3-003c: [wr 35] <= 50
[ 80.855781] gc2145 3-003c: [wr 29] <= 02 6c
[ 80.856683] gc2145 3-003c: [wr 36] <= 50
[ 80.857344] gc2145 3-003c: [wr 2b] <= 03 a2
[ 80.858205] gc2145 3-003c: [wr 37] <= 50
[ 80.858865] gc2145 3-003c: [wr 2d] <= 04 d8
[ 80.859779] gc2145 3-003c: [wr 38] <= 50
[ 80.860446] gc2145 3-003c: [wr 2f] <= 06 0e
[ 80.861308] gc2145 3-003c: [wr 39] <= 50
[ 80.861968] gc2145 3-003c: [wr 31] <= 07 44
[ 80.862832] gc2145 3-003c: [wr 3a] <= 50
[ 80.863540] gc2145 3-003c: [wr 33] <= 08 7a
[ 80.864411] gc2145 3-003c: [wr 3b] <= 50
[ 80.865072] gc2145 3-003c: [wr 1f] <= 50
[ 80.865731] gc2145 3-003c: [wr 20] <= e0
[ 80.866393] gc2145 3-003c: [wr fe] <= 00
[ 80.867051] gc2145 3-003c: bank switch: 0x00
[ 80.871372] gc2145 3-003c: [wr 84] <= 00
[ 80.872874] gc2145 3-003c: [rd 80] => 0b
[ 80.872892] gc2145 3-003c: [wr 80] <= 4b
[ 80.874384] gc2145 3-003c: [rd 80] => 0b
[ 80.874401] gc2145 3-003c: [wr 80] <= 0b
[ 80.875062] gc2145 3-003c: [wr 24] <= ff
[ 80.875794] gc2145 3-003c: [wr b6] <= 01
[ 80.876462] gc2145 3-003c: [wr fe] <= 01
[ 80.877121] gc2145 3-003c: bank switch: 0x01
[ 80.881444] gc2145 3-003c: [wr 13] <= 7b
[ 80.882111] gc2145 3-003c: [wr fe] <= 00
[ 80.882772] gc2145 3-003c: bank switch: 0x00
[ 80.887952] gc2145 3-003c: [rd 17] => 00
[ 80.887972] gc2145 3-003c: [wr 17] <= 00
[ 80.889471] gc2145 3-003c: [rd 17] => 00
[ 80.889489] gc2145 3-003c: [wr 17] <= 00
[ 80.890155] gc2145 3-003c: [wr 8c] <= 00
[ 80.890819] gc2145 3-003c: [wr 8d] <= 01
[ 92.137938] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

@rafael2k
Copy link
Collaborator

rafael2k commented Sep 13, 2022

How much difference you get in the kernel compile time (or any other software compile time), just out of curiosity? (bacause I did kernel compile on this kernel)

@freemangordon
Copy link
Contributor Author

freemangordon commented Sep 13, 2022

Hard to say, as it never finishes, but kernel downgrade:

sudo apt-get install linux-image-pine64=5.15.21-1+2m7.1

takes maybe 3 minutes

@freemangordon
Copy link
Contributor Author

freemangordon commented Sep 13, 2022

Seems I underestimated :)

root@devuan-pinephone:# uname -a
Linux devuan-pinephone 5.15.50 #1 SMP Mon Jul 4 07:51:00 UTC 2022 aarch64 GNU/Linux
root@devuan-pinephone:
# time apt-get install linux-image-pine64=5.15.21-1+2m7.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
linux-image-pine64
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/33.3 MB of archives.
After this operation, 39.9 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: downgrading linux-image-pine64 from 5.15.50-1+2m7 to 5.15.21-1+2m7.1
(Reading database ... 81069 files and directories currently installed.)
Preparing to unpack .../linux-image-pine64_5.15.21-1+2m7.1_arm64.deb ...
Unpacking linux-image-pine64 (5.15.21-1+2m7.1) over (5.15.50-1+2m7) ...
Setting up linux-image-pine64 (5.15.21-1+2m7.1) ...

real 5m17.079s
user 0m33.079s
sys 0m8.933s

Most of the time iowait was between 45%-70%, at the end it jumped to > 96% for maybe 10 seconds

@rafael2k
Copy link
Collaborator

Right. No idea what to do, apart of choosing another upstream kernel not from Mobian.

@rafael2k
Copy link
Collaborator

rafael2k commented Sep 14, 2022

Should we jump to kernel 6.0? May be from Megi's fork:
https://github.com/megous/linux/commits/pp-6.0

edit: plus manjaro patches: https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/tree/6.0-megi

@freemangordon
Copy link
Contributor Author

right. if you provide repo with the upgrade I can try to build and test the kernel here (never build aarch64 kernel before, but I doubt it is rocket science)

@rafael2k
Copy link
Collaborator

https://gitlab.com/mobian1/devices/sunxi64-linux/
branch mobian-5.15

@freemangordon
Copy link
Contributor Author

root@devuan-pinephone:~# time apt-get install linux-image-pine64=5.15.21-1+2m7.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
linux-image-pine64
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/33.3 MB of archives.
After this operation, 46.1 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: downgrading linux-image-pine64 from 5.15.68-1+2m7 to 5.15.21-1+2m7.1
(Reading database ... 81050 files and directories currently installed.)
Preparing to unpack .../linux-image-pine64_5.15.21-1+2m7.1_arm64.deb ...
Unpacking linux-image-pine64 (5.15.21-1+2m7.1) over (5.15.68-1+2m7) ...
Setting up linux-image-pine64 (5.15.21-1+2m7.1) ...

real 3m41.460s
user 0m44.475s
sys 0m9.500s

@freemangordon
Copy link
Contributor Author

For reference, the opposite:

root@devuan-pinephone:~# time apt-get install linux-image-pine64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
linux-image-pine64
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/33.3 MB of archives.
After this operation, 46.1 kB of additional disk space will be used.
(Reading database ... 81070 files and directories currently installed.)
Preparing to unpack .../linux-image-pine64_5.15.68-1+2m7_arm64.deb ...
Unpacking linux-image-pine64 (5.15.68-1+2m7) over (5.15.21-1+2m7.1) ...
Setting up linux-image-pine64 (5.15.68-1+2m7) ...

real 1m6.768s
user 0m44.343s
sys 0m9.824s

@rafael2k
Copy link
Collaborator

rafael2k commented Jan 6, 2023

As I don't have this pre-production version of the PinePhone @freemangordon has, and the problem mentioned here does not appear for no one else, not even in Mobian (which is the same kernel of ours), and the author of the issue can not bisect the supposed bug this ticket should be closed.

@freemangordon
Copy link
Contributor Author

will try to bisect soon

@rafael2k
Copy link
Collaborator

rafael2k commented Jan 6, 2023

Try 6.1.2 first... see if the problem is gone. If you want I have it packaged.

@rafael2k
Copy link
Collaborator

rafael2k commented Jan 6, 2023

Here the packages:
http://abradig.org.br/maemo-crazyness/kernel/
The PR associated with this package:
https://github.com/maemo-leste/pine64-kernel/pulls

@freemangordon
Copy link
Contributor Author

will try tho one in chimaera first, then, if it is not fixed, your debs (if they differ). If I still have issues, will consider if I want to waste more time chasing bug that appears only on my HW.

@rafael2k
Copy link
Collaborator

rafael2k commented Jan 6, 2023

The one in Chimaera right now is the same of Beowulf-devel one.

rafael2k pushed a commit that referenced this issue Jan 10, 2023
commit c3ed222 upstream.

Send along the already-allocated fattr along with nfs4_fs_locations, and
drop the memcpy of fattr.  We end up growing two more allocations, but this
fixes up a crash as:

PID: 790    TASK: ffff88811b43c000  CPU: 0   COMMAND: "ls"
 #0 [ffffc90000857920] panic at ffffffff81b9bfde
 #1 [ffffc900008579c0] do_trap at ffffffff81023a9b
 #2 [ffffc90000857a10] do_error_trap at ffffffff81023b78
 #3 [ffffc90000857a58] exc_stack_segment at ffffffff81be1f45
 #4 [ffffc90000857a80] asm_exc_stack_segment at ffffffff81c009de
 #5 [ffffc90000857b08] nfs_lookup at ffffffffa0302322 [nfs]
 #6 [ffffc90000857b70] __lookup_slow at ffffffff813a4a5f
 #7 [ffffc90000857c60] walk_component at ffffffff813a86c4
 #8 [ffffc90000857cb8] path_lookupat at ffffffff813a9553
 #9 [ffffc90000857cf0] filename_lookup at ffffffff813ab86b

Suggested-by: Trond Myklebust <trondmy@hammerspace.com>
Fixes: 9558a00 ("NFS: Remove the label from the nfs4_lookup_res struct")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rafael2k pushed a commit that referenced this issue Jan 10, 2023
commit 4f40a5b upstream.

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 <smayhew@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rafael2k pushed a commit that referenced this issue Jan 10, 2023
commit 6746eae upstream.

cti_enable_hw() and cti_disable_hw() are called from an atomic context
so shouldn't use runtime PM because it can result in a sleep when
communicating with firmware.

Since commit 3c66563 ("Revert "firmware: arm_scmi: Add clock
management to the SCMI power domain""), this causes a hang on Juno when
running the Perf Coresight tests or running this command:

  perf record -e cs_etm//u -- ls

This was also missed until the revert commit because pm_runtime_put()
was called with the wrong device until commit 692c9a4 ("coresight:
cti: Correct the parameter for pm_runtime_put")

With lock and scheduler debugging enabled the following is output:

   coresight cti_sys0: cti_enable_hw -- dev:cti_sys0  parent: 20020000.cti
   BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1151
   in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 330, name: perf-exec
   preempt_count: 2, expected: 0
   RCU nest depth: 0, expected: 0
   INFO: lockdep is turned off.
   irq event stamp: 0
   hardirqs last  enabled at (0): [<0000000000000000>] 0x0
   hardirqs last disabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
   softirqs last  enabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
   softirqs last disabled at (0): [<0000000000000000>] 0x0
   CPU: 3 PID: 330 Comm: perf-exec Not tainted 6.0.0-00053-g042116d99298 #7
   Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Sep 13 2022
   Call trace:
    dump_backtrace+0x134/0x140
    show_stack+0x20/0x58
    dump_stack_lvl+0x8c/0xb8
    dump_stack+0x18/0x34
    __might_resched+0x180/0x228
    __might_sleep+0x50/0x88
    __pm_runtime_resume+0xac/0xb0
    cti_enable+0x44/0x120
    coresight_control_assoc_ectdev+0xc0/0x150
    coresight_enable_path+0xb4/0x288
    etm_event_start+0x138/0x170
    etm_event_add+0x48/0x70
    event_sched_in.isra.122+0xb4/0x280
    merge_sched_in+0x1fc/0x3d0
    visit_groups_merge.constprop.137+0x16c/0x4b0
    ctx_sched_in+0x114/0x1f0
    perf_event_sched_in+0x60/0x90
    ctx_resched+0x68/0xb0
    perf_event_exec+0x138/0x508
    begin_new_exec+0x52c/0xd40
    load_elf_binary+0x6b8/0x17d0
    bprm_execve+0x360/0x7f8
    do_execveat_common.isra.47+0x218/0x238
    __arm64_sys_execve+0x48/0x60
    invoke_syscall+0x4c/0x110
    el0_svc_common.constprop.4+0xfc/0x120
    do_el0_svc+0x34/0xc0
    el0_svc+0x40/0x98
    el0t_64_sync_handler+0x98/0xc0
    el0t_64_sync+0x170/0x174

Fix the issue by removing the runtime PM calls completely. They are not
needed here because it must have already been done when building the
path for a trace.

Fixes: 835d722 ("coresight: cti: Initial CoreSight CTI Driver")
Cc: stable <stable@kernel.org>
Reported-by: Aishwarya TCV <Aishwarya.TCV@arm.com>
Reported-by: Cristian Marussi <Cristian.Marussi@arm.com>
Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Mike Leach <mike.leach@linaro.org>
[ Fix build warnings ]
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20221025131032.1149459-1-suzuki.poulose@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rafael2k pushed a commit that referenced this issue Jan 10, 2023
commit 0e792b8 upstream.

KASAN reported a use-after-free with ftrace ops [1]. It was found from
vmcore that perf had registered two ops with the same content
successively, both dynamic. After unregistering the second ops, a
use-after-free occurred.

In ftrace_shutdown(), when the second ops is unregistered, the
FTRACE_UPDATE_CALLS command is not set because there is another enabled
ops with the same content.  Also, both ops are dynamic and the ftrace
callback function is ftrace_ops_list_func, so the
FTRACE_UPDATE_TRACE_FUNC command will not be set. Eventually the value
of 'command' will be 0 and ftrace_shutdown() will skip the rcu
synchronization.

However, ftrace may be activated. When the ops is released, another CPU
may be accessing the ops.  Add the missing synchronization to fix this
problem.

[1]
BUG: KASAN: use-after-free in __ftrace_ops_list_func kernel/trace/ftrace.c:7020 [inline]
BUG: KASAN: use-after-free in ftrace_ops_list_func+0x2b0/0x31c kernel/trace/ftrace.c:7049
Read of size 8 at addr ffff56551965bbc8 by task syz-executor.2/14468

CPU: 1 PID: 14468 Comm: syz-executor.2 Not tainted 5.10.0 #7
Hardware name: linux,dummy-virt (DT)
Call trace:
 dump_backtrace+0x0/0x40c arch/arm64/kernel/stacktrace.c:132
 show_stack+0x30/0x40 arch/arm64/kernel/stacktrace.c:196
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1b4/0x248 lib/dump_stack.c:118
 print_address_description.constprop.0+0x28/0x48c mm/kasan/report.c:387
 __kasan_report mm/kasan/report.c:547 [inline]
 kasan_report+0x118/0x210 mm/kasan/report.c:564
 check_memory_region_inline mm/kasan/generic.c:187 [inline]
 __asan_load8+0x98/0xc0 mm/kasan/generic.c:253
 __ftrace_ops_list_func kernel/trace/ftrace.c:7020 [inline]
 ftrace_ops_list_func+0x2b0/0x31c kernel/trace/ftrace.c:7049
 ftrace_graph_call+0x0/0x4
 __might_sleep+0x8/0x100 include/linux/perf_event.h:1170
 __might_fault mm/memory.c:5183 [inline]
 __might_fault+0x58/0x70 mm/memory.c:5171
 do_strncpy_from_user lib/strncpy_from_user.c:41 [inline]
 strncpy_from_user+0x1f4/0x4b0 lib/strncpy_from_user.c:139
 getname_flags+0xb0/0x31c fs/namei.c:149
 getname+0x2c/0x40 fs/namei.c:209
 [...]

Allocated by task 14445:
 kasan_save_stack+0x24/0x50 mm/kasan/common.c:48
 kasan_set_track mm/kasan/common.c:56 [inline]
 __kasan_kmalloc mm/kasan/common.c:479 [inline]
 __kasan_kmalloc.constprop.0+0x110/0x13c mm/kasan/common.c:449
 kasan_kmalloc+0xc/0x14 mm/kasan/common.c:493
 kmem_cache_alloc_trace+0x440/0x924 mm/slub.c:2950
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:675 [inline]
 perf_event_alloc.part.0+0xb4/0x1350 kernel/events/core.c:11230
 perf_event_alloc kernel/events/core.c:11733 [inline]
 __do_sys_perf_event_open kernel/events/core.c:11831 [inline]
 __se_sys_perf_event_open+0x550/0x15f4 kernel/events/core.c:11723
 __arm64_sys_perf_event_open+0x6c/0x80 kernel/events/core.c:11723
 [...]

Freed by task 14445:
 kasan_save_stack+0x24/0x50 mm/kasan/common.c:48
 kasan_set_track+0x24/0x34 mm/kasan/common.c:56
 kasan_set_free_info+0x20/0x40 mm/kasan/generic.c:358
 __kasan_slab_free.part.0+0x11c/0x1b0 mm/kasan/common.c:437
 __kasan_slab_free mm/kasan/common.c:445 [inline]
 kasan_slab_free+0x2c/0x40 mm/kasan/common.c:446
 slab_free_hook mm/slub.c:1569 [inline]
 slab_free_freelist_hook mm/slub.c:1608 [inline]
 slab_free mm/slub.c:3179 [inline]
 kfree+0x12c/0xc10 mm/slub.c:4176
 perf_event_alloc.part.0+0xa0c/0x1350 kernel/events/core.c:11434
 perf_event_alloc kernel/events/core.c:11733 [inline]
 __do_sys_perf_event_open kernel/events/core.c:11831 [inline]
 __se_sys_perf_event_open+0x550/0x15f4 kernel/events/core.c:11723
 [...]

Link: https://lore.kernel.org/linux-trace-kernel/20221103031010.166498-1-lihuafei1@huawei.com

Fixes: edb096e ("ftrace: Fix memleak when unregistering dynamic ops when tracing disabled")
Cc: stable@vger.kernel.org
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rafael2k pushed a commit that referenced this issue Jan 19, 2023
[ Upstream commit b18cba09e374637a0a3759d856a6bca94c133952 ]

Commit 9130b8d ("SUNRPC: allow for upcalls for the same uid
but different gss service") introduced `auth` argument to
__gss_find_upcall(), but in gss_pipe_downcall() it was left as NULL
since it (and auth->service) was not (yet) determined.

When multiple upcalls with the same uid and different service are
ongoing, it could happen that __gss_find_upcall(), which returns the
first match found in the pipe->in_downcall list, could not find the
correct gss_msg corresponding to the downcall we are looking for.
Moreover, it might return a msg which is not sent to rpc.gssd yet.

We could see mount.nfs process hung in D state with multiple mount.nfs
are executed in parallel.  The call trace below is of CentOS 7.9
kernel-3.10.0-1160.24.1.el7.x86_64 but we observed the same hang w/
elrepo kernel-ml-6.0.7-1.el7.

PID: 71258  TASK: ffff91ebd4be0000  CPU: 36  COMMAND: "mount.nfs"
 #0 [ffff9203ca3234f8] __schedule at ffffffffa3b8899f
 #1 [ffff9203ca323580] schedule at ffffffffa3b88eb9
 #2 [ffff9203ca323590] gss_cred_init at ffffffffc0355818 [auth_rpcgss]
 #3 [ffff9203ca323658] rpcauth_lookup_credcache at ffffffffc0421ebc
[sunrpc]
 #4 [ffff9203ca3236d8] gss_lookup_cred at ffffffffc0353633 [auth_rpcgss]
 #5 [ffff9203ca3236e8] rpcauth_lookupcred at ffffffffc0421581 [sunrpc]
 #6 [ffff9203ca323740] rpcauth_refreshcred at ffffffffc04223d3 [sunrpc]
 #7 [ffff9203ca3237a0] call_refresh at ffffffffc04103dc [sunrpc]
 #8 [ffff9203ca3237b8] __rpc_execute at ffffffffc041e1c9 [sunrpc]
 #9 [ffff9203ca323820] rpc_execute at ffffffffc0420a48 [sunrpc]

The scenario is like this. Let's say there are two upcalls for
services A and B, A -> B in pipe->in_downcall, B -> A in pipe->pipe.

When rpc.gssd reads pipe to get the upcall msg corresponding to
service B from pipe->pipe and then writes the response, in
gss_pipe_downcall the msg corresponding to service A will be picked
because only uid is used to find the msg and it is before the one for
B in pipe->in_downcall.  And the process waiting for the msg
corresponding to service A will be woken up.

Actual scheduing of that process might be after rpc.gssd processes the
next msg.  In rpc_pipe_generic_upcall it clears msg->errno (for A).
The process is scheduled to see gss_msg->ctx == NULL and
gss_msg->msg.errno == 0, therefore it cannot break the loop in
gss_create_upcall and is never woken up after that.

This patch adds a simple check to ensure that a msg which is not
sent to rpc.gssd yet is not chosen as the matching upcall upon
receiving a downcall.

Signed-off-by: minoura makoto <minoura@valinux.co.jp>
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@nec.com>
Tested-by: Hiroshi Shimamoto <h-shimamoto@nec.com>
Cc: Trond Myklebust <trondmy@hammerspace.com>
Fixes: 9130b8d ("SUNRPC: allow for upcalls for same uid but different gss service")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
rafael2k pushed a commit that referenced this issue Feb 5, 2023
commit 87b93b678e95c7d93fe6a55b0e0fbda26d8c7760 upstream.

Using GFP_KERNEL in preemption disable context, causing below warning
when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.

[   32.542271] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274
[   32.550883] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
[   32.558707] preempt_count: 1, expected: 0
[   32.562710] RCU nest depth: 0, expected: 0
[   32.566800] CPU: 3 PID: 1 Comm: swapper/0 Tainted: G        W          6.2.0-rc2-00269-gae9dcb91c606 #7
[   32.576188] Hardware name: Marvell CN106XX board (DT)
[   32.581232] Call trace:
[   32.583670]  dump_backtrace.part.0+0xe0/0xf0
[   32.587937]  show_stack+0x18/0x30
[   32.591245]  dump_stack_lvl+0x68/0x84
[   32.594900]  dump_stack+0x18/0x34
[   32.598206]  __might_resched+0x12c/0x160
[   32.602122]  __might_sleep+0x48/0xa0
[   32.605689]  __kmem_cache_alloc_node+0x2b8/0x2e0
[   32.610301]  __kmalloc+0x58/0x190
[   32.613610]  otx2_sq_aura_pool_init+0x1a8/0x314
[   32.618134]  otx2_open+0x1d4/0x9d0

To avoid use of GFP_ATOMIC for memory allocation, disable preemption
after all memory allocation is done.

Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rafael2k pushed a commit that referenced this issue Feb 5, 2023
[ Upstream commit 6c4ca03bd890566d873e3593b32d034bf2f5a087 ]

During EEH error injection testing, a deadlock was encountered in the tg3
driver when tg3_io_error_detected() was attempting to cancel outstanding
reset tasks:

crash> foreach UN bt
...
PID: 159    TASK: c0000000067c6000  CPU: 8   COMMAND: "eehd"
...
 #5 [c00000000681f990] __cancel_work_timer at c00000000019fd18
 #6 [c00000000681fa30] tg3_io_error_detected at c00800000295f098 [tg3]
 #7 [c00000000681faf0] eeh_report_error at c00000000004e25c
...

PID: 290    TASK: c000000036e5f800  CPU: 6   COMMAND: "kworker/6:1"
...
 #4 [c00000003721fbc0] rtnl_lock at c000000000c940d8
 #5 [c00000003721fbe0] tg3_reset_task at c008000002969358 [tg3]
 #6 [c00000003721fc60] process_one_work at c00000000019e5c4
...

PID: 296    TASK: c000000037a65800  CPU: 21  COMMAND: "kworker/21:1"
...
 #4 [c000000037247bc0] rtnl_lock at c000000000c940d8
 #5 [c000000037247be0] tg3_reset_task at c008000002969358 [tg3]
 #6 [c000000037247c60] process_one_work at c00000000019e5c4
...

PID: 655    TASK: c000000036f49000  CPU: 16  COMMAND: "kworker/16:2"
...:1

 #4 [c0000000373ebbc0] rtnl_lock at c000000000c940d8
 #5 [c0000000373ebbe0] tg3_reset_task at c008000002969358 [tg3]
 #6 [c0000000373ebc60] process_one_work at c00000000019e5c4
...

Code inspection shows that both tg3_io_error_detected() and
tg3_reset_task() attempt to acquire the RTNL lock at the beginning of
their code blocks.  If tg3_reset_task() should happen to execute between
the times when tg3_io_error_deteced() acquires the RTNL lock and
tg3_reset_task_cancel() is called, a deadlock will occur.

Moving tg3_reset_task_cancel() call earlier within the code block, prior
to acquiring RTNL, prevents this from happening, but also exposes another
deadlock issue where tg3_reset_task() may execute AFTER
tg3_io_error_detected() has executed:

crash> foreach UN bt
PID: 159    TASK: c0000000067d2000  CPU: 9   COMMAND: "eehd"
...
 #4 [c000000006867a60] rtnl_lock at c000000000c940d8
 #5 [c000000006867a80] tg3_io_slot_reset at c0080000026c2ea8 [tg3]
 #6 [c000000006867b00] eeh_report_reset at c00000000004de88
...
PID: 363    TASK: c000000037564000  CPU: 6   COMMAND: "kworker/6:1"
...
 #3 [c000000036c1bb70] msleep at c000000000259e6c
 #4 [c000000036c1bba0] napi_disable at c000000000c6b848
 #5 [c000000036c1bbe0] tg3_reset_task at c0080000026d942c [tg3]
 #6 [c000000036c1bc60] process_one_work at c00000000019e5c4
...

This issue can be avoided by aborting tg3_reset_task() if EEH error
recovery is already in progress.

Fixes: db84bf4 ("tg3: tg3_reset_task() needs to use rtnl_lock to synchronize")
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20230124185339.225806-1-drc@linux.vnet.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
rafael2k pushed a commit that referenced this issue Feb 21, 2023
[ Upstream commit cb80242cc679d6397e77d8a964deeb3ff218d2b5 ]

When running kfence_test, I found some testcases failed like this:

 # test_out_of_bounds_read: EXPECTATION FAILED at mm/kfence/kfence_test.c:346
 Expected report_matches(&expect) to be true, but is false
 not ok 1 - test_out_of_bounds_read

The corresponding call-trace is:

 BUG: KFENCE: out-of-bounds read in kunit_try_run_case+0x38/0x84

 Out-of-bounds read at 0x(____ptrval____) (32B right of kfence-#10):
  kunit_try_run_case+0x38/0x84
  kunit_generic_run_threadfn_adapter+0x12/0x1e
  kthread+0xc8/0xde
  ret_from_exception+0x0/0xc

The kfence_test using the first frame of call trace to check whether the
testcase is succeed or not. Commit 6a00ef4 ("riscv: eliminate
unreliable __builtin_frame_address(1)") skip first frame for all
case, which results the kfence_test failed. Indeed, we only need to skip
the first frame for case (task==NULL || task==current).

With this patch, the call-trace will be:

 BUG: KFENCE: out-of-bounds read in test_out_of_bounds_read+0x88/0x19e

 Out-of-bounds read at 0x(____ptrval____) (1B left of kfence-#7):
  test_out_of_bounds_read+0x88/0x19e
  kunit_try_run_case+0x38/0x84
  kunit_generic_run_threadfn_adapter+0x12/0x1e
  kthread+0xc8/0xde
  ret_from_exception+0x0/0xc

Fixes: 6a00ef4 ("riscv: eliminate unreliable __builtin_frame_address(1)")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Tested-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20221207025038.1022045-1-liushixin2@huawei.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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

2 participants