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: <20250218140944.GZ1615191@kernel.org>
Date: Tue, 18 Feb 2025 14:09:44 +0000
From: Simon Horman <horms@...nel.org>
To: Alejandro Lucero Palau <alucerop@....com>
Cc: linux-cxl@...r.kernel.org, netdev@...r.kernel.org,
	dan.j.williams@...el.com, edward.cree@....com, davem@...emloft.net,
	kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
	dave.jiang@...el.com
Subject: Re: [PATCH v10 16/26] cxl: define a driver interface for DPA
 allocation

On Tue, Feb 18, 2025 at 01:34:59PM +0000, Simon Horman wrote:
> On Mon, Feb 17, 2025 at 02:08:28PM +0000, Alejandro Lucero Palau wrote:
> > 
> > On 2/7/25 13:46, Simon Horman wrote:
> > > On Wed, Feb 05, 2025 at 03:19:40PM +0000, alucerop@....com wrote:
> > > > From: Alejandro Lucero <alucerop@....com>
> > > > 
> > > > Region creation involves finding available DPA (device-physical-address)
> > > > capacity to map into HPA (host-physical-address) space. Define an API,
> > > > cxl_request_dpa(), that tries to allocate the DPA memory the driver
> > > > requires to operate. The memory requested should not be bigger than the
> > > > max available HPA obtained previously with cxl_get_hpa_freespace.
> > > > 
> > > > Based on https://lore.kernel.org/linux-cxl/168592158743.1948938.7622563891193802610.stgit@dwillia2-xfh.jf.intel.com/
> > > > 
> > > > Signed-off-by: Alejandro Lucero <alucerop@....com>
> > > > ---
> > > >   drivers/cxl/core/hdm.c | 83 ++++++++++++++++++++++++++++++++++++++++++
> > > >   include/cxl/cxl.h      |  4 ++
> > > >   2 files changed, 87 insertions(+)
> > > > 
> > > > diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> > > > index af025da81fa2..cec2c7dcaf3a 100644
> > > > --- a/drivers/cxl/core/hdm.c
> > > > +++ b/drivers/cxl/core/hdm.c
> > > > @@ -3,6 +3,7 @@
> > > >   #include <linux/seq_file.h>
> > > >   #include <linux/device.h>
> > > >   #include <linux/delay.h>
> > > > +#include <cxl/cxl.h>
> > > Hi Alejandro,
> > 
> > 
> > Hi Simon,
> > 
> > 
> > > I think that linux/range.h should be included in cxl.h, or if not here.
> > > This is because on allmodconfigs for both arm and arm64 I see:
> > > 
> > > In file included from drivers/cxl/core/hdm.c:6:
> > > ./include/cxl/cxl.h:67:16: error: field has incomplete type 'struct range'
> > >     67 |                 struct range range;
> > >        |                              ^
> > > ./include/linux/memory_hotplug.h:247:8: note: forward declaration of 'struct range'
> > >    247 | struct range arch_get_mappable_range(void);
> > >        |        ^
> > > 1 error generated.
> > > 
> > > ...
> > 
> > 
> > I do not understand then why the robot does not trigger an issue when
> > building this code for those archs.
> > 
> > And where does that second struct range reference in memory_hotplug.h come
> > from? Is that related to cxl.h?
> 
> Thanks, let me try to reproduce this again.

Hi Alejandro,

I tried testing this with an allmodconfig build for arm64 [*].

And this time I see this manifesting slightly differently.  I can follow-up
on why it is different (probably I messed something up when first reporting
the issue). But I am certainly seeing an issue there today.

...
  CC [M]  drivers/cxl/core/hdm.o
In file included from drivers/cxl/core/hdm.c:6:
./include/cxl/cxl.h:67:30: error: field 'range' has incomplete type
   67 |                 struct range range;
      |                              ^~~~~
...

[*] This is with patches 1 - 16 of this series applied on top of next-20250205.

    I am using the GCC 14.2.0 toolchain from [1] to cross compile on x86_64.
    Like this:

    PATH=/tmp/gcc-14.2.0-nolibc/aarch64-linux/bin:$PATH
    ARCH=arm64 CROSS_COMPILE=aarch64-linux- make allmodconfig
    ARCH=arm64 CROSS_COMPILE=aarch64-linux- make

[1] https://mirrors.edge.kernel.org/pub/tools/crosstool/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ