[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f55f6af-c556-e8ab-9bd9-a6202049a53b@solarflare.com>
Date: Thu, 13 Dec 2018 16:40:06 +0000
From: Edward Cree <ecree@...arflare.com>
To: Jiong Wang <jiong.wang@...ronome.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>
CC: <alexei.starovoitov@...il.com>, <daniel@...earbox.net>,
<oss-drivers@...ronome.com>, <netdev@...r.kernel.org>
Subject: Re: [oss-drivers] Re: [PATCH bpf] bpf: verifier: make sure callees
don't prune with caller differences
On 13/12/18 10:52, Jiong Wang wrote:
> Because there is inter-procedure register allocation support in LLVM
> (-enable-ipra), which could effectively eliminate register save/restore for
> one caller-saved register across function call if the compiler can prove
> callee or any other childs on the callgraph doesn't use/clobber this
> particular caller-saved register. Then the later sequence in caller after
> the call site could just safely read the caller-saved without restoring it
> from stack etc. But we are marking all caller-saved as NOT_INIT, such read
> will be treated as reading from uninitialized value, so the program will be
> rejected.
I think "all r1-r5 are clobbered on call" is part of the eBPF ISA. In
principle, JITs might use them if they have some fixup they need to do
at CALL or RET time. And of course verifier can rewrite insn sequences
for various reasons in ways the compiler doesn't know about.
So I think you have to keep IPRA disabled, sorry.
-Ed
Powered by blists - more mailing lists