Comment 24 for bug 1822870

Revision history for this message
Kalpana S Shetty (kalshett) wrote :

Test Environment:
- Witherspoon DD2.3
- Ubu 18.04.2

Test Result:
Ubuntu 18.04.2 LTS ltc-wcwsp3 hvc0

ltc-wcwsp3 login:
Ubuntu 18.04.2 LTS ltc-wcwsp3 hvc0

ltc-wcwsp3 login: root
Password:
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-50-generic ppc64le)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage
root@ltc-wcwsp3:~# uname -a
Linux ltc-wcwsp3 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:55:18 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux
root@ltc-wcwsp3:~# tail /proc/cpuinfo
cpu : POWER9, altivec supported
clock : 3800.000000MHz
revision : 2.3 (pvr 004e 1203)

timebase : 512000000
platform : PowerNV
model : 8335-GTW
machine : PowerNV 8335-GTW
firmware : OPAL
MMU : Radix

root@ltc-wcwsp3:~# grep -H . /sys/devices/system/cpu/vulnerabilities/spectre_v2
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Software count cache flush (hardware accelerated)

root@ltc-wcwsp3:~# dmesg | grep count-cache-flush
[ 0.000000] count-cache-flush: hardware assisted flush sequence enabled

root@ltc-wcwsp3:~# echo x > /proc/sysrq-trigger
[ 337.227090] sysrq: SysRq : Entering xmon
cpu 0x50: Vector: 0 at [c000201bebeefae0]
    pc: c0000000000e59f8: sysrq_handle_xmon+0xc8/0xd0
    lr: c0000000000e59f8: sysrq_handle_xmon+0xc8/0xd0
    sp: c000201bebeefc40
   msr: 9000000000009033
  current = 0xc000201bebe67600
  paca = 0xc00000000fab7000 softe: 0 irq_happened: 0x01
    pid = 5129, comm = bash
Linux version 4.15.0-50-generic (buildd@bos02-ppc64el-006) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #54-Ubuntu SMP Mon May 6 18:55:18 UTC 2019 (Ubuntu 4.15.0-50.54-generic 4.15.18)
enter ? for help
[c000201bebeefc70] c0000000007fbe28 __handle_sysrq+0xf8/0x2c0
[c000201bebeefd10] c0000000007fc638 write_sysrq_trigger+0x68/0x90
[c000201bebeefd40] c000000000487bc8 proc_reg_write+0x88/0xd0
[c000201bebeefd70] c0000000003da9fc __vfs_write+0x3c/0x70
[c000201bebeefd90] c0000000003dac58 vfs_write+0xd8/0x220
[c000201bebeefde0] c0000000003daf78 SyS_write+0x68/0x110
[c000201bebeefe30] c00000000000b288 system_call+0x5c/0x70
--- Exception: c01 (System Call) at 000070566a24e420
SP (7ffff6712c70) is in userspace
50:mon>
50:mon> di $_switch 20
c00000000000db00 7c0802a6 mflr r0
c00000000000db04 f8010010 std r0,16(r1)
c00000000000db08 f821fe31 stdu r1,-464(r1)
c00000000000db0c f9c100e0 std r14,224(r1)
c00000000000db10 f9e100e8 std r15,232(r1)
c00000000000db14 fa0100f0 std r16,240(r1)
c00000000000db18 fa2100f8 std r17,248(r1)
c00000000000db1c fa410100 std r18,256(r1)
c00000000000db20 fa610108 std r19,264(r1)
c00000000000db24 fa810110 std r20,272(r1)
c00000000000db28 faa10118 std r21,280(r1)
c00000000000db2c fac10120 std r22,288(r1)
c00000000000db30 fae10128 std r23,296(r1)
c00000000000db34 fb010130 std r24,304(r1)
c00000000000db38 fb210138 std r25,312(r1)
c00000000000db3c fb410140 std r26,320(r1)
c00000000000db40 fb610148 std r27,328(r1)
c00000000000db44 fb810150 std r28,336(r1)
c00000000000db48 fba10158 std r29,344(r1)
c00000000000db4c fbc10160 std r30,352(r1)
c00000000000db50 fbe10168 std r31,360(r1)
c00000000000db54 f8010170 std r0,368(r1)
c00000000000db58 7ee00026 mfcr r23
c00000000000db5c fae101a0 std r23,416(r1)
c00000000000db60 f8230000 std r1,0(r3)
c00000000000db64 4bffdb1d bl c00000000000b680 # flush_count_cache+0x0/0x2480
c00000000000db68 3cc06000 lis r6,24576
c00000000000db6c 7d40322c dcbt 0,r6,10
c00000000000db70 38c4f4d0 addi r6,r4,-2864
c00000000000db74 f8cd0260 std r6,608(r13)
c00000000000db78 e9040000 ld r8,0(r4)
c00000000000db7c 48000064 b c00000000000dbe0 # _switch+0xe0/0x180
50:mon> di $flush_count_cache 4d
c00000000000b680 7d2802a6 mflr r9
c00000000000b684 48000005 bl c00000000000b688 # flush_count_cache+0x8/0x2480
 ...
c00000000000b784 4800001c b c00000000000b7a0 # flush_count_cache+0x120/0x2480
c00000000000b788 60000000 nop
 ...
c00000000000b7a0 7d2803a6 mtlr r9
c00000000000b7a4 39207fff li r9,32767
c00000000000b7a8 7d2903a6 mtctr r9
c00000000000b7ac 4c400420 bcctr- 2,lt
c00000000000b7b0 4e800020 blr
50:mon>

Summary:
Mitigation fix validation passed.