linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Anuj Gupta <anuj20.g@samsung.com>
Cc: vincent.fu@samsung.com, jack@suse.cz, anuj1072538@gmail.com,
	axboe@kernel.dk, viro@zeniv.linux.org.uk, brauner@kernel.org,
	hch@infradead.org, martin.petersen@oracle.com,
	ebiggers@kernel.org, adilger@dilger.ca,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	joshi.k@samsung.com, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, gost.dev@samsung.com
Subject: Re: [PATCH for-next v4 4/4] fs: add ioctl to query metadata and protection info capabilities
Date: Sun, 22 Jun 2025 22:32:55 -0700	[thread overview]
Message-ID: <aFjnBxZ8dAehH0Xr@infradead.org> (raw)
In-Reply-To: <20250618055153.48823-5-anuj20.g@samsung.com>

On Wed, Jun 18, 2025 at 11:21:53AM +0530, Anuj Gupta wrote:
> +/*
> + * struct logical_block_metadata_cap - Logical block metadata capability

No real need to duplicate the struct name here.

> + * If the device does not support metadata, all the fields will be zero.
> + * Applications must check lbmd_flags to determine whether metadata is supported or not.

Overly long line.

> + */
> +struct logical_block_metadata_cap {
> +	/* Bitmask of logical block metadata capability flags */
> +	__u32	lbmd_flags;
> +	/* The amount of data described by each unit of logical block metadata */

Loit sof overly long lines, please reformat these as block comments.

> +	__u16	lbmd_interval;
> +	/* Size in bytes of the logical block metadata associated with each interval */
> +	__u8	lbmd_size;
> +	/* Size in bytes of the opaque block tag associated with each interval */
> +	__u8	lbmd_opaque_size;



> +	/* Offset in bytes of the opaque block tag within the logical block metadata */
>
> +	__u8	lbmd_opaque_offset;
> +	/* Size in bytes of the T10 PI tuple associated with each interval */
> +	__u8	lbmd_pi_size;
> +	/* Offset in bytes of T10 PI tuple within the logical block metadata */
> +	__u8	lbmd_pi_offset;
> +	/* T10 PI guard tag type */
> +	__u8	lbmd_guard_tag_type;
> +	/* Size in bytes of the T10 PI application tag */
> +	__u8	lbmd_app_tag_size;
> +	/* Size in bytes of the T10 PI reference tag */
> +	__u8	lbmd_ref_tag_size;
> +	/* Size in bytes of the T10 PI storage tag */
> +	__u8	lbmd_storage_tag_size;
> +};

This leaves a byte of padding at the end, leaving to issues with
compiler alignments and potentially leaking uninitialized stack data.



  reply	other threads:[~2025-06-23  5:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250618055210epcas5p397b5ca1dc472e3008af707391a5fa628@epcas5p3.samsung.com>
2025-06-18  5:51 ` [PATCH for-next v4 0/4] add ioctl to query metadata and protection info capabilities Anuj Gupta
     [not found]   ` <CGME20250618055213epcas5p32ccbe13f8ed11ffa0beddaddb9a51595@epcas5p3.samsung.com>
2025-06-18  5:51     ` [PATCH for-next v4 1/4] block: rename tuple_size field in blk_integrity to metadata_size Anuj Gupta
2025-06-23  5:29       ` Christoph Hellwig
     [not found]   ` <CGME20250618055215epcas5p3232e90ae38bbd6667aacc6d32abb4189@epcas5p3.samsung.com>
2025-06-18  5:51     ` [PATCH for-next v4 2/4] block: introduce pi_tuple_size field in blk_integrity Anuj Gupta
     [not found]   ` <CGME20250618055218epcas5p13a69c6cbb36108a34379148a4f8d0a20@epcas5p1.samsung.com>
2025-06-18  5:51     ` [PATCH for-next v4 3/4] set pi_offset only when checksum type is not BLK_INTEGRITY_CSUM_NONE Anuj Gupta
2025-06-23  5:30       ` Christoph Hellwig
     [not found]   ` <CGME20250618055220epcas5p3e806eb6636542bb344c1a08cb9d9fd0f@epcas5p3.samsung.com>
2025-06-18  5:51     ` [PATCH for-next v4 4/4] fs: add ioctl to query metadata and protection info capabilities Anuj Gupta
2025-06-23  5:32       ` Christoph Hellwig [this message]
2025-06-23  1:33   ` [PATCH for-next v4 0/4] " Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aFjnBxZ8dAehH0Xr@infradead.org \
    --to=hch@infradead.org \
    --cc=adilger@dilger.ca \
    --cc=anuj1072538@gmail.com \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=jack@suse.cz \
    --cc=joshi.k@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vincent.fu@samsung.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).