hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/base/cpu.c
....@@ -489,7 +489,8 @@
489489 bool cpu_is_hotpluggable(unsigned cpu)
490490 {
491491 struct device *dev = get_cpu_device(cpu);
492
- return dev && container_of(dev, struct cpu, dev)->hotpluggable;
492
+ return dev && container_of(dev, struct cpu, dev)->hotpluggable
493
+ && tick_nohz_cpu_hotpluggable(cpu);
493494 }
494495 EXPORT_SYMBOL_GPL(cpu_is_hotpluggable);
495496
....@@ -578,6 +579,18 @@
578579 return sysfs_emit(buf, "Not affected\n");
579580 }
580581
582
+ssize_t __weak cpu_show_gds(struct device *dev,
583
+ struct device_attribute *attr, char *buf)
584
+{
585
+ return sysfs_emit(buf, "Not affected\n");
586
+}
587
+
588
+ssize_t __weak cpu_show_spec_rstack_overflow(struct device *dev,
589
+ struct device_attribute *attr, char *buf)
590
+{
591
+ return sysfs_emit(buf, "Not affected\n");
592
+}
593
+
581594 static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
582595 static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
583596 static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
....@@ -589,6 +602,8 @@
589602 static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL);
590603 static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL);
591604 static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL);
605
+static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
606
+static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL);
592607
593608 static struct attribute *cpu_root_vulnerabilities_attrs[] = {
594609 &dev_attr_meltdown.attr,
....@@ -602,6 +617,8 @@
602617 &dev_attr_srbds.attr,
603618 &dev_attr_mmio_stale_data.attr,
604619 &dev_attr_retbleed.attr,
620
+ &dev_attr_gather_data_sampling.attr,
621
+ &dev_attr_spec_rstack_overflow.attr,
605622 NULL
606623 };
607624