linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: nicolas.dichtel@6wind.com, Luke Nelson <luke.r.nels@gmail.com>,
	Xi Wang <xi.wang@gmail.com>, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	kernel-team@cloudflare.com, Netdev <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] bpf: define bpf_jit_alloc_exec_limit for riscv JIT
Date: Mon, 18 Oct 2021 08:14:59 +0200	[thread overview]
Message-ID: <CAJ+HfNjwYtg+8ZWBNaL08afQJpOQ6m0tUiTjhTtLBBoLDdxAmg@mail.gmail.com> (raw)
In-Reply-To: <20211014142554.53120-2-lmb@cloudflare.com>

On Thu, 14 Oct 2021 at 16:26, Lorenz Bauer <lmb@cloudflare.com> wrote:
>
> Expose the maximum amount of useable memory from the riscv JIT.
>
> Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
> Acked-by: Luke Nelson <luke.r.nels@gmail.com>

Acked-by: Björn Töpel <bjorn@kernel.org>

> ---
>  arch/riscv/net/bpf_jit_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/riscv/net/bpf_jit_core.c b/arch/riscv/net/bpf_jit_core.c
> index fed86f42dfbe..0fee2cbaaf53 100644
> --- a/arch/riscv/net/bpf_jit_core.c
> +++ b/arch/riscv/net/bpf_jit_core.c
> @@ -166,6 +166,11 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
>         return prog;
>  }
>
> +u64 bpf_jit_alloc_exec_limit(void)
> +{
> +       return BPF_JIT_REGION_SIZE;
> +}
> +
>  void *bpf_jit_alloc_exec(unsigned long size)
>  {
>         return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START,
> --
> 2.30.2
>

  reply	other threads:[~2021-10-18  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211014142554.53120-1-lmb@cloudflare.com>
2021-10-14 14:25 ` [PATCH v3 1/3] bpf: define bpf_jit_alloc_exec_limit for riscv JIT Lorenz Bauer
2021-10-18  6:14   ` Björn Töpel [this message]
2021-10-14 14:25 ` [PATCH v3 2/3] bpf: define bpf_jit_alloc_exec_limit for arm64 JIT Lorenz Bauer
2021-10-14 14:25 ` [PATCH v3 3/3] bpf: prevent increasing bpf_jit_limit above max Lorenz Bauer

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=CAJ+HfNjwYtg+8ZWBNaL08afQJpOQ6m0tUiTjhTtLBBoLDdxAmg@mail.gmail.com \
    --to=bjorn.topel@gmail.com \
    --cc=andrii@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lmb@cloudflare.com \
    --cc=luke.r.nels@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=xi.wang@gmail.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;
as well as URLs for NNTP newsgroup(s).