From: Finn Thain <fthain@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Christian Brauner <brauner@kernel.org>,
Greg Ungerer <gerg@linux-m68k.org>,
Stan Johnson <userm57@yahoo.com>,
linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k: Fix kernel_clone_args.flags in m68k_clone()
Date: Sun, 11 Aug 2024 09:54:42 +1000 (AEST) [thread overview]
Message-ID: <1f7aadab-29f2-b8fa-4d5f-090fc49cf0b2@linux-m68k.org> (raw)
In-Reply-To: <CAMuHMdURykHCL1KEvgK=yC5sW-DAkEo+C+bbOBMUsbhD8aPSMw@mail.gmail.com>
On Sat, 10 Aug 2024, Geert Uytterhoeven wrote:
> > /* regs will be equal to current_pt_regs() */
> > struct kernel_clone_args args = {
> > - .flags = regs->d1 & ~CSIGNAL,
> > + .flags = (lower_32_bits(regs->d1) & ~CSIGNAL),
>
> While other architectures (nios2, sparc, generic code) do use
> lower_32_bits() in similar code[*], IMHO this is misleading here, as
> regs->d1 is never 64-bit. What you really want is to avoid the sign
> extension in the promotion from signed 32-bit to unsigned 64-bit.
> So I think a cast to u32 makes more sense?
>
Yes, I think your solution is better.
prev parent reply other threads:[~2024-08-10 23:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 7:03 Finn Thain
2024-08-10 14:54 ` Geert Uytterhoeven
2024-08-10 23:54 ` Finn Thain [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=1f7aadab-29f2-b8fa-4d5f-090fc49cf0b2@linux-m68k.org \
--to=fthain@linux-m68k.org \
--cc=brauner@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=userm57@yahoo.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
all inboxes | Powered by JetHome®