arm64 gcov in 5.8 breaks when trying to enable it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Confirmed
|
Unknown
|
|||
linux (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King |
Bug Description
Running:
sudo lcov --zerocounters on a gcov enabled kernel causes a read-only splat:
[ 139.798968] Unable to handle kernel write to read-only memory at virtual address ffffb4511ee6bb10
[ 139.803325] Mem abort info:
[ 139.804882] ESR = 0x9600004e
[ 139.806265] EC = 0x25: DABT (current EL), IL = 32 bits
[ 139.811261] SET = 0, FnV = 0
[ 139.814163] EA = 0, S1PTW = 0
[ 139.816545] Data abort info:
[ 139.817852] ISV = 0, ISS = 0x0000004e
[ 139.820023] CM = 0, WnR = 1
[ 139.821350] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000050
[ 139.825005] [ffffb4511ee6bb10] pgd=00000001b6f
[ 139.832061] Internal error: Oops: 9600004e [#1] SMP
[ 139.835002] Modules linked in: nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua efi_pstore qemu_fw_cfg sch_fq_codel drm virtio_rng ip_t
ables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c rai
d1 raid0 multipath linear crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_net net_failover xhci_pci virtio_blk virtio_scsi failover xhci_pci_ren
esas aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher
[ 139.865929] CPU: 5 PID: 1235 Comm: lcov Tainted: G W 5.8.0-8-generic #9
[ 139.871293] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
[ 139.876248] pstate: 20400005 (nzCv daif +PAN -UAO BTYPE=--)
[ 139.879993] pc : __memset+
[ 139.882387] lr : gcov_info_
[ 139.885404] sp : ffff8000122f3bf0
[ 139.887730] x29: ffff8000122f3bf0 x28: ffff000167480f40
[ 139.891129] x27: 0000000000000000 x26: ffffb450e46bc060
[ 139.894688] x25: 0000000000000001 x24: ffffb450e46bc040
[ 139.897391] x23: 0000000000000000 x22: ffffb450e46bc0a8
[ 139.900064] x21: ffffb45122ba5db8 x20: ffffb450e46bc068
[ 139.902681] x19: ffffb450e46bc068 x18: 0000000000000000
[ 139.905345] x17: 0000000000000000 x16: 0000000000000000
[ 139.908016] x15: 0000000000000000 x14: 0000000000000000
[ 139.910625] x13: 0000000000000000 x12: 0000000000000000
[ 139.913260] x11: 0000000000000000 x10: 0000000000000000
[ 139.915922] x9 : 0000000000000000 x8 : ffffb4511ee6bb10
[ 139.918531] x7 : 0000000000000000 x6 : 000000000000003f
[ 139.921196] x5 : 0000000000000040 x4 : 0000000000000030
[ 139.923852] x3 : 00000007235d7fd0 x2 : 00000007235d7fd0
[ 139.926460] x1 : 0000000000000000 x0 : ffffb4511ee6bb10
[ 139.929126] Call trace:
[ 139.930349] __memset+
[ 139.932025] reset_node+
[ 139.933662] reset_write+
[ 139.935389] full_proxy_
[ 139.937349] vfs_write+
[ 139.939031] ksys_write+
[ 139.940766] __arm64_
[ 139.942705] invoke_
[ 139.944601] el0_svc_
[ 139.946961] do_el0_
[ 139.948651] el0_svc+0x70/0x114
[ 139.950206] el0_sync_
[ 139.952239] el0_sync+
[ 139.953894] Code: f101007f fa45a068 54fffc0b aa0303e2 (a9001d07)
[ 139.956946] ---[ end trace 71e2f9cc3eaddf4e ]---
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
status: | New → In Progress |
description: | updated |
Changed in linux: | |
status: | Unknown → Confirmed |
5.8 kernel running on a QEMU KVM Virtual Machine, arm64, gcov enabled:
CONFIG_ GCOV_KERNEL= y ARCH_HAS_ GCOV_PROFILE_ ALL=y GCOV_PROFILE_ ALL=y
CONFIG_
CONFIG_
running: sudo lcov --zerocounters
..causes the following splat:
[ 78.634926] Unable to handle kernel write to read-only memory at virtual address ffffd764f255bb10 75f000 ff003, p4d=00000001b6f ff003, pud=00000001b6f fe003, pmd=00400000b50 00f91 0x148/0x188 reset+0xa0/ 0x110 0x148/0x188 0x70/0xc0 0xc0/0x130 write+0x98/ 0x110 0x18c/0x3e0 0xc4/0x1f0 sys_write+ 0x44/0x60 syscall+ 0x74/0x150 common. constprop. 0+0x94/ 0x264 svc+0x5c/ 0x7c handler+ 0x140/0x39c
[ 78.639076] Mem abort info:
[ 78.640313] ESR = 0x9600004e
[ 78.641656] EC = 0x25: DABT (current EL), IL = 32 bits
[ 78.644351] SET = 0, FnV = 0
[ 78.645766] EA = 0, S1PTW = 0
[ 78.649526] Data abort info:
[ 78.654341] ISV = 0, ISS = 0x0000004e
[ 78.656851] CM = 0, WnR = 1
[ 78.659043] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000b7
[ 78.665822] [ffffd764f255bb10] pgd=00000001b6f
[ 78.677367] Internal error: Oops: 9600004e [#1] SMP
[ 78.681204] Modules linked in: nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua efi_pstore qemu_fw_cfg sch_fq_codel drm virtio_rng ip_t
ables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c rai
d1 raid0 multipath linear crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_net xhci_pci net_failover virtio_blk virtio_scsi failover xhci_pci_ren
esas aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher
[ 78.722642] CPU: 14 PID: 1175 Comm: lcov Tainted: G W 5.8.0-8-generic #9
[ 78.729364] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
[ 78.733467] pstate: 20400005 (nzCv daif +PAN -UAO BTYPE=--)
[ 78.736219] pc : __memset+
[ 78.737993] lr : gcov_info_
[ 78.740037] sp : ffff800010e53bf0
[ 78.741624] x29: ffff800010e53bf0 x28: ffff00015a648000
[ 78.744181] x27: 0000000000000000 x26: ffffd764e3df4060
[ 78.746776] x25: 0000000000000001 x24: ffffd764e3df4040
[ 78.749310] x23: 0000000000000000 x22: ffffd764e3df40a8
[ 78.751976] x21: ffffd764f6295db8 x20: ffffd764e3df4068
[ 78.754642] x19: ffffd764e3df4068 x18: 0000000000000000
[ 78.757265] x17: 0000000000000000 x16: 0000000000000000
[ 78.759922] x15: 0000000000000000 x14: 0000000000000000
[ 78.762585] x13: 0000000000000000 x12: 0000000000000000
[ 78.765209] x11: 0000000000000000 x10: 0000000000000000
[ 78.767861] x9 : 0000000000000000 x8 : ffffd764f255bb10
[ 78.770518] x7 : 0000000000000000 x6 : 000000000000003f
[ 78.773135] x5 : 0000000000000040 x4 : 0000000000000030
[ 78.775793] x3 : 000000071ef97fd0 x2 : 000000071ef97fd0
[ 78.778449] x1 : 0000000000000000 x0 : ffffd764f255bb10
[ 78.781075] Call trace:
[ 78.782329] __memset+
[ 78.783980] reset_node+
[ 78.785628] reset_write+
[ 78.787397] full_proxy_
[ 78.789354] vfs_write+
[ 78.791086] ksys_write+
[ 78.792778] __arm64_
[ 78.794771] invoke_
[ 78.796639] el0_svc_
[ 78.799049] do_el0_
[ 78.800702] el0_svc+0x70/0x114
[ 78.802311] el0_sync_
[ 78.804...