public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Jeff Moyer <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH] io_uring/register: guard compat syscall with CONFIG_COMPAT
Date: Wed, 17 Jan 2024 09:45:02 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 1/17/24 9:24 AM, Jeff Moyer wrote:
>>>> @@ -278,13 +279,14 @@ static __cold int io_register_iowq_aff(struct io_ring_ctx *ctx,
>>>>  	if (len > cpumask_size())
>>>>  		len = cpumask_size();
>>>>  
>>>> -	if (in_compat_syscall()) {
>>>> +#ifdef CONFIG_COMPAT
>>>> +	if (in_compat_syscall())
>>>
>>> I don't think this is needed.
>>>
>>> linux/compat.h:
>>> ...
>>> #else /* !CONFIG_COMPAT */
>>>
>>> #define is_compat_task() (0)
>>> /* Ensure no one redefines in_compat_syscall() under !CONFIG_COMPAT */
>>> #define in_compat_syscall in_compat_syscall
>>> static inline bool in_compat_syscall(void) { return false; }
>>>
>>> Isn't the code fine as-is?
>>
>> It probably is, but this makes it consistent with the other spots we do
>> compat handling. Hence I'd prefer to keep it like that, and then perhaps
>> we can prune them all at some point.
> 
> I see one other spot.  :)  But if you are happy with it, that's fine by
> me.

I already shipped it internally like that, which is another reason why
I'd like to just keep it consistent and then we can do a cleanup on top
for 6.9 once tested.

>> Thanks for taking a look!
> 
> Reviewed-by: Jeff Moyer <[email protected]>

Thanks!

-- 
Jens Axboe


      reply	other threads:[~2024-01-17 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 14:51 [PATCH] io_uring/register: guard compat syscall with CONFIG_COMPAT Jens Axboe
2024-01-17 15:59 ` Jeff Moyer
2024-01-17 16:04   ` Jens Axboe
2024-01-17 16:24     ` Jeff Moyer
2024-01-17 16:45       ` Jens Axboe [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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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