Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-09-08 Thread Al Viro
On Mon, Sep 09, 2019 at 12:09:57AM +0200, Mickaël Salaün wrote: > >>> +rcu_read_lock(); > >>> +ptr = htab_map_lookup_elem(map, ); > >>> +iput(inode); Wait a sec. You are doing _what_ under rcu_read_lock()? > >>> +if (IS_ERR(ptr)) { > >>> +ret = PTR_ERR(ptr); > >>> +

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-09-08 Thread Mickaël Salaün
On 31/07/2019 20:46, Mickaël Salaün wrote: > > On 27/07/2019 03:40, Alexei Starovoitov wrote: >> On Sun, Jul 21, 2019 at 11:31:12PM +0200, Mickaël Salaün wrote: >>> FIXME: 64-bits in the doc > > FYI, this FIXME was fixed, just not removed from this message. :) > >>> >>> This new map store

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-08-06 Thread Mickaël Salaün
On 01/08/2019 19:35, Alexei Starovoitov wrote: > On Wed, Jul 31, 2019 at 09:11:10PM +0200, Mickaël Salaün wrote: >> >> >> On 31/07/2019 20:58, Alexei Starovoitov wrote: >>> On Wed, Jul 31, 2019 at 11:46 AM Mickaël Salaün >>> wrote: >> +for (i = 0; i < htab->n_buckets; i++) { >> +

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-08-01 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 09:11:10PM +0200, Mickaël Salaün wrote: > > > On 31/07/2019 20:58, Alexei Starovoitov wrote: > > On Wed, Jul 31, 2019 at 11:46 AM Mickaël Salaün > > wrote: > +for (i = 0; i < htab->n_buckets; i++) { > +head = select_bucket(htab, i); > +

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-31 Thread Mickaël Salaün
On 31/07/2019 20:58, Alexei Starovoitov wrote: > On Wed, Jul 31, 2019 at 11:46 AM Mickaël Salaün > wrote: +for (i = 0; i < htab->n_buckets; i++) { +head = select_bucket(htab, i); +hlist_nulls_for_each_entry_safe(l, n, head, hash_node) { +

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-31 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 11:46 AM Mickaël Salaün wrote: > >> +for (i = 0; i < htab->n_buckets; i++) { > >> +head = select_bucket(htab, i); > >> +hlist_nulls_for_each_entry_safe(l, n, head, hash_node) { > >> +landlock_inode_remove_map(*((struct inode

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-31 Thread Mickaël Salaün
On 27/07/2019 03:40, Alexei Starovoitov wrote: > On Sun, Jul 21, 2019 at 11:31:12PM +0200, Mickaël Salaün wrote: >> FIXME: 64-bits in the doc FYI, this FIXME was fixed, just not removed from this message. :) >> >> This new map store arbitrary values referenced by inode keys. The map >> can be

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-26 Thread Alexei Starovoitov
On Sun, Jul 21, 2019 at 11:31:12PM +0200, Mickaël Salaün wrote: > FIXME: 64-bits in the doc > > This new map store arbitrary values referenced by inode keys. The map > can be updated from user space with file descriptor pointing to inodes > tied to a file system. From an eBPF (Landlock) program

[PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-21 Thread Mickaël Salaün
FIXME: 64-bits in the doc This new map store arbitrary values referenced by inode keys. The map can be updated from user space with file descriptor pointing to inodes tied to a file system. From an eBPF (Landlock) program point of view, such a map is read-only and can only be used to retrieved