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:   Thu, 9 Sep 2021 21:03:42 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Stephane Eranian <eranian@...gle.com>
Cc:     linux-kernel@...r.kernel.org, acme@...hat.com, jolsa@...hat.com,
        kim.phillips@....com, namhyung@...nel.org, irogers@...gle.com,
        atrajeev@...ux.vnet.ibm.com, maddy@...ux.ibm.com,
        mpe@...erman.id.au
Subject: Re: [PATCH v1 01/13] perf/core: add union to struct perf_branch_entry

On Thu, Sep 09, 2021 at 12:56:48AM -0700, Stephane Eranian wrote:
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index f92880a15645..eb11f383f4be 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1329,13 +1329,18 @@ union perf_mem_data_src {
>  struct perf_branch_entry {
>  	__u64	from;
>  	__u64	to;
> -	__u64	mispred:1,  /* target mispredicted */
> -		predicted:1,/* target predicted */
> -		in_tx:1,    /* in transaction */
> -		abort:1,    /* transaction abort */
> -		cycles:16,  /* cycle count to last branch */
> -		type:4,     /* branch type */
> -		reserved:40;
> +	union {
> +		__u64	val;	    /* to make it easier to clear all fields */
> +		struct {
> +			__u64	mispred:1,  /* target mispredicted */
> +				predicted:1,/* target predicted */
> +				in_tx:1,    /* in transaction */
> +				abort:1,    /* transaction abort */
> +				cycles:16,  /* cycle count to last branch */
> +				type:4,     /* branch type */
> +				reserved:40;
> +		};
> +	};
>  };


Hurpmh... all other bitfields have ENDIAN_BITFIELD things except this
one. Power folks, could you please have a look?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ