Skip to content

Commit cdfbe54

Browse files
* Revert "add toggle for disabling newly added USB devices" * UPSTREAM: wireguard: do not use -O3 * ARM64/errata: Kryo 2xx/3xx Gold might be affected by Spectre BHB * ARM64/errata: Check arm64_psci_bp_harden_cpus list too for `is_spectrev2_safe() * ARM64/errata: Ensure vulnerable CPUs are actually flagged on `is_spectrev2_safe()
2 parents f2be5e9 + d17f7dd commit cdfbe54

File tree

4 files changed

+12
-26
lines changed

4 files changed

+12
-26
lines changed

arch/arm64/kernel/cpu_errata.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static bool is_spectre_bhb_fw_affected(int scope)
742742
static const struct midr_range spectre_bhb_firmware_mitigated_list[] = {
743743
MIDR_ALL_VERSIONS(MIDR_CORTEX_A73),
744744
MIDR_ALL_VERSIONS(MIDR_CORTEX_A75),
745+
MIDR_ALL_VERSIONS(MIDR_KRYO3G),
746+
MIDR_ALL_VERSIONS(MIDR_KRYO2XX_GOLD),
745747
{},
746748
};
747749
bool cpu_in_list = is_midr_in_range_list(read_cpuid_id(),
@@ -877,8 +879,16 @@ static void kvm_setup_bhb_slot(const char *hyp_vecs_start) { };
877879

878880
static bool is_spectrev2_safe(void)
879881
{
882+
static const struct midr_range arm64_psci_bp_harden_cpus[] = {
883+
MIDR_ALL_VERSIONS(MIDR_KRYO3G),
884+
MIDR_ALL_VERSIONS(MIDR_KRYO2XX_GOLD),
885+
{},
886+
};
887+
880888
return !is_midr_in_range_list(read_cpuid_id(),
881-
arm64_bp_harden_smccc_cpus);
889+
arm64_psci_bp_harden_cpus) &&
890+
!is_midr_in_range_list(read_cpuid_id(),
891+
arm64_bp_harden_smccc_cpus);
882892
}
883893

884894
void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)

drivers/net/wireguard/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
#
33
# Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
44

5-
ccflags-y := -O3
6-
ccflags-y += -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt'
5+
ccflags-y := -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt'
76
ccflags-$(CONFIG_WIREGUARD_DEBUG) += -DDEBUG
87
wireguard-y := main.o
98
wireguard-y += noise.o

drivers/usb/core/hub.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
4242
#define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02
4343

44-
extern int deny_new_usb;
45-
4644
/* Protect struct usb_device->state and ->children members
4745
* Note: Both are also protected by ->dev.sem, except that ->state can
4846
* change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
@@ -4917,12 +4915,6 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
49174915
goto done;
49184916
return;
49194917
}
4920-
4921-
if (deny_new_usb) {
4922-
dev_err(&port_dev->dev, "denied insert of USB device on port %d\n", port1);
4923-
goto done;
4924-
}
4925-
49264918
if (hub_is_superspeed(hub->hdev))
49274919
unit_load = 150;
49284920
else

kernel/sysctl.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@
9898
#if defined(CONFIG_SYSCTL)
9999

100100
/* External variables not in a header file. */
101-
#ifdef CONFIG_USB
102-
int deny_new_usb __read_mostly = 0;
103-
EXPORT_SYMBOL(deny_new_usb);
104-
#endif
105101
extern int suid_dumpable;
106102
#ifdef CONFIG_COREDUMP
107103
extern int core_uses_pid;
@@ -1007,17 +1003,6 @@ static struct ctl_table kern_table[] = {
10071003
.extra1 = &zero,
10081004
.extra2 = &two,
10091005
},
1010-
#endif
1011-
#ifdef CONFIG_USB
1012-
{
1013-
.procname = "deny_new_usb",
1014-
.data = &deny_new_usb,
1015-
.maxlen = sizeof(int),
1016-
.mode = 0644,
1017-
.proc_handler = proc_dointvec_minmax_sysadmin,
1018-
.extra1 = &zero,
1019-
.extra2 = &one,
1020-
},
10211006
#endif
10221007
{
10231008
.procname = "ngroups_max",

0 commit comments

Comments
 (0)