mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	- Remove dead code leftovers after a recent mitigations cleanup which fail
a Clang build - Make sure a Retbleed mitigation message is printed only when necessary - Correct the last Zen1 microcode revision for which Entrysign sha256 check is needed - Fix a NULL ptr deref when mounting the resctrl fs on a system which supports assignable counters but where L3 total and local bandwidth monitoring has been disabled at boot -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmj+FSYACgkQEsHwGGHe VUqh5RAAwTAfMsEs57v6gQqnm/rbNjGXoZuNcT9xhk4jbRC7xCcyJrZVyYA+mWIe 5rgGOuSThOsOgqJHwVqn4kdym9yUwLradZS8gn5vHFIlDVXDoMRYJuvm8U7PdTug UWJv0uw0B393RNb+7yCeEN7Zpe2bvbh25PF66uh/7dQYKmWIaiTVlDhrZ+Ba51IK mmJzbVb6zqWrSP3heISZRjfV3rv+/SifUb+wIgWcCzcAb36fFIlUKaEYd/g5249R BBcEY5n/eUUKjMJVOki4vDqJyQdPdJCz9yH3qdZaz661Wh9/FVy/rLCQC/O1ruwt Ovoi6UJAjleb0OXfi00Hl1LT3v92xH/OwyVCamBAYyaIhTdPaoQS6YADGstt3PTx RUc/BG5wHyaOWsG94zVEvqK9MElyjW3DPiBH4E+O7OB348WAfhsbrUDnnaveDSym n2LivNnkiaXi8DpPhWL7XsJJjYAy1fi2piDrh952I5oVfhf5iYeNwFjNdtgAft7G wNr01qraqdPKfMYHZHdkaqrPH/Qy9DlLuDuTjQqtjGm8lsZK/g+txzQLfeXoDJSe RtKtRYlq0bVCOnAuA8MN4xi9H2WaKAZNgavJxywZslmaQuQzh21g7ISwxcAFe07n nevcypF1s/dnCUPK8yuKTmFzkwbg7I2OgrmX0RKZdFxY8uzg4Co= =EZGc -----END PGP SIGNATURE----- Merge tag 'x86_urgent_for_v6.18_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Remove dead code leftovers after a recent mitigations cleanup which fail a Clang build - Make sure a Retbleed mitigation message is printed only when necessary - Correct the last Zen1 microcode revision for which Entrysign sha256 check is needed - Fix a NULL ptr deref when mounting the resctrl fs on a system which supports assignable counters but where L3 total and local bandwidth monitoring has been disabled at boot * tag 'x86_urgent_for_v6.18_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/bugs: Remove dead code which might prevent from building x86/bugs: Qualify RETBLEED_INTEL_MSG x86/microcode: Fix Entrysign revision check for Zen1/Naples x86,fs/resctrl: Fix NULL pointer dereference with events force-disabled in mbm_event mode
This commit is contained in:
		
						commit
						dbfc6422a3
					
				
					 4 changed files with 21 additions and 19 deletions
				
			
		|  | @ -1463,7 +1463,9 @@ static void __init retbleed_update_mitigation(void) | |||
| 			break; | ||||
| 		default: | ||||
| 			if (retbleed_mitigation != RETBLEED_MITIGATION_STUFF) { | ||||
| 				pr_err(RETBLEED_INTEL_MSG); | ||||
| 				if (retbleed_mitigation != RETBLEED_MITIGATION_NONE) | ||||
| 					pr_err(RETBLEED_INTEL_MSG); | ||||
| 
 | ||||
| 				retbleed_mitigation = RETBLEED_MITIGATION_NONE; | ||||
| 			} | ||||
| 		} | ||||
|  | @ -1825,13 +1827,6 @@ void unpriv_ebpf_notify(int new_state) | |||
| } | ||||
| #endif | ||||
| 
 | ||||
| static inline bool match_option(const char *arg, int arglen, const char *opt) | ||||
| { | ||||
| 	int len = strlen(opt); | ||||
| 
 | ||||
| 	return len == arglen && !strncmp(arg, opt, len); | ||||
| } | ||||
| 
 | ||||
| /* The kernel command line selection for spectre v2 */ | ||||
| enum spectre_v2_mitigation_cmd { | ||||
| 	SPECTRE_V2_CMD_NONE, | ||||
|  |  | |||
|  | @ -194,7 +194,7 @@ static bool need_sha_check(u32 cur_rev) | |||
| 	} | ||||
| 
 | ||||
| 	switch (cur_rev >> 8) { | ||||
| 	case 0x80012: return cur_rev <= 0x800126f; break; | ||||
| 	case 0x80012: return cur_rev <= 0x8001277; break; | ||||
| 	case 0x80082: return cur_rev <= 0x800820f; break; | ||||
| 	case 0x83010: return cur_rev <= 0x830107c; break; | ||||
| 	case 0x86001: return cur_rev <= 0x860010e; break; | ||||
|  |  | |||
|  | @ -458,7 +458,16 @@ int __init rdt_get_mon_l3_config(struct rdt_resource *r) | |||
| 		r->mon.mbm_cfg_mask = ecx & MAX_EVT_CONFIG_BITS; | ||||
| 	} | ||||
| 
 | ||||
| 	if (rdt_cpu_has(X86_FEATURE_ABMC)) { | ||||
| 	/*
 | ||||
| 	 * resctrl assumes a system that supports assignable counters can | ||||
| 	 * switch to "default" mode. Ensure that there is a "default" mode | ||||
| 	 * to switch to. This enforces a dependency between the independent | ||||
| 	 * X86_FEATURE_ABMC and X86_FEATURE_CQM_MBM_TOTAL/X86_FEATURE_CQM_MBM_LOCAL | ||||
| 	 * hardware features. | ||||
| 	 */ | ||||
| 	if (rdt_cpu_has(X86_FEATURE_ABMC) && | ||||
| 	    (rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL) || | ||||
| 	     rdt_cpu_has(X86_FEATURE_CQM_MBM_LOCAL))) { | ||||
| 		r->mon.mbm_cntr_assignable = true; | ||||
| 		cpuid_count(0x80000020, 5, &eax, &ebx, &ecx, &edx); | ||||
| 		r->mon.num_mbm_cntrs = (ebx & GENMASK(15, 0)) + 1; | ||||
|  |  | |||
|  | @ -1782,15 +1782,13 @@ int resctrl_mon_resource_init(void) | |||
| 		mba_mbps_default_event = QOS_L3_MBM_TOTAL_EVENT_ID; | ||||
| 
 | ||||
| 	if (r->mon.mbm_cntr_assignable) { | ||||
| 		if (!resctrl_is_mon_event_enabled(QOS_L3_MBM_TOTAL_EVENT_ID)) | ||||
| 			resctrl_enable_mon_event(QOS_L3_MBM_TOTAL_EVENT_ID); | ||||
| 		if (!resctrl_is_mon_event_enabled(QOS_L3_MBM_LOCAL_EVENT_ID)) | ||||
| 			resctrl_enable_mon_event(QOS_L3_MBM_LOCAL_EVENT_ID); | ||||
| 		mon_event_all[QOS_L3_MBM_TOTAL_EVENT_ID].evt_cfg = r->mon.mbm_cfg_mask; | ||||
| 		mon_event_all[QOS_L3_MBM_LOCAL_EVENT_ID].evt_cfg = r->mon.mbm_cfg_mask & | ||||
| 								   (READS_TO_LOCAL_MEM | | ||||
| 								    READS_TO_LOCAL_S_MEM | | ||||
| 								    NON_TEMP_WRITE_TO_LOCAL_MEM); | ||||
| 		if (resctrl_is_mon_event_enabled(QOS_L3_MBM_TOTAL_EVENT_ID)) | ||||
| 			mon_event_all[QOS_L3_MBM_TOTAL_EVENT_ID].evt_cfg = r->mon.mbm_cfg_mask; | ||||
| 		if (resctrl_is_mon_event_enabled(QOS_L3_MBM_LOCAL_EVENT_ID)) | ||||
| 			mon_event_all[QOS_L3_MBM_LOCAL_EVENT_ID].evt_cfg = r->mon.mbm_cfg_mask & | ||||
| 									   (READS_TO_LOCAL_MEM | | ||||
| 									    READS_TO_LOCAL_S_MEM | | ||||
| 									    NON_TEMP_WRITE_TO_LOCAL_MEM); | ||||
| 		r->mon.mbm_assign_on_mkdir = true; | ||||
| 		resctrl_file_fflags_init("num_mbm_cntrs", | ||||
| 					 RFTYPE_MON_INFO | RFTYPE_RES_CACHE); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Linus Torvalds
						Linus Torvalds