From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org
Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org,
dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org,
chema-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org,
pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org,
hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
Date: Tue, 16 Sep 2014 16:54:52 -0400 (EDT) [thread overview]
Message-ID: <20140916.165452.1747695341192703967.davem@davemloft.net> (raw)
In-Reply-To: <CAMEtUuxp6709mdygiQyCqwjv-0kF-CbNOzCCZmKw_mUckF4NZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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.
next prev parent reply other threads:[~2014-09-16 20:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 19:18 [PATCH v12 net-next 00/11] eBPF syscall, verifier, testsuite Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 01/11] bpf: introduce BPF syscall and maps Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 02/11] bpf: enable bpf syscall on x64 and i386 Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps Alexei Starovoitov
2014-09-16 19:16 ` David Miller
[not found] ` <20140916.151606.448751391205382097.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-09-16 20:44 ` Alexei Starovoitov
[not found] ` <CAMEtUuxp6709mdygiQyCqwjv-0kF-CbNOzCCZmKw_mUckF4NZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-16 20:54 ` David Miller [this message]
[not found] ` <20140916.165452.1747695341192703967.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-09-16 21:23 ` Alexei Starovoitov
2014-09-16 21:49 ` David Miller
[not found] ` <20140916.174901.2174503796369572537.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-09-16 22:06 ` Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 04/11] bpf: expand BPF syscall with program load/unload Alexei Starovoitov
2014-09-16 19:17 ` David Miller
2014-09-15 19:18 ` [PATCH v12 net-next 05/11] bpf: handle pseudo BPF_CALL insn Alexei Starovoitov
[not found] ` <1410808721-27493-1-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-09-15 19:18 ` [PATCH v12 net-next 06/11] bpf: verifier (add docs) Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 07/11] bpf: verifier (add ability to receive verification log) Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 11/11] bpf: mini eBPF library, test stubs and verifier testsuite Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 08/11] bpf: handle pseudo BPF_LD_IMM64 insn Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 09/11] bpf: verifier (add branch/goto checks) Alexei Starovoitov
2014-09-15 19:18 ` [PATCH v12 net-next 10/11] bpf: verifier (add verifier core) Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140916.165452.1747695341192703967.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org \
--cc=chema-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).