scsi: hisi_sas: Increase debugfs_dump_index after dump is completed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Ike Panhc | ||
Ubuntu-20.04-hwe |
Fix Released
|
Undecided
|
Ike Panhc | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Ike Panhc | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Trigger dump on hisi_sas in debugfs will cause kernel oops.
[Test Plan]
1) modprobe hisi_sas_main with "debugfs_enable=1"
2) echo 1 | sudo tee /sys/kernel/
3) dmesg | grep Oops
[Regression Risk]
Only touch code in hisi_sas. Need to run full test on hisi_sas. Other drivers/platforms are not affected.
================
[Bug Description]
When the hisi_sas_main driver is loaded, the DFX function is enabled. When the dump is triggered or the SAS controller is reset, call_trace is displayed. In addition, the hisi_sas_v3_hw driver is occupied and cannot be uninstalled.
[Steps to Reproduce]
1)dmesg -C
2)dmesg
3)lsblk
4)lsscsi -p
5)lsmod | grep hisi_sas_v3
6)rmmod hisi_sas_v3_hw
7)rmmod hisi_sas_main
8)modprobe hisi_sas_main debugfs_enable=1
9)modprobe hisi_sas_v3_hw
10)cd /sys/kernel/
11)ll
12)echo 1 > trigger_dump
13)echo 1 > trigger_dump
14)dmesg
[Actual Results]
[ 1005.899976] sas: broadcast received: 0
[ 1005.899997] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.901775] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.901777] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.901793] sas: broadcast received: 0
[ 1005.901820] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.903563] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.903570] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.903586] sas: broadcast received: 0
[ 1005.903611] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.905387] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.905388] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.905404] sas: broadcast received: 0
[ 1005.905429] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.907161] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.907168] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.907182] sas: broadcast received: 0
[ 1005.907207] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.908944] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.908946] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.909025] sas: broadcast received: 0
[ 1005.909062] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.910912] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.910919] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.910947] sas: broadcast received: 0
[ 1005.910985] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.912843] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.912847] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.912877] sas: broadcast received: 0
[ 1005.912911] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.915191] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.915198] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.915221] sas: broadcast received: 0
[ 1005.915259] sas: REVALIDATING DOMAIN on port 0, pid:1170
[ 1005.917957] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.917965] sas: done REVALIDATING DOMAIN on port 0, pid:1170, res 0x0
[ 1005.920337] sd 4:0:11:0: [sdl] Attached SCSI disk
[ 1005.921692] sd 4:0:4:0: [sde] Attached SCSI disk
[ 1008.107610] hisi_sas_v3_hw 0000:b4:02.0: 16 hw queues
[ 1008.112712] scsi host6: hisi_sas_v3_hw
[ 1010.428061] hisi_sas_v3_hw 0000:b4:04.0: 16 hw queues
[ 1010.433120] scsi host7: hisi_sas_v3_hw
root@ubuntu:
[Expected Results]
Recurrence Logs:
[ 360.441633] SET = 0, FnV = 0
[ 360.444689] EA = 0, S1PTW = 0
[ 360.447863] Data abort info:
[ 360.450783] ISV = 0, ISS = 0x00000044
[ 360.454663] CM = 0, WnR = 1
[ 360.457673] user pgtable: 4k pages, 48-bit VAs, pgdp=000000211b
[ 360.464140] [0000000000000000] pgd=00000000000
[ 360.470969] Internal error: Oops: 96000044 [#2] SMP
[ 360.475844] Modules linked in: hisi_sas_v3_hw hisi_sas_main nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua ipmi_ssif joydev input_leds efi_pstore arm_spe_pmu hisi_hpre ecdh_generic libcurve25519_
[ 360.476356] aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher [last unloaded: hisi_sas_main]
[ 360.572957] CPU: 12 PID: 1389 Comm: kworker/u256:3 Tainted: G D 5.13.0-44-generic #49~20.04.1-Ubuntu
[ 360.583361] Hardware name: Huawei TaiShan 200 (Model 2280)/BC82AMDD, BIOS 2280-V2 CS V5.B221.01 12/09/2021
[ 360.592983] Workqueue: 0000:b4:04.0 hisi_sas_
[ 360.600138] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[ 360.606135] pc : debugfs_
[ 360.612841] lr : debugfs_
[ 360.619536] sp : ffff80002fdebd10
[ 360.622846] x29: ffff80002fdebd10 x28: 0000000000000000 x27: 0000000000000000
[ 360.629974] x26: ffff202000cdaa6c x25: 0000000000000000 x24: ffff0020fe8fe8b0
[ 360.637101] x23: 0000000000000000 x22: ffff202017395ce8 x21: ffff2020173a4880
[ 360.644225] x20: 0000000000000000 x19: ffff202017380880 x18: 000000000000000e
[ 360.651351] x17: 0000000000000001 x16: ffffba5e9251f9a8 x15: 0000000000000000
[ 360.658474] x14: 0000000000000000 x13: 0000000000000020 x12: ffffba5e9388fa58
[ 360.665599] x11: 0000000000000040 x10: ffffba5e949a7cc0 x9 : ffffba5e4c21a8e4
[ 360.672724] x8 : ffff202001a56ff0 x7 : 0000000000000000 x6 : 0000000000000000
[ 360.679848] x5 : ffff202001a56fc8 x4 : ffff202001a57050 x3 : 0000000000003011
[ 360.686974] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[ 360.694100] Call trace:
[ 360.696547] debugfs_
[ 360.702900] hisi_sas_
[ 360.709168] hisi_sas_
[ 360.715175] process_
[ 360.719194] worker_
[ 360.722946] kthread+0x114/0x120
[ 360.726177] ret_from_
[ 360.729762] Code: d503201f 2a1403e1 f9401660 97fff114 (b8346ae0)
[ 360.735843] ---[ end trace ff032567bd4ebc0a ]---
root@mycover:~#
Normal log:
[ 1005.899976] sas: broadcast received: 0
[ 1005.899997] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.901775] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.901777] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.901793] sas: broadcast received: 0
[ 1005.901820] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.903563] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.903570] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.903586] sas: broadcast received: 0
[ 1005.903611] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.905387] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.905388] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.905404] sas: broadcast received: 0
[ 1005.905429] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.907161] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.907168] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.907182] sas: broadcast received: 0
[ 1005.907207] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.908944] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.908946] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.909025] sas: broadcast received: 0
[ 1005.909062] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.910912] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.910919] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.910947] sas: broadcast received: 0
[ 1005.910985] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.912843] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.912847] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.912877] sas: broadcast received: 0
[ 1005.912911] sas: REVALIDATING DOMAIN on port 0, pid:8
[ 1005.915191] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.915198] sas: done REVALIDATING DOMAIN on port 0, pid:8, res 0x0
[ 1005.915221] sas: broadcast received: 0
[ 1005.915259] sas: REVALIDATING DOMAIN on port 0, pid:1170
[ 1005.917957] sas: ex 570fd45f9d17b01f phys DID NOT change
[ 1005.917965] sas: done REVALIDATING DOMAIN on port 0, pid:1170, res 0x0
[ 1005.920337] sd 4:0:11:0: [sdl] Attached SCSI disk
[ 1005.921692] sd 4:0:4:0: [sde] Attached SCSI disk
[ 1008.107610] hisi_sas_v3_hw 0000:b4:02.0: 16 hw queues
[ 1008.112712] scsi host6: hisi_sas_v3_hw
[ 1010.428061] hisi_sas_v3_hw 0000:b4:04.0: 16 hw queues
[ 1010.433120] scsi host7: hisi_sas_v3_hw
root@ubuntu:
[Reproducibility]
Conditionally recurs.
[Additional information2022
Ubuntu-
scsi: hisi_sas: Increase debugfs_dump_index after dump is
completed
CVE References
Changed in linux (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Ike Panhc (ikepanhc) |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Jammy): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Kinetic): | |
status: | Fix Committed → Fix Released |
Changed in kunpeng920: | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-donejammy removed: verification-needed-jammy |
tags: |
added: verification-done-jammy removed: verification-donejammy |
LGTM, I will try to backport and reproduce.