Thread (19 messages) flat view 19 messages, 2 authors, 2014-09-16

Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps

From: David Miller <hidden>
Date: 2014-09-16 20:54:57
Also in: linux-api, lkml

From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
Date: Tue, 16 Sep 2014 13:44:12 -0700
the union indeed changes alignment from patch #1 to #3,
but, imo, it is not a problem, since kernel does:
It changes the alignment of the datastructures in userspace.
I haven't thought of 'aligned_u64' for this case.
For counters and masks it would be perfect, but here user is
passing real pointers to key and value, so they have to
be 'void __user *', otherwise user would need to type cast
them, which I want to avoid.
The cost of the compat layer must be considered and weighted
against this cast, which I think is really no big deal.
I think compat layer is a better option.
It's overhead you'll have to support forever, I think you should
reconsider.

All of the "ugly casting" will be hidden, or can be hidden, in the
syscall wrappers and/or interfaces in userspace.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help