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: <2114228.Jadu78ljVU@fdefranc-mobl3>
Date: Tue, 21 May 2024 00:57:10 +0200
From: "Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>
To: Dan Williams <dan.j.williams@...el.com>, linux-cxl@...r.kernel.org
Cc: Ira Weiny <ira.weiny@...el.com>, Davidlohr Bueso <dave@...olabs.net>,
 Jonathan Cameron <jonathan.cameron@...wei.com>,
 Dave Jiang <dave.jiang@...el.com>,
 Alison Schofield <alison.schofield@...el.com>,
 Vishal Verma <vishal.l.verma@...el.com>, linux-kernel@...r.kernel.org
Subject:
 Re: [PATCH v3] cxl/events: Use a common struct for DRAM and General Media
 events

On Monday, May 20, 2024 7:55:17 PM GMT+2 Fabio M. De Francesco wrote:
> On Saturday, May 18, 2024 1:26:21 PM GMT+2 Fabio M. De Francesco wrote:
> [...]
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index a08f050cc1ca..05de8836adea 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -875,7 +875,13 @@ void cxl_event_trace_record(const struct cxl_memdev 
> *cxlmd,
>                 guard(rwsem_read)(&cxl_region_rwsem);
>                 guard(rwsem_read)(&cxl_dpa_rwsem);
>  
> -               dpa = le64_to_cpu(evt->media_hdr.phys_addr) & CXL_DPA_MASK;
> +               if (event_type == CXL_CPER_EVENT_GEN_MEDIA)
> +                       dpa = le64_to_cpu(evt-
>gen_media.media_hdr.phys_addr)
> +                             & CXL_DPA_MASK;
> +               else if (event_type == CXL_CPER_EVENT_GEN_MEDIA)
> +                       dpa = le64_to_cpu(evt->dram.media_hdr.phys_addr)
> +                             & CXL_DPA_MASK;
> +
>                 cxlr = cxl_dpa_to_region(cxlmd, dpa);
>                 if (cxlr)
>                         hpa = cxl_trace_hpa(cxlr, cxlmd, dpa);
> diff --git a/include/linux/cxl-event.h b/include/linux/cxl-event.h
> index 6562663a036d..f0a5be131e6a 100644
> --- a/include/linux/cxl-event.h
> +++ b/include/linux/cxl-event.h
> @@ -97,7 +97,6 @@ union cxl_event {
>         struct cxl_event_gen_media gen_media;
>         struct cxl_event_dram dram;
>         struct cxl_event_mem_module mem_module;
> -       struct cxl_event_media_hdr media_hdr;
>  } __packed;
>  
>  /*
> 

I suspect that I didn't clarify that the diff above is proposing an additional 
little change to this patch (for v4) and that I wanted to collect comments 
before applying and respinning.

To be clearer, that diff is meant only to show that cxl_event_media_hdr can be 
removed from union cxl_event at no cost while still be used for the common 
fields in the definitions of cxl_event_dram and cxl_event_gen_media.

Fabio






Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ