------- Comment From <email address hidden> 2020-11-03 13:56 EDT-------
Hello Patricia,
We have this script(mpe.py) which will detect if a vmlinux has the alignment issue or not. We ran it against 16.04, 18.04, 20.04 and 21.04 kernels, and we only found the misalignment in 20.04 and 21.04. 16.04's kernel doesn't have the p9_hmi_special_emu().
16.04:
user@ltc-zz9:/tmp/test/boot$ ~/mpe.py vmlinux-4.4.0-193-generic System.map-4.4.0-193-generic
Couldn't find p9_hmi_special_emu in objdump output
Error: couldn't find stvx!
18.04:
user@ltc-zz9:/tmp/test/boot$ ~/mpe.py vmlinux-4.15.0-122-generic System.map-4.15.0-122-generic
Couldn't find p9_hmi_special_emu in objdump output
stvx found using register r25:
c00000000002988c: ce c9 00 7c stvx v0,0,r25
addi found using offset 32:
c000000000029884: 20 00 21 3b addi r25,r1,32
OK - offset is aligned
20.04:
user@ltc-zz9:/tmp/test/boot$ ~/mpe.py vmlinux-5.4.0-52-generic System.map-5.4.0-52-generic
stvx found using register r28:
c00000000002cbec: ce e1 00 7c stvx v0,0,r28
addi found using offset 40:
c00000000002cbe4: 28 00 81 3b addi r28,r1,40
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Offset is misaligned - bug present !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20.10:
user@ltc-zz9:/tmp/test/boot$ ~/mpe.py vmlinux-5.8.0-26-generic System.map-5.8.0-26-generic
stvx found using register r9:
c000000000025a78: ce 49 00 7c stvx v0,0,r9
addi found using offset 40:
c000000000025a70: 28 00 21 39 addi r9,r1,40
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Offset is misaligned - bug present !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
------- Comment From <email address hidden> 2020-11-03 13:56 EDT------- special_ emu().
Hello Patricia,
We have this script(mpe.py) which will detect if a vmlinux has the alignment issue or not. We ran it against 16.04, 18.04, 20.04 and 21.04 kernels, and we only found the misalignment in 20.04 and 21.04. 16.04's kernel doesn't have the p9_hmi_
16.04: zz9:/tmp/ test/boot$ ~/mpe.py vmlinux- 4.4.0-193- generic System. map-4.4. 0-193-generic zz9:/tmp/ test/boot$ ~/mpe.py vmlinux- 4.15.0- 122-generic System. map-4.15. 0-122-generic zz9:/tmp/ test/boot$ ~/mpe.py vmlinux- 5.4.0-52- generic System. map-5.4. 0-52-generic !!!!!!! !!!!!!! !!!!!!! !!!!!!! !!!!! !!!!!!! !!!!!!! !!!!!!! !!!!!!! !!!!! zz9:/tmp/ test/boot$ ~/mpe.py vmlinux- 5.8.0-26- generic System. map-5.8. 0-26-generic !!!!!!! !!!!!!! !!!!!!! !!!!!!! !!!!! !!!!!!! !!!!!!! !!!!!!! !!!!!!! !!!!!
user@ltc-
Couldn't find p9_hmi_special_emu in objdump output
Error: couldn't find stvx!
18.04:
user@ltc-
Couldn't find p9_hmi_special_emu in objdump output
stvx found using register r25:
c00000000002988c: ce c9 00 7c stvx v0,0,r25
addi found using offset 32:
c000000000029884: 20 00 21 3b addi r25,r1,32
OK - offset is aligned
20.04:
user@ltc-
stvx found using register r28:
c00000000002cbec: ce e1 00 7c stvx v0,0,r28
addi found using offset 40:
c00000000002cbe4: 28 00 81 3b addi r28,r1,40
!!!!!!!
!! Offset is misaligned - bug present !!
!!!!!!!
20.10:
user@ltc-
stvx found using register r9:
c000000000025a78: ce 49 00 7c stvx v0,0,r9
addi found using offset 40:
c000000000025a70: 28 00 21 39 addi r9,r1,40
!!!!!!!
!! Offset is misaligned - bug present !!
!!!!!!!
I will attach the mpe.py script.