Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3080879pxb; Tue, 12 Jan 2021 06:02:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0i2QDgas967lmVom0vr+1mkRmpn89WRK9kQqF3QLLuHIP3UA2wKMbFmjUwa0Ji+CJWai8 X-Received: by 2002:a17:907:d8e:: with SMTP id go14mr3413497ejc.472.1610460136403; Tue, 12 Jan 2021 06:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460136; cv=none; d=google.com; s=arc-20160816; b=Ux0Juawj6ESH5Kky2Yr05VuvJ6py8Ai9hgFIdHlct+N4ar76Mf2XtsNakCLAETK1SE PMZZi4XVnDv9ZOlgJgnYbV2LmBbvMFlNHmJmZW45wSUDkbg+V6ZGplu+pi2F4yXqtXR+ bnE5c6x3JQheLPjhOchu5xZS/vAZMX7X3Ra4xXT72WQlPVNPa8byLcYbM2ffRBrlH017 n3KKG/ex5y0dDJ5uWwYFDLBivUsgM2A9GNtR9hqgEo2Zi+CshG992dd5SwTQ7m29C0J1 HllVJaqcUon7TlRXiW2oo48XMVxOUebBsJM+1NOEcA8Etqui9Yc0+jXa5mKPgaVg7Yh3 Ag0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zOSRTnJh1iH0/BZ4J3IT8Z/PldpJcdEWYVicXX+yRhE=; b=RoAIiQ47PG522ta6bfSBiv9T12eQwoncS19NezTa2qAfRMuS0oEjniqokw/kCr/fUZ bcAfDZk3CsRlBvMJExNNGPh7yLnhyZhNG5d0ybvWAUllnRwLOfXTVSVi0V9e8mzqw9Gc 1TiX8lMm1U6WMZB6Lz2Ve3nVgpfPlMT+ld27rn3Hj120hH+S0BlMSDdb33ZbbXhh4G12 j8trDZsT1ipEP53b6Z335AJxTx53CSXwa3vQS4c0l+W4MJDqIoGHL0aFYFijZ+i5etMc 6w/HaRK9DAOZkYdgBLWdLiz6whH8B6IE941rmhPbacKqc61hyXpij8Iy+Rl6TzeJ0ngT LGAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W2NtxHVP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a89si1383302edf.215.2021.01.12.06.01.50; Tue, 12 Jan 2021 06:02:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W2NtxHVP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387834AbhALN6c (ORCPT + 99 others); Tue, 12 Jan 2021 08:58:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:46650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732978AbhALN62 (ORCPT ); Tue, 12 Jan 2021 08:58:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 513892311B for ; Tue, 12 Jan 2021 13:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610459867; bh=32mjZmvr99YZ2ZjlfD7HsnznEEvDSHHruXjw3VsZ0VQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=W2NtxHVPH8MzbUWyPsOnJp3puvcXOx/dsEqpHV97DsvlSIwoKNIHOYUZx1izqavul UfUL8ofomV16jEG6JPaOUbgt6l/yyI8jZz/DTyJUcABQ0XFOpMubWffKaR5ULxv57Q Kw1LTHsLq7x6kerp65fFYGN3cGcqc1ocXHUkQHI1fVUv6Hm1WPDrn/+mLYBf4JrC+G LgU6rqWmBntOgwyK//CNFQgE1sr2HyqHG6YfLAKl5SIBOyfQUfb+qxYH0jqD/s7UK+ tYSOyqbOIufD165R4RjS0WTUmEOJfE5p9UIGDC1IBYY1A3vPCKEDo5NBVkUNh2uwY6 ep46rgfnvLGCA== Received: by mail-lf1-f43.google.com with SMTP id u25so3516409lfc.2 for ; Tue, 12 Jan 2021 05:57:47 -0800 (PST) X-Gm-Message-State: AOAM531iJe2eOaxzGCCEWVd4MNB6MLnO4DGAaRfevMEH1VO9lzeCCArv yKqlFFXTK/gYtYppm026qIlKBC0J+w2gJaHc8v1hmg== X-Received: by 2002:a19:810:: with SMTP id 16mr2312202lfi.233.1610459865578; Tue, 12 Jan 2021 05:57:45 -0800 (PST) MIME-Version: 1.0 References: <20210112091403.10458-1-gilad.reti@gmail.com> In-Reply-To: <20210112091403.10458-1-gilad.reti@gmail.com> From: KP Singh Date: Tue, 12 Jan 2021 14:57:34 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling To: Gilad Reti Cc: bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , Networking , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 10:14 AM Gilad Reti wrote: > > Add support for pointer to mem register spilling, to allow the verifier > to track pointer to valid memory addresses. Such pointers are returned nit: pointers > for example by a successful call of the bpf_ringbuf_reserve helper. > > This patch was suggested as a solution by Yonghong Song. You can use the "Suggested-by:" tag for this. > > The patch was partially contibuted by CyberArk Software, Inc. nit: typo *contributed Also, I was wondering if "partially" here means someone collaborated with you on the patch? And, in that case: "Co-developed-by:" would be a better tag here. Acked-by: KP Singh > > Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier > support for it") > Signed-off-by: Gilad Reti > --- > kernel/bpf/verifier.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index 17270b8404f1..36af69fac591 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -2217,6 +2217,8 @@ static bool is_spillable_regtype(enum bpf_reg_type type) > case PTR_TO_RDWR_BUF: > case PTR_TO_RDWR_BUF_OR_NULL: > case PTR_TO_PERCPU_BTF_ID: > + case PTR_TO_MEM: > + case PTR_TO_MEM_OR_NULL: > return true; > default: > return false; > -- > 2.27.0 >