Re: [PATCH v4 08/10] io_uring/cmd: Introduce SOCKET_URING_OP_GETSOCKOPT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Breno Leitao <leitao@xxxxxxxxxx> writes:

> Add support for getsockopt command (SOCKET_URING_OP_GETSOCKOPT), where
> level is SOL_SOCKET. This is leveraging the sockptr_t infrastructure,
> where a sockptr_t is either userspace or kernel space, and handled as
> such.
> Differently from the getsockopt(2), the optlen field is not a userspace
> pointers. In getsockopt(2), userspace provides optlen pointer, which is
> overwritten by the kernel.  In this implementation, userspace passes a
> u32, and the new value is returned in cqe->res. I.e., optlen is not a
> pointer.
> Important to say that userspace needs to keep the pointer alive until
> the CQE is completed.
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

IMO, this looks much cleaner with most of the bpf and socket logic under

Reviewed-by: Gabriel Krisman Bertazi <krisman@xxxxxxx>


Gabriel Krisman Bertazi

[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux