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, 9 Aug 2023 08:54:49 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Sven Schnelle <svens@...ux.ibm.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tracing/synthetic: use union instead of casts

On Wed,  9 Aug 2023 09:14:59 +0200
Sven Schnelle <svens@...ux.ibm.com> wrote:

> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -1295,6 +1295,16 @@ static inline void trace_branch_disable(void)
>  /* set ring buffers to default size if not already done so */
>  int tracing_update_buffers(void);
>  
> +struct trace_dynamic {
> +	union {
> +		u8				as_u8;
> +		u16				as_u16;
> +		u32				as_u32;
> +		u64				as_u64;
> +		struct trace_dynamic_info	as_dynamic;
> +	};
> +};
> +

No need to create a structure around a single element union. Also, I would
like to name it for what it is for.

union trace_synth_field {
	u8				as_u8;
	u16				as_u16;
	u32				as_u32;
	u64				as_u64;
	struct trace_dynamic_info	as_dynamic;
};

Other than that, the patch looks good. Although I still need to test it.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ