Re: [PATCH bpf 03/11] bpf: Add write access to tcp_sock and sock fields

2017-12-19 Thread Alexei Starovoitov
On 12/18/17 10:21 PM, Lawrence Brakmo wrote: +#define SOCK_OPS_SET_FIELD(FIELD_NAME, OBJ) \ + do { \ + int reg = BPF_REG_9; \ +

Re: [PATCH bpf 03/11] bpf: Add write access to tcp_sock and sock fields

2017-12-19 Thread Daniel Borkmann
On 12/19/2017 07:21 AM, Lawrence Brakmo wrote: > This patch adds a macro, SOCK_OPS_SET_FIELD, for writing to > struct tcp_sock or struct sock fields. This required adding a new > field "temp" to struct bpf_sock_ops_kern for temporary storage that > is used by sock_ops_convert_ctx_access. It is

[PATCH bpf 03/11] bpf: Add write access to tcp_sock and sock fields

2017-12-18 Thread Lawrence Brakmo
This patch adds a macro, SOCK_OPS_SET_FIELD, for writing to struct tcp_sock or struct sock fields. This required adding a new field "temp" to struct bpf_sock_ops_kern for temporary storage that is used by sock_ops_convert_ctx_access. It is used to store and recover the contents of a register, so