[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140424.160429.890390197318316554.davem@davemloft.net>
Date: Thu, 24 Apr 2014 16:04:29 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: ast@...mgrid.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 5/5] net: filter: optimize BPF migration
for ARG1/CTX handling
From: Daniel Borkmann <dborkman@...hat.com>
Date: Thu, 24 Apr 2014 08:45:27 +0200
> Currently, at initial setup in __sk_run_filter() we initialize the
> BPF stack's frame-pointer and CTX register. However, instead of the
> CTX register, we initialize context to ARG1, and during user filter
> migration we emit *always* an instruction that copies the content
> from ARG1 over to CTX. ARG1 is needed in BPF_CALL instructions to
> setup ctx; for user BPF filter ARG2 has A, and ARG3 X for call
> emission. However, we nevertheless copy CTX over to ARG1 in these
> cases for user migrated filters. We can spare us this extra interpreter
> instruction and assign it during initial setup time.
>
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
We're adjust code for facilities that aren't even used.
I want someone to explain to me exactly how calls in and out of
the EBPF context are expected to behave.
There are so many cpu calling conventions. Some use registers up
to a certain number for passing arguments, then any overflow args
go on the stack. Some pass all args on the stack.
How will all such schemes be accomodated by the BPF_CALL facilities?
Until I personally can even begin to understand this, I'm not applying
any more patches to these areas of the code, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists