Re: [PATCH] io_uring/register: guard compat syscall with CONFIG_COMPAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jmoyer@xxxxxxxxxx>

Thanks!

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux