linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Paul Menzel <pmenzel@molgen.mpg.de>,
	"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
	Sandipan Das <sandipan@linux.ibm.com>
Cc: it+linux-bpf@molgen.mpg.de, netdev@vger.kernel.org,
	bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: sysctl: setting key "net.core.bpf_jit_enable": Invalid argument
Date: Sun, 11 Apr 2021 18:23:44 +0200	[thread overview]
Message-ID: <d880c38c-e410-0b69-0897-9cbf4b759045@csgroup.eu> (raw)
In-Reply-To: <412d88b2-fa9a-149e-6f6e-3cfbce9edef0@molgen.mpg.de>



Le 11/04/2021 à 13:09, Paul Menzel a écrit :
> Dear Linux folks,
> 
> 
> Related to * [CVE-2021-29154] Linux kernel incorrect computation of branch displacements in BPF JIT 
> compiler can be abused to execute arbitrary code in Kernel mode* [1], on the POWER8 system IBM 
> S822LC with self-built Linux 5.12.0-rc5+, I am unable to disable `bpf_jit_enable`.
> 
>     $ /sbin/sysctl net.core.bpf_jit_enable
>     net.core.bpf_jit_enable = 1
>     $ sudo /sbin/sysctl -w net.core.bpf_jit_enable=0
>     sysctl: setting key "net.core.bpf_jit_enable": Invalid argument
> 
> It works on an x86 with Debian sid/unstable and Linux 5.10.26-1.

Maybe you have selected CONFIG_BPF_JIT_ALWAYS_ON in your self-built kernel ?

config BPF_JIT_ALWAYS_ON
	bool "Permanently enable BPF JIT and remove BPF interpreter"
	depends on BPF_SYSCALL && HAVE_EBPF_JIT && BPF_JIT
	help
	  Enables BPF JIT and removes BPF interpreter to avoid
	  speculative execution of BPF instructions by the interpreter


Christophe

  reply	other threads:[~2021-04-11 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11 11:09 sysctl: setting key "net.core.bpf_jit_enable": Invalid argument Paul Menzel
2021-04-11 16:23 ` Christophe Leroy [this message]
2021-04-11 18:39   ` Paul Menzel

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=d880c38c-e410-0b69-0897-9cbf4b759045@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=bpf@vger.kernel.org \
    --cc=it+linux-bpf@molgen.mpg.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=sandipan@linux.ibm.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).