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: <92fc6fcb-3604-43b2-b66a-7f2a9edc16b4@kernel.org>
Date: Wed, 1 Oct 2025 15:37:08 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Johannes Thumshirn <johannes.thumshirn@....com>,
 Jens Axboe <axboe@...nel.dk>
Cc: Steven Rostedt <rostedt@...dmis.org>,
 Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-btrace@...r.kernel.org,
 John Garry <john.g.garry@...cle.com>, Hannes Reinecke <hare@...e.de>,
 Christoph Hellwig <hch@....de>, Naohiro Aota <naohiro.aota@....com>,
 Shinichiro Kawasaki <shinichiro.kawasaki@....com>,
 Chaitanya Kulkarni <chaitanyak@...dia.com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2 09/15] blktrace: add definitions for struct
 blk_io_trace2

On 9/26/25 00:02, Johannes Thumshirn wrote:
> Add definitions for the extended version of the blktrace protocol using a
> wider action type to be able to record new actions in the kernel.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....com>
> ---
>  include/uapi/linux/blktrace_api.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/include/uapi/linux/blktrace_api.h b/include/uapi/linux/blktrace_api.h
> index a3b1f35ac026..d58ef484de49 100644
> --- a/include/uapi/linux/blktrace_api.h
> +++ b/include/uapi/linux/blktrace_api.h
> @@ -94,6 +94,7 @@ enum blktrace_notify {
>  
>  #define BLK_IO_TRACE_MAGIC	0x65617400
>  #define BLK_IO_TRACE_VERSION	0x07
> +#define BLK_IO_TRACE2_VERSION	0x08
>  
>  /*
>   * The trace itself
> @@ -113,6 +114,21 @@ struct blk_io_trace {
>  	/* cgroup id will be stored here if exists */
>  };
>  
> +struct blk_io_trace2 {
> +	__u32 magic;		/* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
> +	__u32 sequence;		/* event number */
> +	__u64 time;		/* in nanoseconds */
> +	__u64 sector;		/* disk offset */
> +	__u32 bytes;		/* transfer length */
> +	__u32 pid;		/* who did it */
> +	__u64 action;		/* what happened */
> +	__u32 device;		/* device number */
> +	__u32 cpu;		/* on what cpu did it happen */
> +	__u16 error;		/* completion error */
> +	__u16 pdu_len;		/* length of data after this trace */
> +	__u8 pad[8];

Why 8 ? that makes the structure 4B 60 B. Padding to 12 would make it nicely
aligned to 64B...

> +	/* cgroup id will be stored here if exists */
> +};
>  /*
>   * The remap event
>   */


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ