Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3733914rwb; Tue, 16 Aug 2022 08:00:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR68hpj862X8CRTbTQT5ejr2DE6+l1KTJ3JMdBdFGso+Z/VYGF5UurOuhy1VTZvzVt86TLY5 X-Received: by 2002:a17:907:9483:b0:731:2be4:f73c with SMTP id dm3-20020a170907948300b007312be4f73cmr14373153ejc.380.1660662029733; Tue, 16 Aug 2022 08:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660662029; cv=none; d=google.com; s=arc-20160816; b=O3OMLyDaJ3v+Sy3OZwdn5Ky2x9aoBPuz/IWzYEDdm/Hq3nVjcRvAEnztpQugjetYI5 GlSB94qlIPc5ObHjSP5G/CCv2anJARAC92/AHSrFZa8NU30t1K8SXci4JGIUz7zV8qn/ JdvhAL6y/IL+laRVOzuy5XxhgxzwtXiUa0ELL9nm3gEYP7HNSk7jVvDfIG6JxTX45daU KUluxycXMVOoxyQp+UsgO1YlHnbnHqoZY6MEjNyZDSKzEGNm7TaC1dz9Elg+tr7HKLAC r+2r9dL7mJot2jrAEDWSHywqmNN7HXbOoGrOz9IzCblu7wTeupF02k4wPEXBj/CG4Ozi t3uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GNfgjiCHgIeVWJsWZcU+YZ4O5S+8N8wRiwpU2DaWxAM=; b=PDwBpB/ElaTL4kUPfYuwGqvN9V46DMKoSuSg0PaWybOVdb9js6/Iays30/wWue09W0 yGPT2DQ8BskXYb17bGy2HhdFIVR+8XIII7YuQPkL686Yxmi4rL1RhXF/Pu09fSOam2ze Sg1XFV/M+ZyujByh7bL/zqEgZTqASFFI/Mvkztejg1QAy21HuTzhAAAqnzyUhuQwquPx C0MRXeM9C7OAMGy1eFmQH/a/BKj0ihva9kUDf3qZuaICySHFmjV0UnN50Cjk3oELx3gn wfW4TKNXB1rFmeohKsZQZc/bq7YunRKbg2gJJmsshmtClK0zXPifI8dNebOKZJHp0Sy+ iMaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iQQLDJv2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne28-20020a1709077b9c00b0072b8009c081si11229350ejc.245.2022.08.16.08.00.02; Tue, 16 Aug 2022 08:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iQQLDJv2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235931AbiHPOri (ORCPT + 99 others); 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> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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