Re: [PATCH net-next v2 1/5] bpf: Add file mode configuration into bpf maps

2017-10-09 Thread Chenbo Feng
On Mon, Oct 9, 2017 at 4:07 PM, Alexei Starovoitov wrote: > On Mon, Oct 09, 2017 at 03:20:24PM -0700, Chenbo Feng wrote: >> From: Chenbo Feng >> >> Introduce the map read/write flags to the eBPF syscalls that returns the >> map fd. The flags is used to set up the file mode when construct a new >>

Re: [PATCH net-next v2 1/5] bpf: Add file mode configuration into bpf maps

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 03:20:24PM -0700, Chenbo Feng wrote: > From: Chenbo Feng > > Introduce the map read/write flags to the eBPF syscalls that returns the > map fd. The flags is used to set up the file mode when construct a new > file descriptor for bpf maps. To not break the backward capabili

[PATCH net-next v2 1/5] bpf: Add file mode configuration into bpf maps

2017-10-09 Thread Chenbo Feng
From: Chenbo Feng Introduce the map read/write flags to the eBPF syscalls that returns the map fd. The flags is used to set up the file mode when construct a new file descriptor for bpf maps. To not break the backward capability, the f_flags is set to O_RDWR if the flag passed by syscall is 0. Ot