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: <4a8783a2-3b93-448d-968f-861676299e51@kernel.dk>
Date: Fri, 31 May 2024 16:31:41 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Gabriel Krisman Bertazi <krisman@...e.de>
Cc: io-uring@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 5/5] io_uring: Introduce IORING_OP_LISTEN

On 5/31/24 3:12 PM, Gabriel Krisman Bertazi wrote:
> @@ -1761,6 +1766,31 @@ int io_bind(struct io_kiocb *req, unsigned int issue_flags)
>  	return 0;
>  }
>  
> +int io_listen_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
> +{
> +	struct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);
> +
> +	if (sqe->addr || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in || sqe->addr2)
> +		return -EINVAL;
> +
> +	listen->backlog = READ_ONCE(sqe->len);
> +
> +	return 0;
> +}

Extra empty line.

> +
> +int io_listen(struct io_kiocb *req, unsigned int issue_flags)
> +{
> +	struct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);
> +	int ret;
> +
> +	ret = __sys_listen_socket(sock_from_file(req->file), listen->backlog);
> +	if (ret < 0)
> +		req_set_fail(req);
> +	io_req_set_res(req, ret, 0);
> +
> +	return 0;
> +}

Extra empty line.

Outside of that, looks good!

-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ