public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	cem@kernel.org, r772577952@gmail.com, stable@vger.kernel.org,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/4] xfs: check the return value of xchk_xfile_*_descr calls
Date: Thu, 22 Jan 2026 06:57:48 +0100	[thread overview]
Message-ID: <20260122055748.GA23964@lst.de> (raw)
In-Reply-To: <20260121182208.GH5945@frogsfrogsfrogs>

On Wed, Jan 21, 2026 at 10:22:08AM -0800, Darrick J. Wong wrote:
> > xchk_xfile_*_descr is used to pass the name to xfarray_create or
> > xfblob_create.  I still think it would make this a lot more robust if
> > those took a format string and varags, and then we'd have wrappers for
> > the common types.  Even if that still ends up doing kasprintf underneath,
> > that would be isolated to the low-level functions that only need to
> > implement error handling and freeing once.
> 
> Alternately we just drop all the helpers and kasprintf crap in favor of
> feeding the raw string ("iunlinked next pointers") all the way through
> to shmem_kernel_file_setup.

But wouldn't we get duplicate names for different inodes?

Anyway, I did a quick take at format string / varags version of the
helpers, and that works out nicely, but that _descr macros still confuse
me a bit.  Maybe I'll have something until the start of your Thursday.


  reply	other threads:[~2026-01-22  5:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  6:40 [PATCHSET] xfs: syzbot fixes for online fsck Darrick J. Wong
2026-01-21  6:40 ` [PATCH 1/4] xfs: check the return value of xchk_xfile_*_descr calls Darrick J. Wong
2026-01-21  7:03   ` Christoph Hellwig
2026-01-21 18:22     ` Darrick J. Wong
2026-01-22  5:57       ` Christoph Hellwig [this message]
2026-01-22 18:57         ` Darrick J. Wong
2026-01-23  5:33           ` Christoph Hellwig
2026-01-23  7:00             ` Darrick J. Wong
2026-01-21  6:40 ` [PATCH 2/4] xfs: only call xf{array,blob}_destroy if we have a valid pointer Darrick J. Wong
2026-02-05 19:40   ` Chris Mason
2026-02-06  4:46     ` Darrick J. Wong
2026-01-21  6:40 ` [PATCH 3/4] xfs: check return value of xchk_scrub_create_subord Darrick J. Wong
2026-01-21  7:03   ` Christoph Hellwig
2026-01-21  6:41 ` [PATCH 4/4] xfs: fix UAF in xchk_btree_check_block_owner Darrick J. Wong
2026-01-21  7:04   ` Christoph Hellwig

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=20260122055748.GA23964@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=r772577952@gmail.com \
    --cc=stable@vger.kernel.org \
    /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