From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> This is a preparation patch to add aarch64 nolibc support. aarch64 supports three values of page size: 4K, 16K, and 64K which are selected at kernel compilation time. Therefore, we can't hard code the page size for this arch. We will utilize open(), read() and close() syscall to find the page size from /proc/self/auxv. Since syscall may fail, we may also fail to get the page size here. Handle the failure. Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> --- src/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/setup.c b/src/setup.c index d2adc7f..ca9d30d 100644 --- a/src/setup.c +++ b/src/setup.c @@ -336,6 +336,9 @@ ssize_t io_uring_mlock_size_params(unsigned entries, struct io_uring_params *p) } page_size = get_page_size(); + if (page_size < 0) + return page_size; + return rings_size(p, entries, cq_entries, page_size); } -- Ammar Faizi