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]
Date:   Sat, 26 Nov 2022 04:43:54 +0700
From:   Ammar Faizi <ammarfaizi2@...weeb.org>
To:     Facebook Kernel Team <kernel-team@...com>,
        Stefan Roesch <shr@...kernel.io>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Olivier Langlois <olivier@...llion01.com>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev Mailing List <netdev@...r.kernel.org>,
        io-uring Mailing List <io-uring@...r.kernel.org>
Subject: Re: [PATCH v5 2/3] io_uring: add api to set / get napi configuration.

On 11/22/22 2:14 AM, Stefan Roesch wrote:
> +static int io_unregister_napi(struct io_ring_ctx *ctx, void __user *arg)
> +{
> +#ifdef CONFIG_NET_RX_BUSY_POLL
> +	const struct io_uring_napi curr = {
> +		.busy_poll_to = ctx->napi_busy_poll_to,
> +	};
> +
> +	if (copy_to_user(arg, &curr, sizeof(curr)))
> +		return -EFAULT;
> +
> +	WRITE_ONCE(ctx->napi_busy_poll_to, 0);
> +	return 0;
> +#else
> +	return -EINVAL;
> +#endif
> +}
> +
I suggest allowing users to pass a NULL as the arg in case they
don't want to care about the old values.

Something like:

    io_uring_unregister_napi(ring, NULL);

What do you think?

-- 
Ammar Faizi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ