[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1f7aadab-29f2-b8fa-4d5f-090fc49cf0b2@linux-m68k.org>
Date: Sun, 11 Aug 2024 09:54:42 +1000 (AEST)
From: Finn Thain <fthain@...ux-m68k.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
cc: Christian Brauner <brauner@...nel.org>, Greg Ungerer <gerg@...ux-m68k.org>,
Stan Johnson <userm57@...oo.com>, linux-m68k@...ts.linux-m68k.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: Fix kernel_clone_args.flags in m68k_clone()
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.
Powered by blists - more mailing lists