From: "Arnd Bergmann" <arnd@arndb.de>
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"André Almeida" <andrealmeid@igalia.com>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>, shuah <shuah@kernel.org>,
"Waiman Long" <longman@redhat.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-api@vger.kernel.org, kernel-dev@igalia.com
Subject: Re: [PATCH RESEND v4 0/7] futex: Create set_robust_list2
Date: Wed, 18 Jun 2025 19:03:39 +0200 [thread overview]
Message-ID: <e79698f8-c428-44dc-afac-8d918968d11d@app.fastmail.com> (raw)
In-Reply-To: <20250618165641.bKu1_p0P@linutronix.de>
On Wed, Jun 18, 2025, at 18:56, Sebastian Andrzej Siewior wrote:
> On 2025-06-18 13:39:46 [-0300], André Almeida wrote:
>>
>> Ops, I forgot to address them. I will do it for v5.
>>
>> > - You say 64bit x86-64 does not have the problem due the compat syscall.
>> > Arm64 has this problem. New arm64 do not provide arm32 facility. You
>> > introduce the syscall here. Why not introduce the compat syscall
>> > instead? I'm sorry if this has been answered somewhere below but this
>> > was one question I had while I initially skimmed over the patches.
>> >
>>
>> The main target for this new syscall is Arm64, that can't handle 32 pointers
>> in the current syscall, so this new interface allows the robust list
>> mechanism to know if it needs to do 64 or 32 bit pointer arithmetic
>> operations to walk in the list.
>>
>> Introducing a compat syscall won't fix this, giving that it only works in
>> x86-64. We need an entry point for Arm64 that can handle 32 bit pointers.
>
> I would need to dig into details to figure out why it won't work for
> arm64 and works only for x86-64.
> There is the set_robust_list syscall as compat which sets
> ::compat_robust_list. And non-compat sets ::robust_list. The 32bit
> application on 64bit kernel should set ::compat_robust_list which what
> your syscall provides.
> That is why I don't understand the need for it so far. Maybe I am
> missing a detail.
> We have other architectures with 64 bit kernel and a possible 32bit
> userland such as mips, s390 or powerpc which would have the same issue
> then. Or there is something special about arm64 in this case which makes
> it unique.
x86 is the special case here, since it allows applications to
call both the 32-bit (compat) and 64-bit syscalls directly on
a 64-bit kernel. I think MIPS may do that as well, but the other
architectures only allow a process to call syscalls for its native
ABI, so the only way to call a compat syscall is from a 32-bit
task. On Arm and RISC-V it's also common to have CPUs that cannot
run 32-bit tasks at all, so even running your x86-32 emulator as
an arm32 or rv32 task won't work.
Arnd
prev parent reply other threads:[~2025-06-18 17:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 18:34 [PATCH RESEND v4 0/7] futex: Create set_robust_list2 André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 1/7] selftests/futex: Add ASSERT_ macros André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 2/7] selftests/futex: Create test for robust list André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 3/7] futex: Use explicit sizes for compat_exit_robust_list André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 4/7] futex: Create set_robust_list2 André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 5/7] futex: Wire up set_robust_list2 syscall André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 6/7] futex: Remove the limit of elements for sys_set_robust_list2 lists André Almeida
2025-06-17 18:34 ` [PATCH RESEND v4 7/7] selftests: futex: Expand robust list test for the new interface André Almeida
2025-06-18 7:08 ` [PATCH RESEND v4 0/7] futex: Create set_robust_list2 Sebastian Andrzej Siewior
2025-06-18 16:39 ` André Almeida
2025-06-18 16:56 ` Sebastian Andrzej Siewior
2025-06-18 17:03 ` Arnd Bergmann [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=e79698f8-c428-44dc-afac-8d918968d11d@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andrealmeid@igalia.com \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=kernel-dev@igalia.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/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).