lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5848ad2-94e6-4951-9266-b21f14b848e2@gmail.com>
Date: Wed, 13 Nov 2024 03:32:08 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: hexue <xue01.he@...sung.com>, axboe@...nel.dk
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH liburing] test: add test cases for hybrid iopoll

On 11/11/24 12:36, hexue wrote:
> Add a test file for hybrid iopoll to make sure it works safe.Testcass
> include basic read/write tests, and run in normal iopoll mode and
> passthrough mode respectively.
> 
> Signed-off-by: hexue <xue01.he@...sung.com>

If it's not covered already please add tests for failure cases.
E.g. when SETUP_HYBRID_IOPOLL is set without SETUP_IOPOLL

> +static int test_io_uring_passthrough(const char *file, int tc, int write, int sqthread,
> +		   int fixed, int nonvec)
> +{
> +	struct io_uring ring;
> +	int ret, ring_flags = 0;
> +
> +	ring_flags |= IORING_SETUP_SQE128;
> +	ring_flags |= IORING_SETUP_CQE32;
> +	ring_flags |= IORING_SETUP_HYBRID_IOPOLL;
> +
> +	if (sqthread)
> +		ring_flags |= IORING_SETUP_SQPOLL;

Doesn't it also need IORING_SETUP_IOPOLL?

> +
> +	ret = t_create_ring(64, &ring, ring_flags);
> +	if (ret == T_SETUP_SKIP)
> +		return 0;
> +	if (ret != T_SETUP_OK) {
> +		if (ret == -EINVAL) {
> +			no_pt = 1;
> +			return T_SETUP_SKIP;
> +		}
> +		fprintf(stderr, "ring create failed: %d\n", ret);
> +		return 1;
> +	}
> +
> +	ret = __test_io_uring_passthrough_io(file, &ring, tc, write, sqthread, fixed, nonvec);
> +	io_uring_queue_exit(&ring);
> +
> +	return ret;
> +}

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ