[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJF2gTQTfD3yVCePWi_Jxu6Vc878K4P-quy4ZKw1OOF0X30UwQ@mail.gmail.com>
Date: Wed, 26 Mar 2025 17:22:41 +0800
From: Guo Ren <guoren@...nel.org>
To: Sergey Shtylyov <s.shtylyov@....ru>
Cc: arnd@...db.de, gregkh@...uxfoundation.org, torvalds@...ux-foundation.org,
paul.walmsley@...ive.com, palmer@...belt.com, anup@...infault.org,
atishp@...shpatra.org, oleg@...hat.com, kees@...nel.org, tglx@...utronix.de,
will@...nel.org, mark.rutland@....com, brauner@...nel.org,
akpm@...ux-foundation.org, rostedt@...dmis.org, edumazet@...gle.com,
unicorn_wang@...look.com, inochiama@...look.com, gaohan@...as.ac.cn,
shihua@...as.ac.cn, jiawei@...as.ac.cn, wuwei2016@...as.ac.cn, drew@...7.com,
prabhakar.mahadev-lad.rj@...renesas.com, ctsai390@...estech.com,
wefu@...hat.com, kuba@...nel.org, pabeni@...hat.com, josef@...icpanda.com,
dsterba@...e.com, mingo@...hat.com, peterz@...radead.org,
boqun.feng@...il.com, xiao.w.wang@...el.com, qingfang.deng@...lower.com.cn,
leobras@...hat.com, jszhang@...nel.org, conor.dooley@...rochip.com,
samuel.holland@...ive.com, yongxuan.wang@...ive.com,
luxu.kernel@...edance.com, david@...hat.com, ruanjinjie@...wei.com,
cuiyunhui@...edance.com, wangkefeng.wang@...wei.com, qiaozhe@...as.ac.cn,
ardb@...nel.org, ast@...nel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, kvm@...r.kernel.org,
kvm-riscv@...ts.infradead.org, linux-mm@...ck.org,
linux-crypto@...r.kernel.org, bpf@...r.kernel.org,
linux-input@...r.kernel.org, linux-perf-users@...r.kernel.org,
linux-serial@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-arch@...r.kernel.org, maple-tree@...ts.infradead.org,
linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-atm-general@...ts.sourceforge.net, linux-btrfs@...r.kernel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-nfs@...r.kernel.org, linux-sctp@...r.kernel.org,
linux-usb@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [RFC PATCH V3 25/43] rv64ilp32_abi: exec: Adapt 64lp64 env and argv
On Wed, Mar 26, 2025 at 1:19 AM Sergey Shtylyov <s.shtylyov@....ru> wrote:
>
> On 3/25/25 3:16 PM, guoren@...nel.org wrote:
>
> > From: "Guo Ren (Alibaba DAMO Academy)" <guoren@...nel.org>
> >
> > The rv64ilp32 abi reuses the env and argv memory layout of the
> > lp64 abi, so leave the space to fit the lp64 struct layout.
> >
> > Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@...nel.org>
> > ---
> > fs/exec.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/fs/exec.c b/fs/exec.c
> > index 506cd411f4ac..548d18b7ae92 100644
> > --- a/fs/exec.c
> > +++ b/fs/exec.c
> > @@ -424,6 +424,10 @@ static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
> > }
> > #endif
> >
> > +#if defined(CONFIG_64BIT) && (BITS_PER_LONG == 32)
okay, #if defined(CONFIG_64BIT) && BITS_PER_LONG == 32
>
> Parens don't seem necessary...
>
> > + nr = nr * 2;
>
> Why not nr *= 2?
okay, nr *= 2;
--
Best Regards
Guo Ren
Powered by blists - more mailing lists