From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933019AbdDEPUc (ORCPT ); Wed, 5 Apr 2017 11:20:32 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:33351 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753780AbdDEPUb (ORCPT ); Wed, 5 Apr 2017 11:20:31 -0400 Date: Wed, 5 Apr 2017 17:20:24 +0200 (CEST) From: Thomas Gleixner To: Vikas Shivappa cc: vikas.shivappa@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, h.peter.anvin@intel.com Subject: Re: [PATCH 1/3] x86/intel_rdt: Fix issue when mkdir uses a freed CLOSid In-Reply-To: <1491255857-17213-2-git-send-email-vikas.shivappa@linux.intel.com> Message-ID: References: <1491255857-17213-1-git-send-email-vikas.shivappa@linux.intel.com> <1491255857-17213-2-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Apr 2017, Vikas Shivappa wrote: > Subject: x86/intel_rdt: Fix issue when mkdir uses a freed CLOSid This subject line is useless again. It want's to be descriptive. "Fix issue" Which issue? > Each resctrl directory has one CLOSid allocated which is mapped to a > control register/QOS_MSR. During an rmdir this CLOSid is freed and can > be reused later when a new directory is created. Currently we do not > reset the QOS_MSR to a default when the CLOSid is freed. So when the > next mkdir uses a freed CLOSid, the new directory is associated with a > stale QOS_MSR. That's not an issue. That's maybe something people are not expecting. > Fix this issue by writing a default value to the QOS_MSR when the > associated CLOSid is freed. The default value is all 1s for CBM which > means no control is enforced when a mkdir reuses this CLOSid. That's just wrong. The proper behaviour for a new control group is, that at the time when it is created it copies the CBM values of the default group and not claiming access to ALL of the cache by default. Thanks, tglx