linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: "Bird, Tim" <Tim.Bird@sony.com>
Cc: "Jesper Dangaard Brouer" <brouer@redhat.com>,
	shuah <shuah@kernel.org>, "Daniel Díaz" <daniel.diaz@linaro.org>,
	"Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
	"Andrii Nakryiko" <andriin@fb.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	BPF-dev-list <bpf@vger.kernel.org>,
	"Daniel Borkmann" <borkmann@iogearbox.net>,
	"David Miller" <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Anders Roxell" <anders.roxell@linaro.org>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>
Subject: Re: Kernel 5.5.4 build fail for BPF-selftests with latest LLVM
Date: Thu, 20 Feb 2020 11:18:46 -0800	[thread overview]
Message-ID: <20200220191845.u62nhohgzngbrpib@ast-mbp> (raw)
In-Reply-To: <MWHPR13MB0895B185BC36759121D6F26AFD130@MWHPR13MB0895.namprd13.prod.outlook.com>

On Thu, Feb 20, 2020 at 05:41:51PM +0000, Bird, Tim wrote:
> 
> So - do the BPF developers add new instructions to the virtual machine, that then
> have to be added to both the compiler and the executor (VM implementation)?

Right. New instructions are added to the kernel and llvm at the same time. The
kernel and llvm release cadence and process are different which complicates it
for us.

> It sounds like the compiler support and executor support is done in concert, and
> that patches are at least accepted upstream (but possibly are not yet available in
> a compiler release) for the compiler side.  What about the Linux kernel side?  Is the
> support for a new instruction only in non-released kernels (say, in the BPF development
> tree), or could it potentially be included in a released kernel, before the compiler
> with matching support is released?  What would happen if a bug was found, and
> compiler support for the instruction was delayed?  

As with all chicken-and-egg problems the feature has to land in one of the
repos first. That was one of the reasons llvm community switched to mono repo
to avoid clang vs llvm conflicts. The kernel and llvm are not going to be in a
single repo, so we have to orchestrate the landing. Most of the time it's easy,
because we maintain both kernel and llvm components. But in some cases it's
very difficult. For example we've delayed landing kernel and libbpf patches by
about six month, since we couldn't get an agreement on how the feature has to
be implemented in clang.

> I suppose that this would only
> mean that the executor supported an instruction that never appeared in a compiled
> BPF program? Is that right?

The answer is yes. It is the case that the kernel supports certain bpf
instructions, but llvm doesn't know how to emit them. But it has nothing to do
with landing of features and release cadence.

      reply	other threads:[~2020-02-20 19:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200219133012.7cb6ac9e@carbon>
     [not found] ` <CAADnVQKQRKtDz0Boy=-cudc4eKGXB-yParGZv6qvYcQR4uMUQQ@mail.gmail.com>
     [not found]   ` <20200219180348.40393e28@carbon>
     [not found]     ` <CAEf4Bza9imKymHfv_LpSFE=kNB5=ZapTS3SCdeZsDdtrUrUGcg@mail.gmail.com>
     [not found]       ` <20200219192854.6b05b807@carbon>
     [not found]         ` <CAEf4BzaRAK6-7aCCVOA6hjTevKuxgvZZnHeVgdj_ZWNn8wibYQ@mail.gmail.com>
     [not found]           ` <20200219210609.20a097fb@carbon>
     [not found]             ` <CAEUSe79Vn8wr=BOh0RzccYij_snZDY=2XGmHmR494wsQBBoo5Q@mail.gmail.com>
     [not found]               ` <20200220002748.kpwvlz5xfmjm5fd5@ast-mbp>
2020-02-20  0:47                 ` Kernel 5.5.4 build fail for BPF-selftests with latest LLVM shuah
2020-02-20 16:37                   ` Jesper Dangaard Brouer
2020-02-20 17:02                     ` Bird, Tim
2020-02-20 17:26                       ` Alexei Starovoitov
2020-02-20 17:41                         ` Bird, Tim
2020-02-20 19:18                           ` Alexei Starovoitov [this message]

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=20200220191845.u62nhohgzngbrpib@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=Tim.Bird@sony.com \
    --cc=anders.roxell@linaro.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel.diaz@linaro.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=toke@redhat.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).