Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Stian Halseth <stian@itx.no>
Cc: Christoph Hellwig <hch@infradead.org>,
	Carlos Maiolino <cem@kernel.org>,
	linux-xfs@vger.kernel.org, "Darrick J . Wong" <djwong@kernel.org>,
	sparclinux@vger.kernel.org, Jan Engelhardt <jengelh@inai.de>,
	Dave Chinner <dgc@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3] xfs: fix unaligned access to rmapbt high keys in scrub
Date: Tue, 1 Dec 2026 23:28:50 -0800	[thread overview]
Message-ID: <aw_Ist5fucVFQeje@infradead.org> (raw)
In-Reply-To: <637ac952837ebabd9fdd1c28bbff09cc5ebb83cb.camel@itx.no>

On Wed, Nov 11, 2026 at 08:01:42PM +0100, Stian Halseth wrote:
> In fact struct xfs_rmap_key is already packed in xfs_format.h. The trap
> comes from reading it through union xfs_btree_key. The union itself is
> 8-byte aligned which is why gcc uses an 8-byte load for rm_offset.
> 
> I guess we could mark the union __packed. The consequence of that
> is that every key access through the union would be turned into byte
> loads on strict-alignment arches. If you would like, I could test and
> measure exactly what that means on sparc64.

Did you try this?


      reply	other threads:[~2026-12-02  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 10:30 [PATCH v3] xfs: fix unaligned access to rmapbt high keys in scrub Stian Halseth
2026-11-11 15:19 ` Christoph Hellwig
2026-11-11 19:01   ` Stian Halseth
2026-12-02  7:28     ` Christoph Hellwig [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 \
    --in-reply-to=aw_Ist5fucVFQeje@infradead.org \
    --to=hch@infradead.org \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=jengelh@inai.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stian@itx.no \
    /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