public inbox for [email protected]
 help / color / mirror / Atom feed
From: Keith Busch <[email protected]>
To: Matthew Wilcox <[email protected]>
Cc: Keith Busch <[email protected]>,
	[email protected], [email protected],
	[email protected],
	Linus Torvalds <[email protected]>
Subject: Re: [PATCH] fs: don't randomized kiocb fields
Date: Mon, 15 Aug 2022 08:49:58 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On Sun, Aug 14, 2022 at 11:35:35AM +0100, Matthew Wilcox wrote:
> On Fri, Aug 12, 2022 at 03:56:33PM -0700, Keith Busch wrote:
> >  struct kiocb {
> >  	struct file		*ki_filp;
> > -
> > -	/* The 'ki_filp' pointer is shared in a union for aio */
> > -	randomized_struct_fields_start
> > -
> >  	loff_t			ki_pos;
> >  	void (*ki_complete)(struct kiocb *iocb, long ret);
> >  	void			*private;
> >  	int			ki_flags;
> >  	u16			ki_ioprio; /* See linux/ioprio.h */
> >  	struct wait_page_queue	*ki_waitq; /* for async buffered IO */
> > -	randomized_struct_fields_end
> >  };
> 
> Now that I've read the thread ...
> 
> If we care about struct size on 32-bit, we should fit something into
> the 32-bit hole before the 64-bit loff_t (assuming at least some 32-bit
> arches want loff_t to be 64-bit aligned; I thik x86 doesn't?)
> Easiest seems to be to put ki_complete before ki_pos?

Yes, that would be a better compact arrangment. The immediate need was just to
correct io_uring's max command struct size. The 32-bit verison isn't near the
limit, so no additional optimizations were done in this patch. 

      reply	other threads:[~2022-08-15 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 22:56 [PATCH] fs: don't randomized kiocb fields Keith Busch
2022-08-12 23:00 ` Jens Axboe
2022-08-13  7:59 ` Christoph Hellwig
2022-08-13 14:33   ` Jens Axboe
2022-08-14 10:35 ` Matthew Wilcox
2022-08-15 14:49   ` Keith Busch [this message]

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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