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]
Message-ID: <08c0e91a-a17a-5dad-0638-800a4db5034f@intel.com>
Date:   Thu, 27 Oct 2022 10:35:56 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Peter Newman <peternewman@...gle.com>
CC:     James Morse <james.morse@....com>, Tony Luck <tony.luck@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        "Eranian, Stephane" <eranian@...gle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        Babu Moger <Babu.Moger@....com>,
        "Gaurang Upasani" <gupasani@...gle.com>
Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group

Hi Peter,

On 10/27/2022 12:56 AM, Peter Newman wrote:
> On Wed, Oct 26, 2022 at 11:12 PM Reinette Chatre
> <reinette.chatre@...el.com> wrote:
>> The original concern is "the stores to t->closid and t->rmid could be
>> reordered with the task_curr(t) and task_cpu(t) reads which follow". I can see
>> that issue. Have you considered using the compiler barrier, barrier(), instead?
>> From what I understand it will prevent the compiler from moving the memory accesses.
>> This is what is currently done in __rdtgroup_move_task() and could be done here also?
> 
> A memory system (including those on x86) is allowed to reorder a store with a
> later load, in addition to the compiler.
> 
> Also because the locations in question can be concurrently accessed by another
> CPU, a compiler barrier would not be sufficient.

This is hard. Regarding the concurrent access from another CPU it seems
that task_rq_lock() is available to prevent races with schedule(). Using this
may be able to prevent task_curr(t) changing during this time and thus the local
reordering may not be a problem. I am not familiar with task_rq_lock() though,
surely there are many details to consider in this area.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ