Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1812155imn; Mon, 1 Aug 2022 00:31:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdZ22MQjwot1jl+lbZXtRQlWlBr8uKr7dAKqReqmXVE3I8eyGrmmZw1Vzzc7NUEM8Gkb7A X-Received: by 2002:a05:6402:34c8:b0:43b:e7b1:353c with SMTP id w8-20020a05640234c800b0043be7b1353cmr14688892edc.171.1659339088590; Mon, 01 Aug 2022 00:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659339088; cv=none; d=google.com; s=arc-20160816; b=HuoICKs9ako0HVxd81GlQgFnB/amCM1D6FIwZ6DMMMM6Ild/i1rpfnTcYS2JBa30fo igtwUuRXW0kYPA+4s473nBRbWY3nY2wCbGWGyuIfCONlV4tz5S77OHzPZGT0JJL0GSX3 ygPI/29ciY3MM+NGFdsfXfhVrE21sqQotIlEvc2l1wNIuyxmlXq7mZ/BzC17rFxf4nXR a3Q5PkXSDdY3HLj4VTcCDdwk9KdX9Ad0/Oxsw95yIkv3nhJK3fnEspoojKTbKk4SWnl4 PnajPlndw0whw4WKlRBgpX9N4Fvpu1A3TgmdZhQ1d1/+hDqdPipZG0h/wYUKWQl6FboR wVvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ApVAFBYFSezAYgnHA5G+30u0f00hz/Rxdxyk6KvuwbE=; b=gdRIAqWUvQUV+tPQmp0/mVq1MVsBwd1ebpM4knTyVHbRo9j0FttrYR3AiVf3/Xjrvc cLvPXmNNFjy7WVzO8uyjLDDN9mHbz/YlICZnyMIbzjXSQ/gy2H46Q3Ej2Wk6I0TlDwsk QdoA7JBiuvAOSpy/qazjdQM8KT4pcRbwRYeNiBz+OUGRxuVUZ1K1WkcceFZJkAVs0ECB yAR9AZjWCc7ljNtrDWUZfNCAzF4XbX0IawWGslVJJCj0ZBuWoRvHrkl0JWqsK+OSezKp 3wTXrdFKkHGdD1m4szeBeOAe2FiOeXE2HO4ehvk3Ae50bcZd72wjlzxIKWciJ1JOOSoZ mIwg== ARC-Authentication-Results: i=1; mx.google.com; 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=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz15-20020a0564021d4f00b0043aa8412572si11251822edb.257.2022.08.01.00.31.03; Mon, 01 Aug 2022 00:31:28 -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; 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiHAH3e (ORCPT + 99 others); Mon, 1 Aug 2022 03:29:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbiHAH3c (ORCPT ); Mon, 1 Aug 2022 03:29:32 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 992102F3B4; Mon, 1 Aug 2022 00:29:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=dtcccc@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VL2sB7a_1659338957; Received: from localhost.localdomain(mailfrom:dtcccc@linux.alibaba.com fp:SMTPD_---0VL2sB7a_1659338957) by smtp.aliyun-inc.com; Mon, 01 Aug 2022 15:29:26 +0800 From: Tianchen Ding To: Greg Kroah-Hartman , Sasha Levin Cc: Lorenz Bauer , Alexei Starovoitov , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 5.10 0/3] fix build error in bpf selftests Date: Mon, 1 Aug 2022 15:29:13 +0800 Message-Id: <20220801072916.29586-1-dtcccc@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=no 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 We found a compile error when building tools/testing/selftests/bpf/ on 5.10.y. tools/testing/selftests/bpf/prog_tests/sk_lookup.c:1092:15: error: 'struct bpf_sk_lookup' has no member named 'cookie' 1092 | if (CHECK(ctx.cookie == 0, "ctx.cookie", "no socket selected\n")) | ^ To fix this bug, this patchset backports three patches from upstream: https://lore.kernel.org/bpf/20210303101816.36774-1-lmb@cloudflare.com/ Patch 1 and 2 are necessary for bpf selftests build pass on 5.10.y. Patch 3 does not impact building stage, but can avoid a test case failure (by skipping it). Lorenz Bauer (3): bpf: Consolidate shared test timing code bpf: Add PROG_TEST_RUN support for sk_lookup programs selftests: bpf: Don't run sk_lookup in verifier tests include/linux/bpf.h | 10 + include/uapi/linux/bpf.h | 5 +- net/bpf/test_run.c | 243 +++++++++++++----- net/core/filter.c | 1 + tools/include/uapi/linux/bpf.h | 5 +- tools/testing/selftests/bpf/test_verifier.c | 4 +- .../selftests/bpf/verifier/ctx_sk_lookup.c | 1 + 7 files changed, 204 insertions(+), 65 deletions(-) -- 2.27.0