linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Russell King" <linux@armlinux.org.uk>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Arnd Bergmann" <arnd@arndb.de>,
	stable@vger.kernel.org
Subject: Re: [PATCH] ARM: fix memset64() on big-endian
Date: Fri, 2 Jan 2026 23:05:33 +0000	[thread overview]
Message-ID: <20260102230533.4fb1d8ef@pumpkin> (raw)
In-Reply-To: <aVfirJvsYt0-jDRD@casper.infradead.org>

On Fri, 2 Jan 2026 15:22:20 +0000
Matthew Wilcox <willy@infradead.org> wrote:

> On Fri, Jan 02, 2026 at 08:15:46AM +0100, Thomas Weißschuh wrote:
> > On big-endian systems the 32-bit low and high halves need to be swapped,
> > for the underlying assembly implemenation to work correctly.  
> 
> Heh.  In my heart, ARM will always be a litte-endian architecture.
> I'm not really surprised this bug took, er, 8 years to show up; big-endian
> arm is rare enough and memset64() isn't much used on 32-bit systems.
> And it turns out that many of the users pass a constant 0 as the value,
> which was kind of not the point, but it seems to be an easier API to
> use than memset, so whatever ;-)

I'd have thought that part of the point of memset64() was to remove
all the 'alignment' and 'tail handling' that a normal memset() has.
Clearly someone thought otherwise :-)

	David

> 
> > Fixes: fd1d362600e2 ("ARM: implement memset32 & memset64")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>  
> 
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 



      reply	other threads:[~2026-01-02 23:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-02  7:15 [PATCH] ARM: fix memset64() on big-endian Thomas Weißschuh
2026-01-02  9:24 ` Arnd Bergmann
2026-01-02  9:34   ` Thomas Weißschuh
2026-01-02 15:22 ` Matthew Wilcox
2026-01-02 23:05   ` David Laight [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=20260102230533.4fb1d8ef@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).