Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3775281rwb; Tue, 16 Aug 2022 08:33:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6RTQIScZGq06Pr6RYrFX9shQNTCnmV0Rb03J1o2HEG1fgKEPtRGBNtvhTdwklk6SLyPEfB X-Received: by 2002:a17:906:8a73:b0:730:9af8:b335 with SMTP id hy19-20020a1709068a7300b007309af8b335mr14447578ejc.14.1660664015975; Tue, 16 Aug 2022 08:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660664015; cv=none; d=google.com; s=arc-20160816; b=a4pq6O+nh3+xTeNBS0c1FPSUCtz+MqYfQ3+OHf15oMjg8GGWIgzXNDHl7rgzG2M8NM UjF5l77aFvKj4RkqkAmdF6KTAm/Lf9ee5qVHZMGLmKtLU+PqtZuJtmLLAjwLchUyJ/Rv Mri+fDjMbke85fSC8ktFCfgZqpfsC2LkyNXfEXUMTMFlOAl6zGxsqJb2Kqplvq8Gwtk+ CGx6LbfBinYY4/dVPxxTFNxvakr1+ItfKZC5Zb3G7Q/46sbQklpLOAHwUNVhGR7ZiKAZ c1IjZQyq2EzCWlBa40AF6+wshZ4NnZ8PI96c4Y/oRJ3+n/0POzAZHiUl2o8HPfumcBkU dn1Q== 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=+IhunWuA6ewS2AlO2uM9pN5fO1zJRhIKo3kCmndoEDA=; b=wiX32tfN+3GkuUqW9aA4kD7Q6tRwHr2PliHQiywbXr9PFeo0p0Fcajzq+oGzhD7TB7 7vSqgpP3nEPsx5eb5xKU+RMVcPg0Yz6mFSEpYWARSF2rol0YavKCplFRfVwyMd//2OH2 yx2pqw1JGMt4LAXFZzRz9nsgzV2ab+fugVxndefbmEzp3x7ZeF/eetwhj0QRXurMqceO hPoLphL/FYIeJ2P3JvgSAwdCzN+Wb4462O9PaXkI4WQv3DtNfiuxVi6cDG9mKkezEsvT t8lBt76WXSVJQqy7nAgbcFnr4SboTLzbT7pp+0cbcWceAv38vyZggRlk6RJVAT1xT/CQ dJ6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b=mOfF0jeU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds10-20020a170907724a00b007235473b2fbsi10997756ejc.680.2022.08.16.08.33.09; Tue, 16 Aug 2022 08:33:35 -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=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b=mOfF0jeU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235602AbiHPPIo (ORCPT + 99 others); Tue, 16 Aug 2022 11:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235053AbiHPPIO (ORCPT ); Tue, 16 Aug 2022 11:08:14 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23B3FC33 for ; Tue, 16 Aug 2022 08:07:32 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id bx38so10794154ljb.10 for ; Tue, 16 Aug 2022 08:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=+IhunWuA6ewS2AlO2uM9pN5fO1zJRhIKo3kCmndoEDA=; b=mOfF0jeUhsGqSMyomQjQW1mqU3ytbYlX4ViYcnq0r0QL+tqakAYQ60qFCmbJnIvn4c cMp7c9Ub8wr7VBNteWRBMqHSYskdUgOIWnalNaj9dxQ53Fi8YXAEGoNTMiKC/hN9vd1Q g1exWdhkjM0sFh1KChyMbzej+3bJz6BkhiqfQi4XXAGymnrFzXP6kSm9na1DcaL5kLFN XpMx1rPWt28gYKOOPz3+THQH9pedtRUXYaiPLrzGhBP8Zd0X96JFIlz0uikNiG2DpNDY I9TlsftdVsMwyZqKs8vnZ8vNX4eYJhzZREu7mnNZiGSyDZqcAsF3GIiZ3f23BmH8833f 355A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=+IhunWuA6ewS2AlO2uM9pN5fO1zJRhIKo3kCmndoEDA=; b=ZxUgd0RuurIW2JF2trsp8v+Iad+tdhpr5hasOqbXTjKq4R1mOj3F107qB2crExjR/F U3BfohUAnZycejwkvfLB4eI2Kg+0UaLUgx4NqaFR8dTtmzxZHpV/KiJxpkAQ6tUOD/4f 08AmTtlzT/HxXfjwKoMCkAdBOdMOYk1GM8WJz6bKxX5+I+7j/IWGZ4DB3l6GuK7rhNML Hp94bfyO6nUHcuHHWN9i3sZpKtwSpwY6AatqoqlUW9FQ5MHzpZoUSwteiZtcmuHnr/Ky B3gcW7QrSxm6+PYZqPQAR3lRvzRcZ7a3xbaXYEjNKNDqZi/b7f8+Jh39F0qQR5C3HFWU OZPw== X-Gm-Message-State: ACgBeo3Ptr3zZls78mQ6Zmp6BEbdlzaEgi79BvUEVQg0HIacv5LNojSI MCII6KQcsaVdffeXfn/HQiv+ X-Received: by 2002:a2e:804e:0:b0:25e:7231:c304 with SMTP id p14-20020a2e804e000000b0025e7231c304mr6506566ljg.257.1660662450529; Tue, 16 Aug 2022 08:07:30 -0700 (PDT) Received: from Mem (2a01cb0890e296006905f2f810da8415.ipv6.abo.wanadoo.fr. [2a01:cb08:90e2:9600:6905:f2f8:10da:8415]) by smtp.gmail.com with ESMTPSA id m23-20020a2e8717000000b0025e5631194dsm1815999lji.21.2022.08.16.08.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 08:07:30 -0700 (PDT) Date: Tue, 16 Aug 2022 17:07:27 +0200 From: Paul Chaignon To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: 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: <20220816150727.GA88824@Mem> 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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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:47:30PM +0200, Greg Kroah-Hartman wrote: > 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? It should be okay to backport those additional 2 patches to 5.19.y. Thank you, -- Paul