[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_hwcaps+0xb8/0xd4 [ 0.664023] setup_cpu_features+0x60/0xf8 [ 0.665216] smp_cpus_done+0x34/0xa8 [ 0.666547] smp_init+0x120/0x138 [ 0.667555] kernel_init_freeable+0xf4/0x260 [ 0.668860] kernel_init+0x18/0x110 [ 0.670025] ret_from_fork+0x10/0x18
[Steps to Reproduce] 1) boot this system 2) uname -a Ubuntu 4.15.0-99.100-generic 4.15.18
[Actual Results] boot error: [ 0.662089] Call trace: [ 0.662870] setup_elf_hwcaps+0xb8/0xd4 [ 0.664023] setup_cpu_features+0x60/0xf8 [ 0.665216] smp_cpus_done+0x34/0xa8 [ 0.666547] smp_init+0x120/0x138 [ 0.667555] kernel_init_freeable+0xf4/0x260 [ 0.668860] kernel_init+0x18/0x110 [ 0.670025] ret_from_fork+0x10/0x18
[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
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d71be2b6c0e19180b5f80a6d42039cc074a693a2
backport this following code into "static const struct arm64_cpu_capabilities arm64_elf_hwcaps[]" which will be error.
1274 #ifdef CONFIG_ARM64_SSBD 1275 { 1276 .desc = "Speculative Store Bypassing Safe (SSBS)", 1277 .capability = ARM64_SSBS, 1278 .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE, 1279 .matches = has_cpuid_feature, 1280 .sys_reg = SYS_ID_AA64PFR1_EL1, 1281 .field_pos = ID_AA64PFR1_SSBS_SHIFT, 1282 .sign = FTR_UNSIGNED, 1283 .min_field_value = ID_AA64PFR1_SSBS_PSTATE_ONLY, 1284 .cpu_enable = cpu_enable_ssbs, 1285 },
[Resolution]
Can you backport aboving code into "static const struct arm64_cpu_capabilities arm64_features[] = {"?
[Bug Description]
ubuntu 18.04.1 fail to enable this SSBS function, this sys log will call trace as follow:
[ 0.662089] Call trace: hwcaps+ 0xb8/0xd4 features+ 0x60/0xf8 done+0x34/ 0xa8 0x120/0x138 init_freeable+ 0xf4/0x260 init+0x18/ 0x110 fork+0x10/ 0x18
[ 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] 99.100- generic 4.15.18
1) boot this system
2) uname -a
Ubuntu 4.15.0-
[Actual Results] hwcaps+ 0xb8/0xd4 features+ 0x60/0xf8 done+0x34/ 0xa8 0x120/0x138 init_freeable+ 0xf4/0x260 init+0x18/ 0x110 fork+0x10/ 0x18
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
https:/ /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=d71be2b6c0e 19180b5f80a6d42 039cc074a693a2
backport this following code into "static const struct arm64_cpu_ capabilities arm64_elf_hwcaps[]" which will be error.
1274 #ifdef CONFIG_ARM64_SSBD WEAK_LOCAL_ CPU_FEATURE, AA64PFR1_ EL1, SSBS_SHIFT, SSBS_PSTATE_ ONLY,
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_ capabilities arm64_features[] = {"?