From: David Miller Subject: Re: [PATCH bpf 3/9] bpf: enable access to ax register also from verifier rewrite Date: Tue, 01 Jan 2019 13:17:06 -0800 (PST) Message-ID: <20190101.131706.299694977369170122.davem@davemloft.net> References: <20190101204925.4584-1-daniel@iogearbox.net> <20190101204925.4584-4-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, jannh@google.com, netdev@vger.kernel.org To: daniel@iogearbox.net Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:59938 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfAAVRK (ORCPT ); Tue, 1 Jan 2019 16:17:10 -0500 In-Reply-To: <20190101204925.4584-4-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: From: Daniel Borkmann Date: Tue, 1 Jan 2019 21:49:19 +0100 > diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c > index a34312a..4e6f29a 100644 > --- a/kernel/bpf/core.c > +++ b/kernel/bpf/core.c > @@ -858,6 +858,26 @@ static int bpf_jit_blind_insn(const struct bpf_insn *from, > BUILD_BUG_ON(BPF_REG_AX + 1 != MAX_BPF_JIT_REG); > BUILD_BUG_ON(MAX_BPF_REG + 1 != MAX_BPF_JIT_REG); > > + /* Constraints on AX register: > + * > + * AX register is inaccessible from user space. It is mapped in > + * all JITs, and used here for constant blinding rewrites. It is > + * typically "stateless" meaning its contents are only valid within > + * the executed instruction, but not across several instructions. > + * There are a few exceptions however which are further detailled ^^^^^^^^^ Typo, should be "detailed".