From nobody Sun Sep 7 12:27:33 2025 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 A65F0ECAAD5 for ; Fri, 2 Sep 2022 12:34:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236839AbiIBMe0 (ORCPT ); Fri, 2 Sep 2022 08:34:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236585AbiIBMdM (ORCPT ); Fri, 2 Sep 2022 08:33:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03587DEA58; Fri, 2 Sep 2022 05:27:43 -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 7B04BB82AB3; Fri, 2 Sep 2022 12:27:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C443DC433D6; Fri, 2 Sep 2022 12:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662121662; bh=clthHZEoZSss9EqN16KFL/fAvVHFjGWtR6Z/Pce8wIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WXoJYHpusRdt5/0wp2MQnqv3/swldNZ49jF4jCkqsAwOGh+tat0m6ZlXbyAVLtocg v0yU0oQSM/4dD+uJ4zPX7DnxgKWwUsRYSK0oQPFkT3vfRk6u11I3xatMWBuBySNtlI Q4YUVhdZFrYRx+vSeD6sKvnTJiz0V1jPo+E5WZH4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Jean-Philippe Brucker Subject: [PATCH 5.4 06/77] Revert "selftests/bpf: Fix test_align verifier log patterns" Date: Fri, 2 Sep 2022 14:18:15 +0200 Message-Id: <20220902121403.832779905@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121403.569927325@linuxfoundation.org> References: <20220902121403.569927325@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Jean-Philippe Brucker This partially reverts commit 6a9b3f0f3bad4ca6421f8c20e1dde9839699db0f. The upstream commit addresses multiple verifier changes, only one of which was backported to v5.4. Therefore only keep the relevant changes and revert the others. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/bpf/test_align.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/tools/testing/selftests/bpf/test_align.c +++ b/tools/testing/selftests/bpf/test_align.c @@ -475,10 +475,10 @@ static struct bpf_align_test tests[] =3D { */ {7, "R5_w=3Dinv(id=3D0,smin_value=3D-9223372036854775806,smax_value=3D9= 223372036854775806,umin_value=3D2,umax_value=3D18446744073709551614,var_off= =3D(0x2; 0xfffffffffffffffc)"}, /* Checked s>=3D0 */ - {9, "R5=3Dinv(id=3D0,umin_value=3D2,umax_value=3D9223372034707292158,va= r_off=3D(0x2; 0x7fffffff7ffffffc)"}, + {9, "R5=3Dinv(id=3D0,umin_value=3D2,umax_value=3D9223372036854775806,va= r_off=3D(0x2; 0x7ffffffffffffffc))"}, /* packet pointer + nonnegative (4n+2) */ - {11, "R6_w=3Dpkt(id=3D1,off=3D0,r=3D0,umin_value=3D2,umax_value=3D92233= 72034707292158,var_off=3D(0x2; 0x7fffffff7ffffffc)"}, - {13, "R4_w=3Dpkt(id=3D1,off=3D4,r=3D0,umin_value=3D2,umax_value=3D92233= 72034707292158,var_off=3D(0x2; 0x7fffffff7ffffffc)"}, + {11, "R6_w=3Dpkt(id=3D1,off=3D0,r=3D0,umin_value=3D2,umax_value=3D92233= 72036854775806,var_off=3D(0x2; 0x7ffffffffffffffc))"}, + {13, "R4_w=3Dpkt(id=3D1,off=3D4,r=3D0,umin_value=3D2,umax_value=3D92233= 72036854775806,var_off=3D(0x2; 0x7ffffffffffffffc))"}, /* NET_IP_ALIGN + (4n+2) =3D=3D (4n), alignment is fine. * We checked the bounds, but it might have been able * to overflow if the packet pointer started in the @@ -486,7 +486,7 @@ static struct bpf_align_test tests[] =3D { * So we did not get a 'range' on R6, and the access * attempt will fail. */ - {15, "R6_w=3Dpkt(id=3D1,off=3D0,r=3D0,umin_value=3D2,umax_value=3D92233= 72034707292158,var_off=3D(0x2; 0x7fffffff7ffffffc)"}, + {15, "R6_w=3Dpkt(id=3D1,off=3D0,r=3D0,umin_value=3D2,umax_value=3D92233= 72036854775806,var_off=3D(0x2; 0x7ffffffffffffffc))"}, } }, { @@ -580,18 +580,18 @@ static struct bpf_align_test tests[] =3D { /* Adding 14 makes R6 be (4n+2) */ {11, "R6_w=3Dinv(id=3D0,umin_value=3D14,umax_value=3D74,var_off=3D(0x2;= 0x7c))"}, /* Subtracting from packet pointer overflows ubounds */ - {13, "R5_w=3Dpkt(id=3D1,off=3D0,r=3D8,umin_value=3D18446744073709551542= ,umax_value=3D18446744073709551602,var_off=3D(0xffffffffffffff82; 0x7c)"}, + {13, "R5_w=3Dpkt(id=3D1,off=3D0,r=3D8,umin_value=3D18446744073709551542= ,umax_value=3D18446744073709551602,var_off=3D(0xffffffffffffff82; 0x7c))"}, /* New unknown value in R7 is (4n), >=3D 76 */ {15, "R7_w=3Dinv(id=3D0,umin_value=3D76,umax_value=3D1096,var_off=3D(0x= 0; 0x7fc))"}, /* Adding it to packet pointer gives nice bounds again */ - {16, "R5_w=3Dpkt(id=3D2,off=3D0,r=3D0,umin_value=3D2,umax_value=3D1082,= var_off=3D(0x2; 0xfffffffc)"}, + {16, "R5_w=3Dpkt(id=3D2,off=3D0,r=3D0,umin_value=3D2,umax_value=3D1082,= var_off=3D(0x2; 0x7fc))"}, /* At the time the word size load is performed from R5, * its total fixed offset is NET_IP_ALIGN + reg->off (0) * which is 2. Then the variable offset is (4n+2), so * the total offset is 4-byte aligned and meets the * load's requirements. */ - {20, "R5=3Dpkt(id=3D2,off=3D0,r=3D4,umin_value=3D2,umax_value=3D1082,va= r_off=3D(0x2; 0xfffffffc)"}, + {20, "R5=3Dpkt(id=3D2,off=3D0,r=3D4,umin_value=3D2,umax_value=3D1082,va= r_off=3D(0x2; 0x7fc))"}, }, }, };