Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1044020rwr; Wed, 3 May 2023 09:27:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7M6PmLlpyv6Kdl0x4eowZBSu/O88sUL5qrXyX2WZ93OcSewuE6rLhgVsCajI3WNM0LuTOd X-Received: by 2002:a05:6a20:3952:b0:f2:535d:9a4f with SMTP id r18-20020a056a20395200b000f2535d9a4fmr28231536pzg.33.1683131225006; Wed, 03 May 2023 09:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683131224; cv=none; d=google.com; s=arc-20160816; b=fC+vKcONgVdBM1WMG55yiSfFZ5tQiRwhMA06BgPYwFf9SxUzsOF35VkbmrtnV9in9F NiQ1kti1SouOVyyZPoQRPC1lfOVqGlYnx8qt3Oe+OPhavKtXm86yVHjE0Hear+xhUo6+ zRQbGon7Kzj+aAHGv2rPI9Ksz9G0aUu2aZGJz7hnWlTvjwBF6nyW4rU89LWEV3DQQmTW xmkVb/yWV3M0G8S4ZVtxN4N0TsN4h+mrI9JwTHkewSHr80+O9r6dlV919AMM3wRdq1f8 KZU8PnSw0MJK2z5nTLvaqbCwrzDwpXgO1uOdsK8Eg0sLx3WPo4xxpcoPSzC3aVTTK5l3 hpzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6oJaJ5PrPQ//M23xyU/2Ww+DvRXASYOAbGX+aLa2MYU=; b=tXfrpLLsFvt/9f+YcWPxkYXPkFwHo0zyBrueUUJzubLUNPIwHpchcEUkI77nBUJPpk opTWgb4o0CNn6vPcrLJa+Y/bxHY6ZB9XqpbGEHwpAGCjpG5fB74VRP2oREXUNKi88EFm 45zIjbBQKhWRUwkj158dDKrNyRJ7Wm6JZNT63D+qapdT94F548l+IlFQgi6nIULTAvRx ++ZhWKSwAspOm6To27NWovMP/Hmwryz28QDSxFz5/6kYTmb1LjyNDSCtVMgnNG4V4grl cqhI8HQTY8e60HcInJgrR/7tMASW+7U560wQgbrcsxwaft4FGv3DhC+G+p2jDDytQpaX clIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=bdOJPXjB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 140-20020a630092000000b0052c219ec8f6si7634034pga.839.2023.05.03.09.26.53; Wed, 03 May 2023 09:27:04 -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=@gmail.com header.s=20221208 header.b=bdOJPXjB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjECQUY (ORCPT + 99 others); Wed, 3 May 2023 12:20:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjECQUW (ORCPT ); Wed, 3 May 2023 12:20:22 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4F20F1; Wed, 3 May 2023 09:20:20 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2ac733b813fso11072891fa.1; Wed, 03 May 2023 09:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683130819; x=1685722819; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6oJaJ5PrPQ//M23xyU/2Ww+DvRXASYOAbGX+aLa2MYU=; b=bdOJPXjBlqb0/dMsX2NYbIAlgrxtqJu8zmOrfNCF1LdlCtEyW9RAD29prQ/tuboOwW lKD4sGtroNz8cEWGZwPiEA9J/gz0vPyApifltLMcuu1I77XI9PGnkwhd4JAzx0eOQXrq ysW2X0E8pjnrziM8T8o9NjKhQ8QFVgnwhzC4R1rjnirPTjnlJWoU2hf2Iodhi0hWZG8z wf7ImB4qOfNVc5lRggFlhs1iBWPmcYF8NhfTOIQK6M61G8Gj80pB/VlpkwiHQzC+N5Sf GR7DGoF8OnDotqOHFaxzm4UOl7TIi+abBSTuGL8uuIRVeP+J4b5p0h8uIAVYAC8YFqMI 821A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683130819; x=1685722819; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6oJaJ5PrPQ//M23xyU/2Ww+DvRXASYOAbGX+aLa2MYU=; b=NU+qyDEtxQD+roQncjeYxzEFE0rfw3i367+RuHqCmdYH2MWX1bhKkyLMhuDCxPn7g5 6KsXuGk9i8TqrhEQmJgCVezSnqcMMNyyoikm1eIZZ3zXzCJqFIYAQmzLg2uQ9aLYzfO5 qzt26A0Nt1nqUhxjq03JpQrnuNxYsrZkzKLaQWoGlPqr23/DfL4BeSM0/ap4SGiCdYju 66DVNNp4MtmrL03N0tEAHzNQ17HM/5fYeUXoTecNAgbbrJdxnKfY+uuC4lfYjdUDKIKf +RdTiKx0PN1vt+lxSZ7WCV6iZ5Akl0K8PAZJ5t5F8KB41Wh9Dn5oBgiBgLxiaAEy4rMH 17VQ== X-Gm-Message-State: AC+VfDxJNJOJMoqn+zrTpU4KxHFv4KCjYeoGXF/gNLNIJqHPNVAJatV/ Kzt+qE2lPfHDyyYgT/ZfVW7qU904qGCAreKEzhM= X-Received: by 2002:a2e:7d12:0:b0:2a7:768c:f5ac with SMTP id y18-20020a2e7d12000000b002a7768cf5acmr171925ljc.32.1683130818885; Wed, 03 May 2023 09:20:18 -0700 (PDT) MIME-Version: 1.0 References: <20230502005218.3627530-1-drosen@google.com> <20230502005218.3627530-2-drosen@google.com> In-Reply-To: <20230502005218.3627530-2-drosen@google.com> From: Alexei Starovoitov Date: Wed, 3 May 2023 09:20:07 -0700 Message-ID: Subject: Re: [PATCH v2 2/3] selftests/bpf: Test allowing NULL buffer in dynptr slice To: Daniel Rosenberg Cc: bpf , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jonathan Corbet , Joanne Koong , Mykola Lysenko , LKML , "open list:KERNEL SELFTEST FRAMEWORK" , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 Mon, May 1, 2023 at 5:52=E2=80=AFPM Daniel Rosenberg = wrote: > > bpf_dynptr_slice(_rw) no longer requires a buffer for verification. If th= e > buffer is needed, but not present, the function will return NULL. > > Signed-off-by: Daniel Rosenberg > --- > tools/testing/selftests/bpf/prog_tests/dynptr.c | 1 + > .../selftests/bpf/progs/dynptr_success.c | 17 +++++++++++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/tools/testing/selftests/bpf/prog_tests/dynptr.c b/tools/test= ing/selftests/bpf/prog_tests/dynptr.c > index d176c34a7d2e..ac1fcaddcddf 100644 > --- a/tools/testing/selftests/bpf/prog_tests/dynptr.c > +++ b/tools/testing/selftests/bpf/prog_tests/dynptr.c > @@ -20,6 +20,7 @@ static struct { > {"test_ringbuf", SETUP_SYSCALL_SLEEP}, > {"test_skb_readonly", SETUP_SKB_PROG}, > {"test_dynptr_skb_data", SETUP_SKB_PROG}, > + {"test_dynptr_skb_no_buff", SETUP_SKB_PROG}, > }; Please rebase and resubmit targeting bpf-next and with [PATCH bpf-next] sub= ject. It doesn't apply: Using index info to reconstruct a base tree... M tools/testing/selftests/bpf/prog_tests/dynptr.c M tools/testing/selftests/bpf/progs/dynptr_success.c Falling back to patching base and 3-way merge... Auto-merging tools/testing/selftests/bpf/progs/dynptr_success.c CONFLICT (content): Merge conflict in tools/testing/selftests/bpf/progs/dynptr_success.c Auto-merging tools/testing/selftests/bpf/prog_tests/dynptr.c CONFLICT (content): Merge conflict in tools/testing/selftests/bpf/prog_tests/dynptr.c error: Failed to merge in the changes. Patch failed at 0002 selftests/bpf: Test allowing NULL buffer in dynptr sli= ce