Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1960662rwe; Fri, 2 Sep 2022 06:38:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR62N73I/zNNrLRjsdGnW0KcT+2qW6/heUozq7UxpoGKhkihdFR3eI/xgr4eFpBLQ+0BlsNA X-Received: by 2002:a17:90b:4c52:b0:1f6:3a26:9f08 with SMTP id np18-20020a17090b4c5200b001f63a269f08mr5036334pjb.206.1662125896055; Fri, 02 Sep 2022 06:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662125896; cv=none; d=google.com; s=arc-20160816; b=tef9ub5g1h9BdSBEgoT1gO9huA9OiKertAsYAbJtdy5Un8kYS3+8/4uNCDtma03QMc UZTDdrcx6Tm6Xt5GzKOXsOJCgkWZseAg8sfabRAbg3tbyiL9oqps5ixLRDvhsHiOZj0B pwAFTeucGIBv5a2R+S43Stu1osO7FzUcRKfnEk0Kk6gOb0z73ea8pcVGG9z7YglBVw5v AUlSCRe2rPBKyInkkkfSAaf+FVmIJhWcq0xSND3Gj6hS8fCpgMWiOmsCLmy11uly7UkA sGGhLUJNspt0zZjh0U1Xb9HALf2fcEmyKjLqVB2v+xVKHIpSDENrd9YpEiI3htBjEjv0 sCeg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vTEsdDnKarism+kTmNVteTf55E7yCun/4DWrP+JassA=; b=DT021yP/mnWqYV/s4pNf4z8BuKfWpZy/0yR+8FHZrQpB/uuxIKTq7himN0uyOgihtg b5/UtVZCYPU5hMF9L2dRYl15L91EhjX5/ARgIA6V4+i5TQT9z0rhHvYanx8cEu52uusB ktSIN4o7UCauFspHHgXjgiJ2MFiXXPQkGE309HMEzR9B5bHMkjRFM/8ytHGH7Ag9g2XK AvUruQlcRaI7WT5Z3dcYf9WGx87xUp7snh3aVXM3mq+ydP9q30m6i8egnLdMUTAGbtu9 frROC8z5IRO4eHFvhGcBgK0kgWNA1Rz3T5ZfcIUtk1Yx4oJlT9PNPzO7qnZzgB8pUM9D Ez2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WXoJYHpu; 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 pj4-20020a17090b4f4400b001fe2e0ed1d6si2205622pjb.89.2022.09.02.06.37.59; Fri, 02 Sep 2022 06:38:16 -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=WXoJYHpu; 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 S236828AbiIBMe0 (ORCPT + 99 others); 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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[] = { */ {7, "R5_w=inv(id=0,smin_value=-9223372036854775806,smax_value=9223372036854775806,umin_value=2,umax_value=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"}, /* Checked s>=0 */ - {9, "R5=inv(id=0,umin_value=2,umax_value=9223372034707292158,var_off=(0x2; 0x7fffffff7ffffffc)"}, + {9, "R5=inv(id=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc))"}, /* packet pointer + nonnegative (4n+2) */ - {11, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372034707292158,var_off=(0x2; 0x7fffffff7ffffffc)"}, - {13, "R4_w=pkt(id=1,off=4,r=0,umin_value=2,umax_value=9223372034707292158,var_off=(0x2; 0x7fffffff7ffffffc)"}, + {11, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc))"}, + {13, "R4_w=pkt(id=1,off=4,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc))"}, /* NET_IP_ALIGN + (4n+2) == (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[] = { * So we did not get a 'range' on R6, and the access * attempt will fail. */ - {15, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372034707292158,var_off=(0x2; 0x7fffffff7ffffffc)"}, + {15, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc))"}, } }, { @@ -580,18 +580,18 @@ static struct bpf_align_test tests[] = { /* Adding 14 makes R6 be (4n+2) */ {11, "R6_w=inv(id=0,umin_value=14,umax_value=74,var_off=(0x2; 0x7c))"}, /* Subtracting from packet pointer overflows ubounds */ - {13, "R5_w=pkt(id=1,off=0,r=8,umin_value=18446744073709551542,umax_value=18446744073709551602,var_off=(0xffffffffffffff82; 0x7c)"}, + {13, "R5_w=pkt(id=1,off=0,r=8,umin_value=18446744073709551542,umax_value=18446744073709551602,var_off=(0xffffffffffffff82; 0x7c))"}, /* New unknown value in R7 is (4n), >= 76 */ {15, "R7_w=inv(id=0,umin_value=76,umax_value=1096,var_off=(0x0; 0x7fc))"}, /* Adding it to packet pointer gives nice bounds again */ - {16, "R5_w=pkt(id=2,off=0,r=0,umin_value=2,umax_value=1082,var_off=(0x2; 0xfffffffc)"}, + {16, "R5_w=pkt(id=2,off=0,r=0,umin_value=2,umax_value=1082,var_off=(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=pkt(id=2,off=0,r=4,umin_value=2,umax_value=1082,var_off=(0x2; 0xfffffffc)"}, + {20, "R5=pkt(id=2,off=0,r=4,umin_value=2,umax_value=1082,var_off=(0x2; 0x7fc))"}, }, }, };