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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Nov 2020 13:05:39 +0000
From:   James Morse <james.morse@....com>
To:     Reinette Chatre <reinette.chatre@...el.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Fenghua Yu <fenghua.yu@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        shameerali.kolothum.thodi@...wei.com,
        Jamie Iles <jamie@...iainc.com>,
        D Scott Phillips OS <scott@...amperecomputing.com>
Subject: Re: [PATCH 00/24] x86/resctrl: Merge the CDP resources

Hi Reinette,

On 16/11/2020 17:54, Reinette Chatre wrote:
> On 10/30/2020 9:10 AM, James Morse wrote:
>> MPAM has an equivalent feature to CDP, but its a property of the CPU,
>> not the cache. Resctrl needs to have x86's odd/even behaviour, as that
>> its the ABI, but this isn't how the MPAM hardware works. It is entirely
>> possible that an in-kernel user of MPAM would not be using CDP, whereas
>> resctrl is.

> The above seems to distinguish between "in-kernel user of MPAM" and resctrl (now obtaining
> support for MPAM). Could you please provide more details on the "in-kernel user of MPAM"
> and elaborate on how these two usages are expected to interact with MPAM concurrently?

This is a badly phrased reference to all the bits of MPAM that are left on the floor after
the resctrl support is plumbed up.

Currently none of the software exists, but MPAM also has support for: virtualisation, the
interrupt-controller (GIC) and the IO-MMU. None of these things are exposed via resctrl,
so they either need new schema (which must also work for x86), or handling 'invisibly' in
the kernel.

Virtualisation is probably the easiest example: With MPAM, the guest may be 'using CDP'
whereas the host is not, or vice-versa.
The guest will never be allowed to access the MMIO configuration directly, it will be
managed via the host's driver. Now the host's driver has to handle CDP-on and CDP-off
configurations.
Keeping the odd/even CDP stuff in resctrl means the arch-code/driver doesn't need to know
or care about this stuff if the hardware doesn't.

If the interrupt-controller or IO-MMU consume closid/rmid, then I'd describe them as
in-kernel users (as the kernel owns their configuration). These would never use CDP as
they don't fetch instructions.


How do I envision these things working concurrently?
(a) closid/rmid can be reserved before resctrl is mounted, or
(b) allocated by user-space and handed back to the kernel (e.g. virtualisation).

The ctrlval values move to belong to the arch-code/driver, so if 'something' changes the
configuration behind resctrls back, the new schema values are immediately visible via the
corresponding schema file in case (b). In case (a), resctrl would never look at those
closid, but it wouldn't matter if it did.

(the counter-example is mba_sc, which may need to convert the current ctrlval back to a
mbps_val if its being managed by something other than resctrl)



Thanks,

James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ