• Jens Axboe's avatar
    io_uring/kbuf: disallow mapping a badly aligned provided ring buffer · fcb46c0c
    Jens Axboe authored
    
    
    On at least parisc, we have strict requirements on how we virtually map
    an address that is shared between the application and the kernel. On
    these platforms, IOU_PBUF_RING_MMAP should be used when setting up a
    shared ring buffer for provided buffers. If the application is mapping
    these pages and asking the kernel to pin+map them as well, then we have
    no control over what virtual address we get in the kernel.
    
    For that case, do a sanity check if SHM_COLOUR is defined, and disallow
    the mapping request. The application must fall back to using
    IOU_PBUF_RING_MMAP for this case, and liburing will do that transparently
    with the set of helpers that it has.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    fcb46c0c
kbuf.c 15 KB