Netdev List
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"dave.hansen@intel.com" <dave.hansen@intel.com>,
	"kristen@linux.intel.com" <kristen@linux.intel.com>
Subject: Re: [RFC PATCH 0/4] Initial support for allocating BPF JITs in vmalloc for x86
Date: Wed, 6 Feb 2019 00:35:50 +0000	[thread overview]
Message-ID: <84060613-48b1-fa62-e784-104faa7fc665@fb.com> (raw)
In-Reply-To: <20190205225103.28296-1-rick.p.edgecombe@intel.com>

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.


  parent reply	other threads:[~2019-02-06  0:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 22:50 [RFC PATCH 0/4] Initial support for allocating BPF JITs in vmalloc for x86 Rick Edgecombe
2019-02-05 22:51 ` [RFC PATCH 1/4] bpf, x64: Implement BPF call retpoline Rick Edgecombe
2019-02-05 22:51 ` [RFC PATCH 2/4] bpf, x64: Increase distance for bpf calls Rick Edgecombe
2019-02-05 22:51 ` [RFC PATCH 3/4] bpf: Charge bpf jit limit in bpf_jit_alloc_exec Rick Edgecombe
2019-02-05 22:51 ` [RFC PATCH 4/4] bpf, x64: Enable unprivlidged jit in vmalloc Rick Edgecombe
2019-02-06  0:35 ` Alexei Starovoitov [this message]
2019-02-06  1:11   ` [RFC PATCH 0/4] Initial support for allocating BPF JITs in vmalloc for x86 Edgecombe, Rick P
2019-02-06  1:40     ` Alexei Starovoitov
2019-02-06 15:38       ` Daniel Borkmann

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=84060613-48b1-fa62-e784-104faa7fc665@fb.com \
    --to=ast@fb.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@intel.com \
    --cc=kristen@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=rick.p.edgecombe@intel.com \
    /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