Skip to content

Commit 7e4fb1a

Browse files
committed
Rebuild rocky8_10 with kernel-4.18.0-553.34.1.el8_10
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v4.18~1..master: 522243 Number of commits in rpm: 14 Number of commits matched with upstream: 8 (57.14%) Number of commits in upstream but not in rpm: 522235 Number of commits NOT found in upstream: 6 (42.86%) Rebuilding Kernel on Branch rocky8_10_rebuild_kernel-4.18.0-553.34.1.el8_10 for kernel-4.18.0-553.34.1.el8_10 Clean Cherry Picks: 4 (50.00%) Empty Cherry Picks: 4 (50.00%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-4.18.0-553.34.1.el8_10/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent 81588bf commit 7e4fb1a

17 files changed

+49989
-117
lines changed

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 10
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 553.33.1
15+
RHEL_RELEASE = 553.34.1
1616

1717
#
1818
# ZSTREAM

arch/x86/kernel/cpu/intel.c

Lines changed: 91 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,90 @@ int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type)
391391
}
392392
EXPORT_SYMBOL_GPL(intel_microcode_sanity_check);
393393

394+
#define MSR_IA32_TME_ACTIVATE 0x982
395+
396+
/* Helpers to access TME_ACTIVATE MSR */
397+
#define TME_ACTIVATE_LOCKED(x) (x & 0x1)
398+
#define TME_ACTIVATE_ENABLED(x) (x & 0x2)
399+
400+
#define TME_ACTIVATE_POLICY(x) ((x >> 4) & 0xf) /* Bits 7:4 */
401+
#define TME_ACTIVATE_POLICY_AES_XTS_128 0
402+
403+
#define TME_ACTIVATE_KEYID_BITS(x) ((x >> 32) & 0xf) /* Bits 35:32 */
404+
405+
#define TME_ACTIVATE_CRYPTO_ALGS(x) ((x >> 48) & 0xffff) /* Bits 63:48 */
406+
#define TME_ACTIVATE_CRYPTO_AES_XTS_128 1
407+
408+
/* Values for mktme_status (SW only construct) */
409+
#define MKTME_ENABLED 0
410+
#define MKTME_DISABLED 1
411+
#define MKTME_UNINITIALIZED 2
412+
static int mktme_status = MKTME_UNINITIALIZED;
413+
414+
static void detect_tme_early(struct cpuinfo_x86 *c)
415+
{
416+
u64 tme_activate, tme_policy, tme_crypto_algs;
417+
int keyid_bits = 0, nr_keyids = 0;
418+
static u64 tme_activate_cpu0 = 0;
419+
420+
rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate);
421+
422+
if (mktme_status != MKTME_UNINITIALIZED) {
423+
if (tme_activate != tme_activate_cpu0) {
424+
/* Broken BIOS? */
425+
pr_err_once("x86/tme: configuration is inconsistent between CPUs\n");
426+
pr_err_once("x86/tme: MKTME is not usable\n");
427+
mktme_status = MKTME_DISABLED;
428+
429+
/* Proceed. We may need to exclude bits from x86_phys_bits. */
430+
}
431+
} else {
432+
tme_activate_cpu0 = tme_activate;
433+
}
434+
435+
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
436+
pr_info_once("x86/tme: not enabled by BIOS\n");
437+
mktme_status = MKTME_DISABLED;
438+
return;
439+
}
440+
441+
if (mktme_status != MKTME_UNINITIALIZED)
442+
goto detect_keyid_bits;
443+
444+
pr_info("x86/tme: enabled by BIOS\n");
445+
446+
tme_policy = TME_ACTIVATE_POLICY(tme_activate);
447+
if (tme_policy != TME_ACTIVATE_POLICY_AES_XTS_128)
448+
pr_warn("x86/tme: Unknown policy is active: %#llx\n", tme_policy);
449+
450+
tme_crypto_algs = TME_ACTIVATE_CRYPTO_ALGS(tme_activate);
451+
if (!(tme_crypto_algs & TME_ACTIVATE_CRYPTO_AES_XTS_128)) {
452+
pr_err("x86/mktme: No known encryption algorithm is supported: %#llx\n",
453+
tme_crypto_algs);
454+
mktme_status = MKTME_DISABLED;
455+
}
456+
detect_keyid_bits:
457+
keyid_bits = TME_ACTIVATE_KEYID_BITS(tme_activate);
458+
nr_keyids = (1UL << keyid_bits) - 1;
459+
if (nr_keyids) {
460+
pr_info_once("x86/mktme: enabled by BIOS\n");
461+
pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids);
462+
} else {
463+
pr_info_once("x86/mktme: disabled by BIOS\n");
464+
}
465+
466+
if (mktme_status == MKTME_UNINITIALIZED) {
467+
/* MKTME is usable */
468+
mktme_status = MKTME_ENABLED;
469+
}
470+
471+
/*
472+
* KeyID bits effectively lower the number of physical address
473+
* bits. Update cpuinfo_x86::x86_phys_bits accordingly.
474+
*/
475+
c->x86_phys_bits -= keyid_bits;
476+
}
477+
394478
static void early_init_intel(struct cpuinfo_x86 *c)
395479
{
396480
u64 misc_enable;
@@ -542,6 +626,13 @@ static void early_init_intel(struct cpuinfo_x86 *c)
542626
*/
543627
if (detect_extended_topology_early(c) < 0)
544628
detect_ht_early(c);
629+
630+
/*
631+
* Adjust the number of physical bits early because it affects the
632+
* valid bits of the MTRR mask registers.
633+
*/
634+
if (cpu_has(c, X86_FEATURE_TME))
635+
detect_tme_early(c);
545636
}
546637

547638
static void bsp_init_intel(struct cpuinfo_x86 *c)
@@ -702,90 +793,6 @@ static void srat_detect_node(struct cpuinfo_x86 *c)
702793
#endif
703794
}
704795

705-
#define MSR_IA32_TME_ACTIVATE 0x982
706-
707-
/* Helpers to access TME_ACTIVATE MSR */
708-
#define TME_ACTIVATE_LOCKED(x) (x & 0x1)
709-
#define TME_ACTIVATE_ENABLED(x) (x & 0x2)
710-
711-
#define TME_ACTIVATE_POLICY(x) ((x >> 4) & 0xf) /* Bits 7:4 */
712-
#define TME_ACTIVATE_POLICY_AES_XTS_128 0
713-
714-
#define TME_ACTIVATE_KEYID_BITS(x) ((x >> 32) & 0xf) /* Bits 35:32 */
715-
716-
#define TME_ACTIVATE_CRYPTO_ALGS(x) ((x >> 48) & 0xffff) /* Bits 63:48 */
717-
#define TME_ACTIVATE_CRYPTO_AES_XTS_128 1
718-
719-
/* Values for mktme_status (SW only construct) */
720-
#define MKTME_ENABLED 0
721-
#define MKTME_DISABLED 1
722-
#define MKTME_UNINITIALIZED 2
723-
static int mktme_status = MKTME_UNINITIALIZED;
724-
725-
static void detect_tme(struct cpuinfo_x86 *c)
726-
{
727-
u64 tme_activate, tme_policy, tme_crypto_algs;
728-
int keyid_bits = 0, nr_keyids = 0;
729-
static u64 tme_activate_cpu0 = 0;
730-
731-
rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate);
732-
733-
if (mktme_status != MKTME_UNINITIALIZED) {
734-
if (tme_activate != tme_activate_cpu0) {
735-
/* Broken BIOS? */
736-
pr_err_once("x86/tme: configuration is inconsistent between CPUs\n");
737-
pr_err_once("x86/tme: MKTME is not usable\n");
738-
mktme_status = MKTME_DISABLED;
739-
740-
/* Proceed. We may need to exclude bits from x86_phys_bits. */
741-
}
742-
} else {
743-
tme_activate_cpu0 = tme_activate;
744-
}
745-
746-
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
747-
pr_info_once("x86/tme: not enabled by BIOS\n");
748-
mktme_status = MKTME_DISABLED;
749-
return;
750-
}
751-
752-
if (mktme_status != MKTME_UNINITIALIZED)
753-
goto detect_keyid_bits;
754-
755-
pr_info("x86/tme: enabled by BIOS\n");
756-
757-
tme_policy = TME_ACTIVATE_POLICY(tme_activate);
758-
if (tme_policy != TME_ACTIVATE_POLICY_AES_XTS_128)
759-
pr_warn("x86/tme: Unknown policy is active: %#llx\n", tme_policy);
760-
761-
tme_crypto_algs = TME_ACTIVATE_CRYPTO_ALGS(tme_activate);
762-
if (!(tme_crypto_algs & TME_ACTIVATE_CRYPTO_AES_XTS_128)) {
763-
pr_err("x86/mktme: No known encryption algorithm is supported: %#llx\n",
764-
tme_crypto_algs);
765-
mktme_status = MKTME_DISABLED;
766-
}
767-
detect_keyid_bits:
768-
keyid_bits = TME_ACTIVATE_KEYID_BITS(tme_activate);
769-
nr_keyids = (1UL << keyid_bits) - 1;
770-
if (nr_keyids) {
771-
pr_info_once("x86/mktme: enabled by BIOS\n");
772-
pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids);
773-
} else {
774-
pr_info_once("x86/mktme: disabled by BIOS\n");
775-
}
776-
777-
if (mktme_status == MKTME_UNINITIALIZED) {
778-
/* MKTME is usable */
779-
mktme_status = MKTME_ENABLED;
780-
}
781-
782-
/*
783-
* KeyID bits effectively lower the number of physical address
784-
* bits. Update cpuinfo_x86::x86_phys_bits accordingly.
785-
*/
786-
c->x86_phys_bits -= keyid_bits;
787-
}
788-
789796
static void init_cpuid_fault(struct cpuinfo_x86 *c)
790797
{
791798
u64 msr;
@@ -922,9 +929,6 @@ static void init_intel(struct cpuinfo_x86 *c)
922929

923930
init_ia32_feat_ctl(c);
924931

925-
if (cpu_has(c, X86_FEATURE_TME))
926-
detect_tme(c);
927-
928932
init_intel_misc_features(c);
929933

930934
split_lock_init();

arch/x86/kernel/cpu/mtrr/mtrr.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,20 @@ void __init mtrr_bp_init(void)
767767
if (mtrr_enabled())
768768
mtrr_bp_pat_init();
769769

770+
/*
771+
* RHEL-only: Intel systems with TME feature enabled reduce
772+
* phys_addr by keyid_bits (see detect_tme_early()) but this does
773+
* not affect mtrr_cleanup() as phys_addr is calculated independently
774+
* here (see f6b980646b93 upstream). To make TME enabled systems boot
775+
* and to minimize the change for other environments, use
776+
* boot_cpu_data.x86_phys_bits here instead.
777+
*/
778+
if (boot_cpu_has(X86_FEATURE_TME)) {
779+
phys_addr = boot_cpu_data.x86_phys_bits;
780+
size_or_mask = SIZE_OR_MASK_BITS(phys_addr);
781+
size_and_mask = ~size_or_mask & 0xfffff00000ULL;
782+
}
783+
770784
if (mtrr_cleanup(phys_addr)) {
771785
changed_by_mtrr_cleanup = 1;
772786
mtrr_if->set_all();
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Rebuild_History BUILDABLE
2+
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
3+
Number of commits in upstream range v4.18~1..master: 522243
4+
Number of commits in rpm: 14
5+
Number of commits matched with upstream: 8 (57.14%)
6+
Number of commits in upstream but not in rpm: 522235
7+
Number of commits NOT found in upstream: 6 (42.86%)
8+
9+
Rebuilding Kernel on Branch rocky8_10_rebuild_kernel-4.18.0-553.34.1.el8_10 for kernel-4.18.0-553.34.1.el8_10
10+
Clean Cherry Picks: 4 (50.00%)
11+
Empty Cherry Picks: 4 (50.00%)
12+
_______________________________
13+
14+
__EMPTY COMMITS__________________________
15+
f74dacb4c81164d7578a11d5f8b660ad87059e6a dlm: fix recovery of middle conversions
16+
6890cb1ace350b4386c8aee1343dc3b3ddd214da x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers
17+
13325333582d4820d39b9e8f63d6a54e745585d9 xfs: fix sparse inode limits on runt AG
18+
ce7356ae35943cc6494cc692e62d51a734062b7d mptcp: cope racing subflow creation in mptcp_rcv_space_adjust
19+
20+
__CHANGES NOT IN UPSTREAM________________
21+
Adding prod certs and changed cert date to 20210620
22+
Adding Rocky secure boot certs
23+
Fixing vmlinuz removal
24+
Fixing UEFI CA path
25+
Porting to 8.10, debranding and Rocky branding
26+
Fixing pesign_key_name values

0 commit comments

Comments
 (0)