lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 12 Jun 2019 05:26:11 -0700
From:   tip-bot for James Morse <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     stable@...r.kernel.org, fenghua.yu@...el.com, james.morse@....com,
        hpa@...or.com, reinette.chatre@...el.com, mingo@...nel.org,
        bp@...en8.de, tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:x86/urgent] x86/resctrl: Don't stop walking closids when a
 locksetup group is found

Commit-ID:  87d3aa28f345bea77c396855fa5d5fec4c24461f
Gitweb:     https://git.kernel.org/tip/87d3aa28f345bea77c396855fa5d5fec4c24461f
Author:     James Morse <james.morse@....com>
AuthorDate: Mon, 3 Jun 2019 18:25:31 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 12 Jun 2019 10:31:50 +0200

x86/resctrl: Don't stop walking closids when a locksetup group is found

When a new control group is created __init_one_rdt_domain() walks all
the other closids to calculate the sets of used and unused bits.

If it discovers a pseudo_locksetup group, it breaks out of the loop.  This
means any later closid doesn't get its used bits added to used_b.  These
bits will then get set in unused_b, and added to the new control group's
configuration, even if they were marked as exclusive for a later closid.

When encountering a pseudo_locksetup group, we should continue. This is
because "a resource group enters 'pseudo-locked' mode after the schemata is
written while the resource group is in 'pseudo-locksetup' mode." When we
find a pseudo_locksetup group, its configuration is expected to be
overwritten, we can skip it.

Fixes: dfe9674b04ff6 ("x86/intel_rdt: Enable entering of pseudo-locksetup mode")
Signed-off-by: James Morse <james.morse@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Reinette Chatre <reinette.chatre@...el.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: H Peter Avin <hpa@...or.com>
Cc: <stable@...r.kernel.org>
Link: https://lkml.kernel.org/r/20190603172531.178830-1-james.morse@arm.com

---
 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 333c177a2471..869cbef5da81 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -2542,7 +2542,12 @@ static int __init_one_rdt_domain(struct rdt_domain *d, struct rdt_resource *r,
 		if (closid_allocated(i) && i != closid) {
 			mode = rdtgroup_mode_by_closid(i);
 			if (mode == RDT_MODE_PSEUDO_LOCKSETUP)
-				break;
+				/*
+				 * ctrl values for locksetup aren't relevant
+				 * until the schemata is written, and the mode
+				 * becomes RDT_MODE_PSEUDO_LOCKED.
+				 */
+				continue;
 			/*
 			 * If CDP is active include peer domain's
 			 * usage to ensure there is no overlap

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ