- Nov 09, 2021
-
-
Ammar Faizi authored
This is the reproducer for the kworker hang bug. Reproduction Steps: 1) A user task calls io_uring_queue_exit(). 2) Suspend the task with SIGSTOP / SIGTRAP before the ring exit is finished (do it as soon as step (1) is done). 3) Wait for `/proc/sys/kernel/hung_task_timeout_secs` seconds elapsed. 4) We get a complaint from the khungtaskd because the kworker is stuck in an uninterruptible state (D). The kworkers waiting on ring exit are not progressing as the task cannot proceed. When the user task is continued (e.g. get SIGCONT after SIGSTOP, or continue after SIGTRAP breakpoint), the kworkers then can finish the ring exit. We need a special handling for this case to avoid khungtaskd complaint. Currently we don't have the fix for this. The dmesg says: [247390.432294] INFO: task kworker/u8:2:358488 blocked for more than 10 seconds. [247390.432314] Tainted: G OE 5.15.0-stable #5 [247390.432322] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [247390.432329] task:kworker/u8:2 state:D stack: 0 pid:358488 ppid: 2 flags:0x00004000 [247390.432341] Workqueue: events_unbound io_ring_exit_work [247390.432354] Call Trace: [247390.432368] __schedule+0x453/0x1850 [247390.432388] ? lock_acquire+0xc8/0x2d0 [247390.432404] ? usleep_range+0x90/0x90 [247390.432412] schedule+0x59/0xc0 [247390.432420] schedule_timeout+0x1aa/0x1f0 [247390.432429] ? mark_held_locks+0x49/0x70 [247390.432439] ? lockdep_hardirqs_on_prepare+0xff/0x180 [247390.432445] ? _raw_spin_unlock_irq+0x24/0x40 [247390.432456] __wait_for_common+0xc2/0x170 [247390.432473] io_ring_exit_work+0x1d9/0x750 [247390.432486] ? io_uring_del_tctx_node+0xe0/0xe0 [247390.432502] ? verify_cpu+0xf0/0x100 [247390.432520] process_one_work+0x23b/0x550 [247390.432540] worker_thread+0x55/0x3c0 [247390.432546] ? process_one_work+0x550/0x550 [247390.432556] kthread+0x140/0x160 [247390.432564] ? set_kthread_struct+0x40/0x40 [247390.432574] ret_from_fork+0x1f/0x30 [247390.432605] INFO: task kworker/u8:0:359615 blocked for more than 10 seconds. [247390.432613] Tainted: G OE 5.15.0-stable #5 [247390.432620] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [247390.432626] task:kworker/u8:0 state:D stack: 0 pid:359615 ppid: 2 flags:0x00004000 [247390.432635] Workqueue: events_unbound io_ring_exit_work [247390.432643] Call Trace: [247390.432653] __schedule+0x453/0x1850 [247390.432676] ? usleep_range+0x90/0x90 [247390.432684] schedule+0x59/0xc0 [247390.432691] schedule_timeout+0x1aa/0x1f0 [247390.432700] ? mark_held_locks+0x49/0x70 [247390.432710] ? lockdep_hardirqs_on_prepare+0xff/0x180 [247390.432717] ? _raw_spin_unlock_irq+0x24/0x40 [247390.432728] __wait_for_common+0xc2/0x170 [247390.432744] io_ring_exit_work+0x1d9/0x750 [247390.432758] ? io_uring_del_tctx_node+0xe0/0xe0 [247390.432772] ? verify_cpu+0xf0/0x100 [247390.432788] process_one_work+0x23b/0x550 [247390.432807] worker_thread+0x55/0x3c0 [247390.432813] ? process_one_work+0x550/0x550 [247390.432824] kthread+0x140/0x160 [247390.432830] ? set_kthread_struct+0x40/0x40 [247390.432839] ret_from_fork+0x1f/0x30 [247390.432870] Showing all locks held in the system: [247390.432877] 1 lock held by khungtaskd/40: [247390.432880] #0: ffffffff82976700 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0x174 [247390.432911] 1 lock held by in:imklog/922: [247390.432915] #0: ffff8881041cfcf0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4a/0x60 [247390.432977] 2 locks held by pager/318088: [247390.432981] #0: ffff8881208d4898 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x50 [247390.433001] #1: ffffc900010fd2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x49e/0x660 [247390.433024] 1 lock held by htop/341462: [247390.433032] 2 locks held by kworker/u8:2/358488: [247390.433035] #0: ffff888100106938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550 [247390.433053] #1: ffffc90003797e70 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550 [247390.433071] 2 locks held by kworker/u8:0/359615: [247390.433075] #0: ffff888100106938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550 [247390.433092] #1: ffffc90003597e70 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550 [247390.433110] 1 lock held by dmesg/361178: [247390.433113] #0: ffff88810b5300d0 (&user->lock){+.+.}-{3:3}, at: devkmsg_read+0x4b/0x230 [247390.433134] ============================================= Cc: Pavel Begunkov <asml.silence@gmail.com> Link: https://github.com/axboe/liburing/issues/448 Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Nov 06, 2021
-
-
Jens Axboe authored
-EINTR relies on io-wq, we can also find and cancel before that. Make sure the test allows it, fixing the following case failure on newer kernels: 1 -125 child failed 1 test_cancel_req_across_fork() failed Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Nov 05, 2021
-
-
https://github.com/GalaxySnail/liburingJens Axboe authored
* 'pr1' of https://github.com/GalaxySnail/liburing: man/io_uring_setup.2: add missing `wq_fd` field
-
GalaxySnail authored
Add missing `wq_fd` field for `struct io_uring_params`. Fixes: https://github.com/axboe/liburing/issues/473 Signed-off-by:
Luchen Yang <ylc991@163.com>
-
- Oct 31, 2021
-
-
Ammar Faizi authored
The Makefile for test is not efficient and reads bad. We have to specify the name for each test 2 times (filename and name without the ext) while we could have just elided the extension from the source filename. Let's make it simpler and easier to manage. Changes summary: - Clean up and reorder things. - Sort the `test_srcs` alphabetically. - Remove `test_objs` (it turned out unused). - Generate `test_targets` variable from `test_srcs` by simply removing the `.c` and `.cc` file extension. Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211030114858.320116-3-ammar.faizi@intel.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Several things go wrong with this Makefile: 1) Using `test_srcs` to generate `test_objs`. 2) `test_objs` is an unused variable. So (1) is pointless. 3) `make clean` does not remove `ucontext-cp` binary. I assume (1) and (2) were blindly copied from the test Makefile. For 3, the `make clean` removes $(all_targets) and $(test_objs). But `ucontext-cp` only exists in $(all_targets) if we have `CONFIG_HAVE_UCONTEXT`. When the target goal is `clean`, we will not have any of `CONFIG_*` variables. Thus, `ucontext-cp` is not removed. Clean them up! Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211030114858.320116-2-ammar.faizi@intel.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 30, 2021
-
-
https://github.com/ammarfaizi2/liburingJens Axboe authored
* 'pr-template' of https://github.com/ammarfaizi2/liburing: .github: Create pull_request_template.md
-
Ammar Faizi authored
GitHub throws away the relevant information like having even a valid email address for the person asking to pull. Another common problem on GitHub, people don't do any of the simplest things that the kernel people expect from a commit message, like: - No "short one-line description in the first line". - No sane word-wrap of the long description. GitHub commit messages tend to be (if they have any description at all) one long unreadable line. - No sign-off and other tags that we require for commit message. Let's fix this by creating a pull request template that contains pull request guidelines for GitHub Pull Request. Link: https://github.com/axboe/liburing/pull/464#issuecomment-950950688 Signed-off-by:
Ammar Faizi <ammarfaizi2@gmail.com>
-
- Oct 25, 2021
-
-
https://github.com/tchaloupka/liburingJens Axboe authored
* 'fix463' of https://github.com/tchaloupka/liburing: Fix invalid opcode used in io_uring_unregister_iowq_aff
-
- Oct 24, 2021
-
-
Tomáš Chaloupka authored
Just a trivial fix of used opcode IORING_REGISTER_IOWQ_AFF -> IORING_UNREGISTER_IOWQ_AFF. Signed-off-by:
Tomáš Chaloupka <chalucha@gmail.com> Fixes: https://github.com/axboe/liburing/issues/463
-
- Oct 21, 2021
-
-
https://github.com/romange/liburingJens Axboe authored
* 'pr2' of https://github.com/romange/liburing: Add io_uring_prep_readv2 and io_uring_prep_writev2 helpers
-
Roman Gershman authored
These correspond to preadv2 and pwritev2 calls and include flags argument missing in the original helpers. Signed-off-by:
Roman Gershman <romange@gmail.com> Link: https://github.com/axboe/liburing/issues/461
-
- Oct 18, 2021
-
-
Jens Axboe authored
This reverts commit af31ce2c. The commit is buggy and causes ucontext-cp to crash. Just revert it for now. Fixes: https://github.com/axboe/liburing/issues/459 Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Fix this: ``` In file included from timeout-overflow.c:12: timeout-overflow.c: In function ‘test_timeout_overflow’: ../src/include/liburing.h:406:9: error: ‘num’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 406 | io_uring_prep_rw(IORING_OP_TIMEOUT, sqe, -1, ts, 1, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ timeout-overflow.c:104:26: note: ‘num’ was declared here 104 | unsigned num; | ^~~ ``` Fixes: a4b46553 ("Add test for overflow of timeout request's sequence") Cc: yangerkun <yangerkun@huawei.com> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/BULrcXMbevM-ammarfaizi2@gnuweeb.org Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Fix this: ``` timeout.c: In function ‘test_multi_timeout’: timeout.c:590:20: warning: ‘user_data’ may be used uninitialized in this function [-Wmaybe-uninitialized] 590 | if (cqe->user_data != user_data) { | ^ timeout.c:601:51: warning: ‘time’ may be used uninitialized in this function [-Wmaybe-uninitialized] 601 | if (exp < time / 2 || exp > (time * 3) / 2) { | ~~~~~~^~~~ ``` Fixes: 37136cb4 ("test/timeout: add multi timeout reqs test with different timeout") Cc: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/hgUsvvrR9xY-ammarfaizi2@gnuweeb.org Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 11, 2021
-
-
https://github.com/Tindarid/liburingJens Axboe authored
* 'master' of https://github.com/Tindarid/liburing: setup.c: rewrite `__fls()`
-
Nursan Valeyev authored
Rewrite handmade `__fls()`: use `__builtin_clz()`. Also add `inline` specifier. Signed-off-by:
Nursan Valeyev <tindarid@gmail.com>
-
Ammar Faizi authored
Add `__attribute__((__aligned__))` to the `user_p` to guarantee pointer returned by the `malloc()` is properly aligned for user. This attribute asks the compiler to align a type to the maximum useful alignment for the target machine we are compiling for, which is often, but by no means always, 8 or 16 bytes [1]. Link: https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Common-Variable-Attributes.html#Common-Variable-Attributes [1] Fixes: https://github.com/axboe/liburing/issues/454 Reported-by:
Louvian Lyndal <louvianlyndal@gmail.com> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211011064927.444704-1-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
https://github.com/ammarfaizi2/liburingJens Axboe authored
* 'add-ci-nolibc-x86-64' of https://github.com/ammarfaizi2/liburing: .github/workflows/build.yml: Add nolibc build x86-64 for CI
-
Ammar Faizi authored
Fixes: https://github.com/axboe/liburing/issues/443 Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id>
-
- Oct 10, 2021
-
-
Ammar Faizi authored
It's for conditonal variable and macro to enable nolibc build. Also add `--nolibc` option to `configure` to enable it. Link: https://github.com/axboe/liburing/issues/443 Reviewed-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211010135338.397115-4-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Create `src/nolibc.c` to provide libc functions like `memset()`, `malloc()` and `free()`. Only build this file when we build liburing without libc. Add `get_page_size()` function to get the page size. When we build with libc, it uses `sysconf(_SC_PAGESIZE)`, otherwise it uses arch dependent implementation function that we provide at `src/arch` dir. Add conditional preprocessor in `src/syscall.h` to use arch dependent syscalls written in Assembly when we build liburing without libc. Extra notes for tests: 1) Functions in `src/syscall.c` require libc to work. 2) Tests require functions in `src/syscall.c`. So we build `src/syscall.c` manually from the test's Makefile. The Makefile in `src/` dir still builds `src/syscall.c` when we build liburing with libc. Link: https://github.com/axboe/liburing/issues/443 Reviewed-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211010135338.397115-3-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Create a new directory `src/arch` to save arch dependent sources. Add support start from x86-64, add syscalls crafted in Assembly code and lib (currently the lib only contains get page size function). Link: https://github.com/axboe/liburing/issues/443 Reviewed-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211010135338.397115-2-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
When I add support for nolibc x86-64, I find this test failed. Long story short, we provide our own `free()` that always unmaps the VM with `munmap()`. It makes the CQE return -EFAULT because the kernel reads unmapped user memory from the pending `write()` SQE. I believe this test can run properly with libc build because `free()` from libc doesn't always unmap the memory, instead it uses free list on the userspace and the freed heap may still be userspace addressable. Fix this by deferring the free. Cc: Jens Axboe <axboe@kernel.dk> Fixes: 2edfa3f8 ("Add test case for thread exiting with pending IO") Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211010063906.341014-2-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 07, 2021
-
-
Ammar Faizi authored
When we build liburing without libc, we can't check `errno` variable with respect to liburing's functions. Don't do that it in test. Note: The tests themselves can still use `errno` to check error from functions that come from the libc, but not liburing. Link: https://github.com/axboe/liburing/issues/443 Fixes: https://github.com/axboe/liburing/issues/449 Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
`io_uring_free_probe()` should really be used to free the return value of `io_uring_get_probe_ring()`. As we may not always allocate it with `malloc()`. For example, to support no libc build [1]. Link: https://github.com/axboe/liburing/issues/443 [1] Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 06, 2021
-
-
Jens Axboe authored
struct open_how and friends reside in the openat2.h header, so include that for the test case. Fixes: https://github.com/axboe/liburing/issues/360 Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 05, 2021
-
-
Ammar Faizi authored
Cc: Jens Axboe <axboe@kernel.dk> Cc: Olivier Langlois <olivier@trillion01.com> Fixes: a060c8e5 ("liburing: Add io_uring_submit_and_wait_timeout function in API") Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 04, 2021
-
-
Olivier Langlois authored
Before commit 0ea4ccd1 ("src/queue: don't flush SQ ring for new wait interface"), io_uring_wait_cqes() was serving the purpose of submit sqe and wait for cqe up to a certain timeout value. Since the commit, a new function is needed to fill this gap. Fixes: https://github.com/axboe/liburing/issues/440 Signed-off-by:
Olivier Langlois <olivier@trillion01.com> Link: https://lore.kernel.org/r/1bbde6755535cb7b0bdfc0846254e7c06faf04e0.1633366467.git.olivier@trillion01.com [axboe: minor style and commit message fixup] Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
In commit 0c210dbae26a80ee82dbc7430828ab6fd7012548 ("Wrap all syscalls in a kernel style return value"), we forgot to add a syscall wrapper for `close()`. Add it. Fixes: cccf0fa1 ("Wrap all syscalls in a kernel style return value") Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211004013510.428077-1-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Oct 03, 2021
-
-
Ammar Faizi authored
Add new syscall wrapper functions: 1) `uring_mmap` 2) `uring_munmap` 3) `uring_madvise` 4) `uring_getrlimit` 5) `uring_setrlimit` All of them are `static inline`. Use them to wrap the syscalls in a kernel style return value. The main purpose of this change is to make it possible to remove the dependency of `errno` variable in liburing C sources, so that later we can support build without libc. Extra new helpers: 1) `ERR_PTR()` 2) `PTR_ERR()` 3) `IS_ERR()` These helpers are used to deal with syscalls that return a pointer. Currently only `uring_mmap()` that depends on these. Link: https://github.com/axboe/liburing/issues/443#issuecomment-927873932 Cc: Bedirhan KURT <windowz414@gnuweeb.org> Suggested-by:
Louvian Lyndal <louvianlyndal@gmail.com> Reviewed-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211003153428.369258-4-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Don't use `__sys_io_uring*` for liburing internal. These functions are now supposed for user backward compatibility. For now, we use `____sys_io_uring*` (4 underscores). These are `static inline` functions that wrap the `errno` variable in a kernel style return value (directly returns negative error code when errors). The main purpose of this change is to make it possible to remove the `errno` variable dependency from liburing C sources, so that later we will be able to build liburing without libc which doesn't use `errno` variable at all. Cc: Bedirhan KURT <windowz414@gnuweeb.org> Cc: Louvian Lyndal <louvianlyndal@gmail.com> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211003153428.369258-3-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
Make it possible to remove the dependency of `errno` variable (which comes from libc). Currently, we expose these functions to userland: 1) `__sys_io_uring_register` 2) `__sys_io_uring_setup` 3) `__sys_io_uring_enter2` 4) `__sys_io_uring_enter` The tests in `test/io_uring_{enter,register,setup}.c` are the examples of it. Since the userland needs to check the `errno` value to use them properly, this means those functions always depend on libc. So we cannot change their behavior. Don't touch them all, this ensures the changes only affect liburing internal and no visible functionality changes for the users. Then we introduce new functions with the same name (with extra underscore as prefix, 4 underscores): 1) `____sys_io_uring_register` 2) `____sys_io_uring_setup` 3) `____sys_io_uring_enter2` 4) `____sys_io_uring_enter` These functions do not use `errno` variable *on the caller*, they use the kernel style return value (return a negative value of error code when errors). These functions are defined as `static inline` in `src/syscall.h`. They are just a wrapper to make sure liburing internal sources do not touch `errno` variable from C files directly. We need to make C files not to touch the `errno` variable to support build without libc. Link: https://github.com/axboe/liburing/issues/443#issuecomment-927873932 Cc: Bedirhan KURT <windowz414@gnuweeb.org> Suggested-by:
Louvian Lyndal <louvianlyndal@gmail.com> Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211003153428.369258-2-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Pavel Begunkov authored
Happens pretty rarely, but there were cases when CQE waitinig in test_return_before_timeout() time outs before the SQPOLL thread kicks in and executes submitted requests, give SQPOLL a little bit more time. Signed-off-by:
Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/5faf8ade7e161931d76a47b809650e68a1b361ba.1633259449.git.asml.silence@gmail.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Pavel Begunkov authored
Make sure we don't fail links on ETIME when IORING_TIMEOUT_ETIME_SUCCESS is set. Signed-off-by:
Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d1a5b6bdbcfa1ec6b5ca014248e12b3b1edb4e5d.1633259449.git.asml.silence@gmail.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Ammar Faizi authored
`io_uring_free_probe()` should really be used to free the return value of `io_uring_get_probe_ring()`. As we may not always allocate it with `malloc()`. For example, to support no libc build [1]. Link: https://github.com/axboe/liburing/issues/443 [1] Signed-off-by:
Ammar Faizi <ammar.faizi@students.amikom.ac.id> Link: https://lore.kernel.org/r/20211003010608.58380-1-ammar.faizi@students.amikom.ac.id Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Sep 27, 2021
-
-
Ammar Faizi authored
When we call `bind()` or `connect()`, the `addr` and `port` should be in big endian value representation. Portability notes: - Do not hard code the address with integer like this `0x0100007fU`. Instead, use `inet_addr("127.0.0.1")` to ensure portability for the machine with different endianess. It's also cleaner and more readable to use `inet_addr()` from `#include <arpa/inet.h>`. - Use `htons(port_number)` to make sure the port_number is properly choosen instead directly assign it with integer (still about endianess problem). This commit fixes endianess issue in these files: test/232c93d07b74-test.c test/accept-link.c test/accept.c test/poll-link.c test/shutdown.c test/socket-rw-eagain.c test/socket-rw.c Fixes: 08bd8151 ("Un-DOSify test/232c93d07b74-test.c") Fixes: 4bce856d ("Improve reliability of poll/accept-link tests") Fixes: 76e3b792 ("Add nonblock empty socket read test") Fixes: 7de62535 ("test/accept: code reuse cleanup") Fixes: 8a3a8d74 ("Add IORING_OP_SHUTDOWN test case") Fixes: e3adbfc2 ("Moves function calls out of assert().") Suggested-by:
Louvian Lyndal <louvianlyndal@gmail.com> Signed-off-by:
Ammar Faizi <ammarfaizi2@gmail.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Sep 26, 2021
-
-
https://github.com/CarterLi/liburingJens Axboe authored
* 'master' of https://github.com/CarterLi/liburing: liburing.h: add io_uring_prep_close_direct
-
李通洲 authored
Signed-off-by:
李通洲 <carter.li@eoitek.com>
-
- Sep 24, 2021
-
-
Jens Axboe authored
Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-