public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates
@ 2023-12-19 11:54 Ammar Faizi
  2023-12-19 11:54 ` [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target Ammar Faizi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-12-19 11:54 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Ammar Faizi, Alviro Iskandar Setiawan, Michael William Jonathan,
	io-uring Mailing List, Linux Kernel Mailing List,
	GNU/Weeb Mailing List

Hi Jens,

There are two patches in this series:

1. Makefile: Remove the `partcheck` target.

Remove the `partcheck` target because it has remained unused for nearly
four years, and the associated TODO comment has not been actioned since
its introduction in commit:

  b57dbc2d308a849 ("configure/Makefile: introduce libdevdir defaults to $(libdir)")


2. t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`.

Address the limitations of valloc(). This function, which is primarily
used for allocating page-aligned memory, is not only absent in some
systems but is also marked as obsolete according to the `man 3 valloc`.

Replace valloc() with t_posix_memalign() to fix the following build
error:

  no-mmap-inval.c:28:56: warning: call to undeclared function 'valloc'; ISO C99 and \
  later do not support implicit function declarations [-Wimplicit-function-declaration]
          p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);
                                                                ^
  1 warning generated.

  ld.lld: error: undefined symbol: valloc
  >>> referenced by no-mmap-inval.c:28
  >>>               /tmp/no-mmap-inval-ea16a2.o:(main)
  >>> did you mean: calloc
  >>> defined in: /system/lib64/libc.so
  clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
  make[1]: *** [Makefile:239: no-mmap-inval.t] Error 1

Signed-off-by: Ammar Faizi <[email protected]>
---
Ammar Faizi (2):
  Makefile: Remove the `partcheck` target
  t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`

 Makefile             | 3 ---
 test/no-mmap-inval.c | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)


base-commit: bbd27495d302856b1f28d64b346d3ad80be3a86f
-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target
  2023-12-19 11:54 [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Ammar Faizi
@ 2023-12-19 11:54 ` Ammar Faizi
  2023-12-19 11:54 ` [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()` Ammar Faizi
  2023-12-19 15:22 ` [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-12-19 11:54 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Ammar Faizi, Alviro Iskandar Setiawan, Michael William Jonathan,
	io-uring Mailing List, Linux Kernel Mailing List,
	GNU/Weeb Mailing List, Stefan Metzmacher

Remove the `partcheck` target because it has remained unused for nearly
four years, and the associated TODO comment has not been actioned since
its introduction in commit:

  b57dbc2d308a849 ("configure/Makefile: introduce libdevdir defaults to $(libdir)")

Cc: Stefan Metzmacher <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Makefile b/Makefile
index 73d021c2e46255bf..7326e644e3a18bdb 100644
--- a/Makefile
+++ b/Makefile
@@ -14,9 +14,6 @@ all:
 .PHONY: all install default clean test
 .PHONY: FORCE cscope
 
-partcheck: all
-	@echo "make partcheck => TODO add tests with out kernel support"
-
 runtests: all
 	@$(MAKE) -C test runtests
 runtests-loop: all
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`
  2023-12-19 11:54 [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Ammar Faizi
  2023-12-19 11:54 ` [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target Ammar Faizi
@ 2023-12-19 11:54 ` Ammar Faizi
  2023-12-19 12:05   ` Alviro Iskandar Setiawan
  2023-12-19 15:22 ` [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Jens Axboe
  2 siblings, 1 reply; 5+ messages in thread
From: Ammar Faizi @ 2023-12-19 11:54 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Ammar Faizi, Alviro Iskandar Setiawan, Michael William Jonathan,
	io-uring Mailing List, Linux Kernel Mailing List,
	GNU/Weeb Mailing List

Address the limitations of valloc(). This function, which is primarily
used for allocating page-aligned memory, is not only absent in some
systems but is also marked as obsolete according to the `man 3 valloc`.

Replace valloc() with t_posix_memalign() to fix the following build
error:

  no-mmap-inval.c:28:56: warning: call to undeclared function 'valloc'; ISO C99 and \
  later do not support implicit function declarations [-Wimplicit-function-declaration]
          p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);
                                                                ^
  1 warning generated.

  ld.lld: error: undefined symbol: valloc
  >>> referenced by no-mmap-inval.c:28
  >>>               /tmp/no-mmap-inval-ea16a2.o:(main)
  >>> did you mean: calloc
  >>> defined in: /system/lib64/libc.so
  clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
  make[1]: *** [Makefile:239: no-mmap-inval.t] Error 1

Signed-off-by: Ammar Faizi <[email protected]>
---
 test/no-mmap-inval.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/no-mmap-inval.c b/test/no-mmap-inval.c
index 9571fee0035ac5ce..244d4eb645115a44 100644
--- a/test/no-mmap-inval.c
+++ b/test/no-mmap-inval.c
@@ -20,12 +20,14 @@ int main(int argc, char *argv[])
 		.flags		= IORING_SETUP_NO_MMAP,
 	};
 	struct io_uring ring;
+	void *addr;
 	int ret;
 
 	if (argc > 1)
 		return T_EXIT_SKIP;
 
-	p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);
+	t_posix_memalign(&addr, sysconf(_SC_PAGESIZE), 8192);
+	p.cq_off.user_addr = (unsigned long long) (uintptr_t) addr;
 
 	ret = io_uring_queue_init_params(2, &ring, &p);
 	if (ret == -EINVAL) {
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`
  2023-12-19 11:54 ` [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()` Ammar Faizi
@ 2023-12-19 12:05   ` Alviro Iskandar Setiawan
  0 siblings, 0 replies; 5+ messages in thread
From: Alviro Iskandar Setiawan @ 2023-12-19 12:05 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: Jens Axboe, Michael William Jonathan, io-uring Mailing List,
	Linux Kernel Mailing List, GNU/Weeb Mailing List

On Tue, Dec 19, 2023 at 6:54 PM Ammar Faizi wrote:
> Address the limitations of valloc(). This function, which is primarily
> used for allocating page-aligned memory, is not only absent in some
> systems but is also marked as obsolete according to the `man 3 valloc`.
>
> Replace valloc() with t_posix_memalign() to fix the following build
> error:
>
>   no-mmap-inval.c:28:56: warning: call to undeclared function 'valloc'; ISO C99 and \
>   later do not support implicit function declarations [-Wimplicit-function-declaration]
>           p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);
>                                                                 ^
>   1 warning generated.
>
>   ld.lld: error: undefined symbol: valloc
>   >>> referenced by no-mmap-inval.c:28
>   >>>               /tmp/no-mmap-inval-ea16a2.o:(main)
>   >>> did you mean: calloc
>   >>> defined in: /system/lib64/libc.so
>   clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
>   make[1]: *** [Makefile:239: no-mmap-inval.t] Error 1
>
> Signed-off-by: Ammar Faizi <[email protected]>

Reviewed-by: Alviro Iskandar Setiawan <[email protected]>

-- Viro

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates
  2023-12-19 11:54 [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Ammar Faizi
  2023-12-19 11:54 ` [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target Ammar Faizi
  2023-12-19 11:54 ` [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()` Ammar Faizi
@ 2023-12-19 15:22 ` Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2023-12-19 15:22 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: Alviro Iskandar Setiawan, Michael William Jonathan,
	io-uring Mailing List, Linux Kernel Mailing List,
	GNU/Weeb Mailing List


On Tue, 19 Dec 2023 18:54:21 +0700, Ammar Faizi wrote:
> There are two patches in this series:
> 
> 1. Makefile: Remove the `partcheck` target.
> 
> Remove the `partcheck` target because it has remained unused for nearly
> four years, and the associated TODO comment has not been actioned since
> its introduction in commit:
> 
> [...]

Applied, thanks!

[1/2] Makefile: Remove the `partcheck` target
      commit: 4ea77f3a1561bbd3140cc0de03698a67d08f4f27
[2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`
      commit: 7524a6adf4d6720a47bfa617b5cb2fd8d57f16d2

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-19 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 11:54 [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Ammar Faizi
2023-12-19 11:54 ` [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target Ammar Faizi
2023-12-19 11:54 ` [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()` Ammar Faizi
2023-12-19 12:05   ` Alviro Iskandar Setiawan
2023-12-19 15:22 ` [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox