Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E37E4C25B0E for ; Tue, 16 Aug 2022 14:47:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbiHPOri (ORCPT ); Tue, 16 Aug 2022 10:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbiHPOrh (ORCPT ); Tue, 16 Aug 2022 10:47:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7225B659D1; Tue, 16 Aug 2022 07:47:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1F227B8164C; Tue, 16 Aug 2022 14:47:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31CABC433D6; Tue, 16 Aug 2022 14:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660661253; bh=ZVa8gCDk1BH2nIq9ZqAesRRRF4G1PspK7ZnMFfuGswg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iQQLDJv2GSL86ubns3Tt3+c69qvbJntma3tkirDITFwA6QKaGd7hMJ/RyoyuTa3yI R0TEVEAaHJ4hf7Xgd/N4GmAdqI2bHSBHZZFhHsG+DVTBuUT/2M0Kvi5MdoZLuVB5x+ zJ7T+ngFxRbjtyZhL79DHPPPUDmpNuNbaWn66Ai0= Date: Tue, 16 Aug 2022 16:47:30 +0200 From: Greg Kroah-Hartman To: Paul Chaignon Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Daniel Borkmann , Nikolay Aleksandrov , Martin KaFai Lau , Sasha Levin Subject: Re: [PATCH 5.19 0537/1157] bpf: Set flow flag to allow any source IP in bpf_tunnel_key Message-ID: References: <20220815180439.416659447@linuxfoundation.org> <20220815180501.149595269@linuxfoundation.org> <20220816143554.GA67569@Mem> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220816143554.GA67569@Mem> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Aug 16, 2022 at 04:35:54PM +0200, Paul Chaignon wrote: > On Mon, Aug 15, 2022 at 07:58:13PM +0200, Greg Kroah-Hartman wrote: > > From: Paul Chaignon > > > > [ Upstream commit b8fff748521c7178b9a7d32b5a34a81cec8396f3 ] > > > > Commit 26101f5ab6bd ("bpf: Add source ip in "struct bpf_tunnel_key"") > > added support for getting and setting the outer source IP of encapsulated > > packets via the bpf_skb_{get,set}_tunnel_key BPF helper. This change > > allows BPF programs to set any IP address as the source, including for > > example the IP address of a container running on the same host. > > > > In that last case, however, the encapsulated packets are dropped when > > looking up the route because the source IP address isn't assigned to any > > interface on the host. To avoid this, we need to set the > > FLOWI_FLAG_ANYSRC flag. > > This fix will also require upstream commits 861396ac0b47 ("geneve: Use > ip_tunnel_key flow flags in route lookups") and 7e2fb8bc7ef6 ("vxlan: > Use ip_tunnel_key flow flags in route lookups") to have the intended > effect. In short, these two commits "consume" the new field introduced > in 451ef36bd229 ("ip_tunnels: Add new flow flags field to > ip_tunnel_key") and populated in the present commit. Ick. Is it better to just drop this commit instead? Or is it ok to also backport those 2 patches to 5.19.y? thanks, greg k-h