From: "Arnd Bergmann" <arnd@arndb.de>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Darren Hart" <dvhart@infradead.org>,
"Peter Zijlstra" <peterz@infradead.org>,
sonicadvance1@gmail.com, linux-kernel@vger.kernel.org,
kernel-dev@igalia.com, linux-api@vger.kernel.org
Subject: Re: [PATCH RFC 1/1] futex: Create set_robust_list2
Date: Fri, 25 Oct 2024 06:33:31 +0000 [thread overview]
Message-ID: <df8896f8-3a19-4bde-86b3-8cb1172d0de7@app.fastmail.com> (raw)
In-Reply-To: <59509fc9-1a19-4162-ac89-559e08b75c06@igalia.com>
On Thu, Oct 24, 2024, at 19:55, André Almeida wrote:
> Em 24/10/2024 15:03, André Almeida escreveu:
>> Em 24/10/2024 12:57, Arnd Bergmann escreveu:
>>> On Thu, Oct 24, 2024, at 14:57, André Almeida wrote:
>>>> This new syscall allows to set multiple list to the same process. There
>>>> are two list types: 32 and 64 bit lists.
>>> Assuming we want them to behave the same way, did you intend
>>> ROBUST_LIST_64BIT to refer to 64-bit pointers on 32-bit
>>> tasks, or should they use normal word-size pointers?
>>
>> Oh right, I haven't covered that indeed. I think I would need to have
>> something like:
>>
>> static void exit_robust_list_64()
>> static void exit_robust_list_32()
>>
>> And then each function would use explicit sizes for pointers. Also, I
>> would rewrite the conditions to make that every combination of 64/32bit
>> kernel/app calls the appropriated function.
>
> Something like this:
>
> #ifdef CONFIG_64BIT
> if (unlikely(tsk->robust_list)) {
> exit_robust_list_64bit(tsk, tsk->robust_list);
> tsk->robust_list = NULL;
> }
> #else
> if (unlikely(tsk->robust_list)) {
> exit_robust_list_32bit(tsk, tsk->robust_list);
> tsk->robust_list = NULL;
> }
> #endif
>
> #ifdef CONFIG_COMPAT
> if (unlikely(tsk->compat_robust_list)) {
> exit_robust_32bit(tsk, tsk->compat_robust_list);
> tsk->compat_robust_list = NULL;
> }
> #endif
This should work, but I wonder if it ends up simpler to
instead have tsk->robust_list64 and tsk->robust_list32
entries and just put the #ifdef CONFIG_64BIT around the code
accessing robust_list64.
Arnd
prev parent reply other threads:[~2024-10-25 6:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 14:57 [PATCH RFC 0/1] futex: Add a new robust list syscall André Almeida
2024-10-24 14:57 ` [PATCH RFC 1/1] futex: Create set_robust_list2 André Almeida
2024-10-24 15:57 ` Arnd Bergmann
2024-10-24 18:03 ` André Almeida
2024-10-24 18:08 ` Randy Dunlap
2024-10-24 19:55 ` André Almeida
2024-10-25 6:33 ` 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=df8896f8-3a19-4bde-86b3-8cb1172d0de7@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andrealmeid@igalia.com \
--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=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sonicadvance1@gmail.com \
--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
all inboxes | Powered by JetHome®