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]
Date: Wed, 10 Jan 2024 14:22:05 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Dan Williams <dan.j.williams@...el.com>
CC: Ira Weiny <ira.weiny@...el.com>, Smita Koralahalli
	<Smita.KoralahalliChannabasappa@....com>, Shiju Jose <shiju.jose@...wei.com>,
	Yazen Ghannam <yazen.ghannam@....com>, "Davidlohr Bueso" <dave@...olabs.net>,
	Dave Jiang <dave.jiang@...el.com>, "Alison Schofield"
	<alison.schofield@...el.com>, Vishal Verma <vishal.l.verma@...el.com>, Ard
 Biesheuvel <ardb@...nel.org>, <linux-efi@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-cxl@...r.kernel.org>
Subject: Re: [PATCH v5 4/9] cxl/events: Remove passing a UUID to known event
 traces

On Tue, 9 Jan 2024 15:38:28 -0800
Dan Williams <dan.j.williams@...el.com> wrote:

> Jonathan Cameron wrote:
> > On Wed, 20 Dec 2023 16:17:31 -0800
> > Ira Weiny <ira.weiny@...el.com> wrote:
> >   
> > > The UUID data is redundant in the known event trace types.  The addition
> > > of static defines allows the trace macros to create the UUID data inside
> > > the trace thus removing unnecessary code.
> > > 
> > > Have well known trace events use static data to set the uuid field based
> > > on the event type.
> > > 
> > > Suggested-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> > > Signed-off-by: Ira Weiny <ira.weiny@...el.com>
> > >   
> >   
> > >  	TP_STRUCT__entry(
> > >  		CXL_EVT_TP_entry
> > > @@ -422,7 +424,8 @@ TRACE_EVENT(cxl_dram,
> > >  	),
> > >  
> > >  	TP_fast_assign(
> > > -		CXL_EVT_TP_fast_assign(cxlmd, log, uuid, rec->hdr);
> > > +		CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr);
> > > +		memcpy(&__entry->hdr_uuid, &CXL_EVENT_DRAM_UUID, sizeof(uuid_t));  
> > 
> > Hmm. Why not
> > 
> > 		__entry->hdr_uuid = CXL_EVENT_DRAM_UUID;
> > ?
> > 
> > Compiler should be able to squish the stuff in the define down to data as as the
> > UUID generation logic is pretty simple.
> > 
> > I've not emulated the cper records for these yet, so not tested that works beyond
> > compiling.  
> 
> We can follow on with this conversion later as I see other usage of uuid
> copying in trace events (bcache for instance). Although I probably would
> not replace it with straight assignment and instead use the uuid_copy()
> helper. Otherwise, why do {uuid,guid}_copy() helpers exist?

To copy unknown uuids and guids where the compiler can't optimize things
nearly as well because it can't see the values. 

Jonathan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ