[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84060613-48b1-fa62-e784-104faa7fc665@fb.com>
Date: Wed, 6 Feb 2019 00:35:50 +0000
From: Alexei Starovoitov <ast@...com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>,
"daniel@...earbox.net" <daniel@...earbox.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"ard.biesheuvel@...aro.org" <ard.biesheuvel@...aro.org>,
"dave.hansen@...el.com" <dave.hansen@...el.com>,
"kristen@...ux.intel.com" <kristen@...ux.intel.com>
Subject: Re: [RFC PATCH 0/4] Initial support for allocating BPF JITs in
vmalloc for x86
On 2/5/19 2:50 PM, Rick Edgecombe wrote:
> This introduces a new capability for BPF program JIT's to be located in vmalloc
> space on x86_64. This can serve as a backup area for CONFIG_BPF_JIT_ALWAYS_ON in
> case an unprivileged app uses all of the module space allowed by bpf_jit_limit.
>
> In order to allow for calls from the increased distance of vmalloc from
> kernel/module space, relative calls are emitted as full indirect calls if the
> maximum relative call distance is exceeded. So the resulting performance of call
> BPF instructions in this case is similar to the BPF interpreter.
If I read this correctly the patches introduce retpoline overhead
to direct function call because JITed progs are more than 32-bit apart
and they're far away only because of dubious security concern ?
Nack.
Powered by blists - more mailing lists