Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4983887rdb; Tue, 12 Dec 2023 15:38:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDbQy6SoQ+O11ppiwTUUGtfx3B9KaXPeDvQVLvHcnQpEXJIlHqqiS+HmIZO5salfZIHQWI X-Received: by 2002:a05:6870:420b:b0:1fa:dcee:9f46 with SMTP id u11-20020a056870420b00b001fadcee9f46mr8342994oac.40.1702424293521; Tue, 12 Dec 2023 15:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702424293; cv=none; d=google.com; s=arc-20160816; b=Jf3iy1B31OWi1V9VHCaBlXoeGyVAA9Ax/Q1R9CO/nwPfKmTPA417q0v/BadJrh4I3H SgEe4d4AjG4/dxEV2XTpyTA+0YwvYu1aO43llhxHrNxTGtkaRupYFRSjJC0nYJQ7VfmG QFptlrsZXsJqV5h/UjL3TOELKZm7k5Vc/r1Gqq4DrroZaDsBeuIKtlJXxwB7eqGDoyAq jKYqlfUAZnFv1hjSzDIG7iOx/rO7eNBeakRzxSZdnTGdUhctfygNW6ci1NOFW/HxOuyQ JHdsKflDrdSOj0EAf0WnKAHep7FNrJfNxU3j4i+MBf6dvdhWjZsw7nPLUr3a7+WOJyFc s9SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=JDRHHu41MUvYy9KEdDWgKfdTcRdh7spHhW6VGjs11Mo=; fh=0JeQhKyWHMSbsAVUtm4jhmzLTkmKL/a3ojFihpTNslc=; b=MHzkkEn3sJw16ukvEEyZ5rAm6BRvvh5vxvLA098HfOHxKFbjmvitUHvWooWNo0zYUG yHv1BLpj1BNnkCEgCGrWUuBoSJUWND5ygVaAVm1MJ9Z2Ct+4+oMDqo+UdYsSJPigYySx lmwg0HJIb1L3gSJtQi+dZPxnG9lAtQUcVFTfqMFaJosMc/TGgoVA9BJZOrOqcBMHiKZk Pf13wvbysTKK2+Jpb2At9q/VTnvJ60L7dpCynRUF+BxLGAuhk1QaEst2D2rpjlhcUpmq X5T+DE220rEnJ9/az2z3FFQrDiJv9Cd1R+IIRlm47tvfDArk32+VuTmKFjvlXU+yUcI2 pxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G8rsWgGH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c20-20020a631c54000000b005c677919049si8260301pgm.757.2023.12.12.15.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 15:38:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G8rsWgGH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id DF0BA807832A; Tue, 12 Dec 2023 15:38:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbjLLXhx (ORCPT + 99 others); Tue, 12 Dec 2023 18:37:53 -0500 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 S231786AbjLLXhw (ORCPT ); Tue, 12 Dec 2023 18:37:52 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E79A0; Tue, 12 Dec 2023 15:37:59 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40c41df5577so32019005e9.0; Tue, 12 Dec 2023 15:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702424277; x=1703029077; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=JDRHHu41MUvYy9KEdDWgKfdTcRdh7spHhW6VGjs11Mo=; b=G8rsWgGH71vbuO0EB9y7r7W3kg/XqvfPf6ffYgVpDfBOI/pOVOLE1WxhSEyuRRQFE/ gogcFHrevGF+Gu7FSHzLcqIp42tyq7kwV4+ZL+ew2OFgt3de6k7H1H3ANT3ogdb+laqg RYYvmY28TvXRSUHyTkQQG/lHDb7AjoGqKcC2OXzJ/cjWxHqHK5AB3KSg6eNWKKYnbWJT 6hvvf8r0uP9/m+7lXvGV7GoKWvWGGqLQwtWK320S6hSRRt16yvzSjOQZ26dUF2cRPmQj c2VQ9KnKne2QX4Y3lbdmNZ2BAsxoF2d9RDlJ3wmOlb67ahoKe3orFdRMaU8oTzLbXJZ7 ICkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702424277; x=1703029077; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JDRHHu41MUvYy9KEdDWgKfdTcRdh7spHhW6VGjs11Mo=; b=Z8hhhH+BbpAyUtZ0hb73Q62E7vgMKIEBWtTFawS8cgP+cNkHqQraG2vXJhhxtifEef jPdSpKkyr1vw2KK3F93vZeGUTybP3Cz3cDcp+oQ7zuqsAkff7GO8+aCZzcPhJ5Ma3PLe njjLeG1F5WKc4zITcswYWOG9wC+v8QH3wa2hc1EKg0U0Z1WZdYPMkuryfUFRU3gVcx76 ti0k3r2zAtcAkNvig9j6PexZVd3spGc35bIunfCZeCWMwa9Q81HW7llk2DCtKeQqsbxw 8SaMcxGJB+DgM84vW8s3ecp+/KoFEhltgPczPo7Gs/BPDZEMDaWSTeWuRk8KCVfOvdNJ phmw== X-Gm-Message-State: AOJu0YwdHdESMWz83XQkCK7fPdXWNVFxl2laKibNuKKBpOftzGGutOj3 WZN6ZNn1ONRpnUTH3zXT23k= X-Received: by 2002:a05:600c:54cf:b0:40c:32ee:3837 with SMTP id iw15-20020a05600c54cf00b0040c32ee3837mr1849173wmb.173.1702424277130; Tue, 12 Dec 2023 15:37:57 -0800 (PST) Received: from [192.168.1.95] (host-176-36-0-241.b024.la.net.ua. [176.36.0.241]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b0040c490db950sm7912788wmq.47.2023.12.12.15.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 15:37:56 -0800 (PST) Message-ID: <8a9d03eb74918123615cc3579cefc484566cad5d.camel@gmail.com> Subject: Re: [PATCH net-next v2 2/2] selftests/bpf: activate the OP_NE login in range_cond() From: Eduard Zingerman To: Menglong Dong , andrii@kernel.org, yonghong.song@linux.dev Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, martin.lau@linux.dev, song@kernel.org, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 13 Dec 2023 01:37:55 +0200 In-Reply-To: <20231212131031.3088661-3-menglong8.dong@gmail.com> References: <20231212131031.3088661-1-menglong8.dong@gmail.com> <20231212131031.3088661-3-menglong8.dong@gmail.com> Autocrypt: addr=eddyz87@gmail.com; prefer-encrypt=mutual; keydata=mQGNBGKNNQEBDACwcUNXZOGTzn4rr7Sd18SA5Wv0Wna/ONE0ZwZEx+sIjyGrPOIhR14/DsOr3ZJer9UJ/WAJwbxOBj6E5Y2iF7grehljNbLr/jMjzPJ+hJpfOEAb5xjCB8xIqDoric1WRcCaRB+tDSk7jcsIIiMish0diTK3qTdu4MB6i/sh4aeFs2nifkNi3LdBuk8Xnk+RJHRoKFJ+C+EoSmQPuDQIRaF9N2m4yO0eG36N8jLwvUXnZzGvHkphoQ9ztbRJp58oh6xT7uH62m98OHbsVgzYKvHyBu/IU2ku5kVG9pLrFp25xfD4YdlMMkJH6l+jk+cpY0cvMTS1b6/g+1fyPM+uzD8Wy+9LtZ4PHwLZX+t4ONb/48i5AKq/jSsb5HWdciLuKEwlMyFAihZamZpEj+9n91NLPX4n7XeThXHaEvaeVVl4hfW/1Qsao7l1YjU/NCHuLaDeH4U1P59bagjwo9d1n5/PESeuD4QJFNqW+zkmE4tmyTZ6bPV6T5xdDRHeiITGc00AEQEAAbQkRWR1YXJkIFppbmdlcm1hbiA8ZWRkeXo4N0BnbWFpbC5jb20+iQHUBBMBCgA+FiEEx+6LrjApQyqnXCYELgxleklgRAkFAmKNNQECGwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQLgxleklgRAlWZAv/cJ5v3zlEyP0/jMKQBqbVCCHTirPEw+nqxbkeSO6r2FUds0NnGA9a6NPOpBH+qW7a6+n6q3sIbvH7jlss4pzLI7LYlDC6z+egTv7KR5X1xFrY1uR5UGs1beAjnzYeV2hK4yqRUfygsT0Wk5e4FiNBv4+DUZ8r0cNDkO6swJxU55DO21mcteC147+4aDoHZ40R0tsAu+brDGSSoOPpb0RWVsEf9XOBJqWWA+T7mluw nYzhLWGcczc6J71q1Dje0l5vIPaSFOgwmWD4DA+WvuxM/shH4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cxfJ+pEZW18fRJ0XCl/fiV/ecAOfB3HsqgTzAn555h0rkFgay0hAvMU/mAW/CFNSIxV397zm749ZNLA0L2dMy1AKuOqH+/B+/ImBfJMDjmdyJQ8WU/OFRuGLdqOd2oZrA1iuPIa+yUYyZkaZfz/emQwpIL1+Q4p1R/OplA4yc301AqruXXUcVDbEB+joHW3hy5FwK5t5OwTKatrSJBkydSF9zdXy98fYzGniRyRA65P0Ix/8J3BYB4edY2/w0Ip/mdYsYQljBY0A== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 15:38:11 -0800 (PST) On Tue, 2023-12-12 at 21:10 +0800, Menglong Dong wrote: > The edge range checking for the registers is supported by the verifier > now, so we can activate the extended login in > tools/testing/selftests/bpf/prog_tests/reg_bounds.c/range_cond() to test > such logic. >=20 > Signed-off-by: Menglong Dong > --- > tools/testing/selftests/bpf/prog_tests/reg_bounds.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) >=20 > diff --git a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c b/tools/= testing/selftests/bpf/prog_tests/reg_bounds.c > index 0c9abd279e18..49d8d4bafe99 100644 > --- a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c > +++ b/tools/testing/selftests/bpf/prog_tests/reg_bounds.c > @@ -590,12 +590,7 @@ static void range_cond(enum num_t t, struct range x,= struct range y, > *newy =3D range(t, max_t(t, x.a, y.a), min_t(t, x.b, y.b)); > break; > case OP_NE: > - /* generic case, can't derive more information */ > - *newx =3D range(t, x.a, x.b); > - *newy =3D range(t, y.a, y.b); > - break; > - > - /* below extended logic is not supported by verifier just yet */ > + /* below logic is supported by the verifier now */ > if (x.a =3D=3D x.b && x.a =3D=3D y.a) { > /* X is a constant matching left side of Y */ > *newx =3D range(t, x.a, x.b); I think that some crafted tests have to be added. Note that reg_bounds only runs a subset of tests during CI (controlled by variable SLOW_TESTS). By default only randomized and crafted tests are run. It appears to me that probability of randomly generating specific ranges explored by this series is quite low.