linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Liyuan Pang <pangliyuan1@huawei.com>
Cc: nathan@kernel.org, nick.desaulniers+lkml@gmail.com,
	morbo@google.com, justinstitt@google.com, nico@fluxnic.net,
	will@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	xieyuanbin1@huawei.com, wanqian10@huawei.com
Subject: Re: [PATCH] ARM: fix input-only operand modification in load_unaligned_zeropad()
Date: Mon, 8 Dec 2025 09:47:16 +0000	[thread overview]
Message-ID: <aTaepMnRKqCM1IJe@shell.armlinux.org.uk> (raw)
In-Reply-To: <20251127025848.363992-1-pangliyuan1@huawei.com>

On Thu, Nov 27, 2025 at 10:58:48AM +0800, Liyuan Pang wrote:
> In the inline assembly inside load_unaligned_zeropad(), the "addr" is
> constrained as input-only operand. The compiler assumes that on exit
> from the asm statement these operands contain the same values as they
> had before executing the statement, but when kernel page fault happened,
> the assembly fixup code "bic %2 %2, #0x3" modify the value of "addr",
> which may lead to an unexpected behavior.
> 
> Use a temporary variable "tmp" to handle it, instead of modifying the
> input-only operand, just like what arm64's load_unaligned_zeropad()
> does.
> 
> Fixes: b9a50f74905a ("ARM: 7450/1: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs")
> 
> Co-developed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
> Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
> Signed-off-by: Liyuan Pang <pangliyuan1@huawei.com>

Sorry, I missed this email in the deluge. This looks entirely correct.
Please submit this to the patch system. Details in the signature below.
Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


      reply	other threads:[~2025-12-08  9:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  2:58 [PATCH] ARM: fix input-only operand modification in load_unaligned_zeropad() Liyuan Pang
2025-12-08  9:47 ` Russell King (Oracle) [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=aTaepMnRKqCM1IJe@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=nico@fluxnic.net \
    --cc=pangliyuan1@huawei.com \
    --cc=wanqian10@huawei.com \
    --cc=will@kernel.org \
    --cc=xieyuanbin1@huawei.com \
    /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).