[ssbs-0118] backport SSBS bug (arm64: cpufeature: Detect SSBS and advertise to userspace)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Ike Panhc | ||
Ubuntu-18.04 |
Fix Released
|
Undecided
|
Ike Panhc | ||
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Ike Panhc |
Bug Description
[Impact]
The SSBS patch in 4.14 stable kernel, and mainline kernel adds snippet
into arm64_cpufeatures but in bionic kernel, it is landed into arm64_elf_hwcaps.
[Fix]
Move SSBS snippet from arm64_elf_hwcaps back to arm64_features
[Test]
No known tool for SSB attack. Regression test only.
[Regression Potential]
Regression might be on all arm64 platforms. Regression test on all arm64 platform we have is recommended.
=======
[Bug Description]
ubuntu 18.04.1 fail to enable this SSBS function, this sys log will call trace as follow:
[ 0.662089] Call trace:
[ 0.662870] setup_elf_
[ 0.664023] setup_cpu_
[ 0.665216] smp_cpus_
[ 0.666547] smp_init+
[ 0.667555] kernel_
[ 0.668860] kernel_
[ 0.670025] ret_from_
[Steps to Reproduce]
1) boot this system
2) uname -a
Ubuntu 4.15.0-
[Actual Results]
boot error:
[ 0.662089] Call trace:
[ 0.662870] setup_elf_
[ 0.664023] setup_cpu_
[ 0.665216] smp_cpus_
[ 0.666547] smp_init+
[ 0.667555] kernel_
[ 0.668860] kernel_
[ 0.670025] ret_from_
[Expected Results]
no error
[Reproducibility]
NA
[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required):
arm64: cpufeature: Detect SSBS and advertise to userspace
backport this following code into "static const struct arm64_cpu_
1274 #ifdef CONFIG_ARM64_SSBD
1275 {
1276 .desc = "Speculative Store Bypassing Safe (SSBS)",
1277 .capability = ARM64_SSBS,
1278 .type = ARM64_CPUCAP_
1279 .matches = has_cpuid_feature,
1280 .sys_reg = SYS_ID_
1281 .field_pos = ID_AA64PFR1_
1282 .sign = FTR_UNSIGNED,
1283 .min_field_value = ID_AA64PFR1_
1284 .cpu_enable = cpu_enable_ssbs,
1285 },
[Resolution]
Can you backport aboving code into "static const struct arm64_cpu_
summary: |
- [ssbs-0118] backport SSB bug (arm64: cpufeature: Detect SSBS and + [ssbs-0118] backport SSBS bug (arm64: cpufeature: Detect SSBS and advertise to userspace) |
tags: | added: tairadar |
Changed in kunpeng920: | |
status: | Incomplete → In Progress |
assignee: | nobody → Ike Panhc (ikepanhc) |
Changed in linux (Ubuntu): | |
status: | New → In Progress |
Changed in linux (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in linux (Ubuntu): | |
status: | In Progress → Invalid |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Ike Panhc (ikepanhc) |
description: | updated |
tags: | removed: tairadar |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → Medium |
status: | In Progress → Fix Committed |
Changed in kunpeng920: | |
status: | In Progress → Fix Committed |
Changed in kunpeng920: | |
status: | Fix Committed → Fix Released |
The suggested code snippet is already in the current bionic master kernel tree (ubuntu kernel 4.15). See https:/ /git.launchpad. net/~ubuntu- kernel/ ubuntu/ +source/ linux/+ git/bionic/ tree/arch/ arm64/kernel/ cpufeature. c#n1256
The code snippet landed at the event of "Bionic update: upstream stable patchset 2019-11-08" LP:#1851876 by pulling two upstream commits[1], which should be released with bionic kernel version Ubuntu- 4.15.0- 71.80.
NEXT ACTION:
The working fix may be the other solution. Let's try to reproduce the issue on our site. @Fred, would you please elaborate how you enabled the SBSS function?
[1] 21a95b61cad62e3 918425eac7 5c4ae39a57ce278 6c4e95c9a1 )
upstream commits 8f04e8e6e29c934
(corresponding bionic-4.15 commit fd872fd82e12d76
upstream commits d71be2b6c0e1918 0b5f80a6d42039c c074a693a2 a543d651f902fb7 d4ebf0610c )
(corresponding bionic-4.15 commit 2a3135c3033cd80