Thread (28 messages) 28 messages, 4 authors, 2021-05-21

Re: [PATCH bpf-next 03/11] bpfilter: Add IO functions

From: Song Liu <song@kernel.org>
Date: 2021-05-19 18:47:46
Also in: bpf

On Tue, May 18, 2021 at 11:06 PM Dmitrii Banshchikov [off-list ref] wrote:
Introduce IO functions for:
1) reading and writing data from a descriptor: read_exact(), write_exact(),
2) reading and writing memory of other processes: pvm_read(), pvm_write().

read_exact() and write_exact() are wrappers over read(2)/write(2) with
correct handling of partial read/write. These functions are intended to
be used for communication over pipe with the kernel part of bpfilter.

pvm_read() and pvm_write() are wrappers over
process_vm_readv(2)/process_vm_writev(2) with an interface that uses a
single buffer instead of vectored form. These functions are intended to
be used for readining/writing memory buffers supplied to iptables ABI
setsockopt(2) from other processes.

Signed-off-by: Dmitrii Banshchikov <redacted>
The code looks correct, so

Acked-by: Song Liu <redacted>

However, I am not sure whether we really want these wrapper functions.

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help