[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJF2gTRfo-JuGtCJvZKAFJ0BAEzdqe83TvccCKM54BL0NQHHJw@mail.gmail.com>
Date: Tue, 25 Mar 2025 21:13:57 +0800
From: Guo Ren <guoren@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
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, 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 00/43] rv64ilp32_abi: Build CONFIG_64BIT
kernel-self with ILP32 ABI
On Tue, Mar 25, 2025 at 8:27 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Mar 25, 2025 at 08:15:41AM -0400, guoren@...nel.org wrote:
> > From: "Guo Ren (Alibaba DAMO Academy)" <guoren@...nel.org>
> >
> > Since 2001, the CONFIG_64BIT kernel has been built with the LP64 ABI,
> > but this patchset allows the CONFIG_64BIT kernel to use an ILP32 ABI
>
> I'm thinking you're going to be finding a metric ton of assumptions
> about 'unsigned long' being 64bit when 64BIT=y throughout the kernel.
Less than you imagined. Most code is compatible with ILP32 ABI due to
the CONFIG_32BIT. In my practice, it's deemed acceptable.
>
> I know of a couple of places where 64BIT will result in different math
> such that a 32bit 'unsigned long' will trivially overflow.
I would be grateful if you could share some with me.
>
> Please, don't do this. This adds a significant maintenance burden on all
> of us.
The 64ILP32 ABI would bear the maintenance burden, not traditional
64-bit or 32-bit ABIs. The patch set won't impact other CONFIG_64BIT
or CONFIG_32BIT. Numerous RV64 chips require the RV64ILP32 ABI to
reduce the memory and cache footprint; we will bear the burden. The
core code maintainers would receive patches that would make them use
BITS_PER_LONG and CONFIG_64BIT more accurately.
--
Best Regards
Guo Ren
Powered by blists - more mailing lists