Re: io_uring failure on parisc with VIPT caches

Jens Axboe
2023-02-15T16:04:40Z

On 2/15/23 9:02?AM, Helge Deller wrote:
>>>> +static unsigned long io_uring_mmu_get_unmapped_area(struct file *filp,
>>>> + unsigned long addr, unsigned long len,
>>>> + unsigned long pgoff, unsigned long flags)
>>>> +{
>>>> + const unsigned long mmap_end = arch_get_mmap_end(addr, len, flags);
>>>> + struct vm_unmapped_area_info info;
>>>> + void *ptr;
>>>> +
>>>> + ptr = io_uring_validate_mmap_request(filp, pgoff, len);
>>>> + if (IS_ERR(ptr))
>>>> + return -ENOMEM;
>>>> +
>>>> + /* we do not support requesting a specific address */
>>>> + if (addr)
>>>> + return -EINVAL;
>>>
>>> With this ^ we disallow users to provide a proposed address.
>>> I think this is ok and I suggest to keep it that way.
>>>
>>> Alternatively one could check the given address against the
>>> alignment which is calculated below, but this will make the
>>> code IMHO unnecessary bigger.
>>
>> liburing won't provide an address, so I'd say let's just keep it as-is.
>
> Good.

Maybe it'd be saner to add that alignment check? Just in case someone is
passing in an address already, we could just make it fail for SHMLBA !=
0 (or SHM_COLOUR, I'll leave that to you).

--
Jens Axboe