From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] ebpf: emit correct src_reg for conditional jumps Date: Fri, 11 Sep 2015 14:53:02 -0700 (PDT) Message-ID: <20150911.145302.294634270302062884.davem@davemloft.net> References: <1441931107-17673-1-git-send-email-tycho.andersen@canonical.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, netdev@vger.kernel.org, daniel@iogearbox.net To: tycho.andersen@canonical.com Return-path: Received: from shards.monkeyblade.net ([149.20.54.216]:50659 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753812AbbIKVxE (ORCPT ); Fri, 11 Sep 2015 17:53:04 -0400 In-Reply-To: <1441931107-17673-1-git-send-email-tycho.andersen@canonical.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Tycho Andersen Date: Thu, 10 Sep 2015 18:25:07 -0600 > Instead of always emitting BPF_REG_X, let's emit BPF_REG_X only when the > source actually is BPF_X. This causes programs generated by the classic > converter to not be importable via bpf(), as the eBPF verifier checks that > the src_reg is correct or 0. While not a problem yet, this will be a > problem when BPF_PROG_DUMP lands, and we can potentially dump and re-import > programs generated by the converter. > > Signed-off-by: Tycho Andersen Applied, thanks.