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: <Z-sFyQBsGgKFAVGn@agluck-desk3>
Date: Mon, 31 Mar 2025 14:14:49 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: Fenghua Yu <fenghuay@...dia.com>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
	Peter Newman <peternewman@...gle.com>,
	James Morse <james.morse@....com>, Babu Moger <babu.moger@....com>,
	Drew Fustini <dfustini@...libre.com>,
	Dave Martin <Dave.Martin@....com>, linux-kernel@...r.kernel.org,
	patches@...ts.linux.dev
Subject: Re: [PATCH v2 04/16] x86/resctrl: Change generic monitor functions
 to use struct rdt_domain_hdr

On Mon, Mar 31, 2025 at 09:15:36AM -0700, Reinette Chatre wrote:
> Hi Tony,
> 
> On 3/21/25 4:15 PM, Tony Luck wrote:
> > Functions that don't need the internal details of the rdt_mon_domain
> > can operate on just the rdt_domain_hdr.
> 
> This does not seem accurate. The functions are modified to take rdt_domain_hdr
> as parameter but then the functions are modified to extract rdt_mon_domain
> based on rdt_domain_hdr .... and proceeds to operate on internals of
> rdt_mon_domain in a way that contradicts the changelog.
> 
> Considering what comes later this seems risky to me to rely on the
> code flow to interpret which structure rdt_domain_hdr forms part of. I think
> that it will be safer if rdt_domain_hdr gets an identifier that reflects which
> structure it forms part of so that the accessors could be made explicit and
> have error checking.

This needs some more thought and cleanup. I ended up with a mix of
places that really just wanted the header. E.g. adding second and subsequent
CPUs to a domain, or deleting any but the last CPU from a domain, only
need to update the cpu_mask. But other places end up clumsily using
container_of() to get to the surrounding mon_domain. With different
types of mon_domain a type field would help sanity checking.
> 
> Reinette

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ