| 126 | "Need an implementation for all IORING_OP_* codes"); |
| 127 | |
| 128 | void liburing_sanitize_ring(struct io_uring *ring) |
| 129 | { |
| 130 | struct io_uring_sq *sq = &ring->sq; |
| 131 | struct io_uring_sqe *sqe; |
| 132 | unsigned head = io_uring_load_sq_head(ring); |
| 133 | unsigned shift = io_uring_sqe_shift(ring); |
| 134 | |
| 135 | while (head != sq->sqe_tail) { |
| 136 | sqe = &sq->sqes[(head & sq->ring_mask) << shift]; |
| 137 | if (sqe->opcode < IORING_OP_LAST) |
| 138 | sanitize_handlers[sqe->opcode](sqe); |
| 139 | head++; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | void liburing_sanitize_address(const void *addr) |
| 144 | { |
no test coverage detected