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: <783abee1-e06d-45bf-2dc9-920c729978de@amd.com>
Date: Wed, 29 Jan 2025 09:08:02 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: Ira Weiny <ira.weiny@...el.com>, Dave Jiang <dave.jiang@...el.com>,
 Dan Williams <dan.j.williams@...el.com>, Davidlohr Bueso
 <dave@...olabs.net>, Jonathan Cameron <jonathan.cameron@...wei.com>,
 Alison Schofield <alison.schofield@...el.com>,
 Vishal Verma <vishal.l.verma@...el.com>
Cc: linux-cxl@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 2/2] cxl/memdev: Remove temporary variables from
 cxl_memdev_state


On 1/28/25 18:51, Ira Weiny wrote:
> As was mentioned by Dan[1] cxl_memdev_state stores values which are only
> used during device probe.  This clutters the data structure and is a
> hindrance on code maintenance.  Those values are best handled with
> temporary variables.
>
> Adjust the query of memory devices to read byte sizes in one call which
> takes partition information into account.  Use the values to create
> partitions for device state initialization.  Take care to separate the
> mailbox queries from the initialization of device state to steer the
> mbox code toward taking mailbox objects rather than memdev states.
> Update spec references while changing these calls.
>
> Link: https://lore.kernel.org/all/67871f05cd767_20f32947f@dwillia2-xfh.jf.intel.com.notmuch/ [1]
> Signed-off-by: Ira Weiny <ira.weiny@...el.com>


Reviewed-by: Alejandro Lucero <alucerop@....com>


FWIW, I had (as part of current in-progress v10) similar struct than 
used here for Type2 initialization when there is no mailbox.


I had added a specific function for initialising that struct, but my 
idea now with this change is to have cxl_mem_dev_info initialized by the 
driver before calling cxl_dev_state_identify, and inside that function 
checking if total_bytes already != 0 for avoiding call the mbox command 
for getting the info. This will support both cases for Type2, with and 
without mailbox.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ