Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3101608pxb; Tue, 12 Jan 2021 06:27:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5dnRwQyMC7QDnGsE9SciD7lVDj38lycqzR9O+0vahhr0+OSoJFan1OlCnoznZB0BM86zN X-Received: by 2002:aa7:db14:: with SMTP id t20mr3605184eds.158.1610461669130; Tue, 12 Jan 2021 06:27:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610461669; cv=none; d=google.com; s=arc-20160816; b=0L7I3jNYWRONX0/FiNdZQzVSQY2yn4e/bRyC8qLUiUjPU01NersJ4BmQ4sZIbODLpw no8Y+d2TnZotHtOnEKN9twbqe7sDqNLX9aaOSnw/m24BTXno9rMLYVGMXQB7UsCOuHsq y2b8BJ/n+CFwb4Fo0hCwOT66krde3T4a/hRzO2Na8XGrs/wuyIRKwVfqre3SlOre48A0 wsySmzDEFIQ5AGwtT5MEaewg5oZisL1e4qlXbKrQFrrn7ww1OaxHR0m0W1Qh2/9S8/gU wNXT8W4qyUbYCFB3/51a2o4QcYgVQavQACNKR//+C9JYdpLos5nFvwJM+FCvkT+CnC+d Llwg== 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=O5/HL8VVGM5tx4Z8dAyAokogpc1Z04/fo1fGs1jUizo=; b=zbW/gG6AIFdTpuJJLww9sHHA3PAX0bqqzc3ldOzOmCQziaUQUSEYifHzdKA7Jh4QLW aC5wu70xcoDTq1ynw0sRbn9XvSuj1xJnmz+f+hWql01lWQVh9/E3yFIkZTjUjU2Gal93 8p4/SG2NmOrnXkCS+blqbTaFHqET9RoYmZosfdpUTPEso51S2oOJ9hEzoG2+WS0M/jIY /R9Jyse232mnVouQx3I9RgEanVNRzOFmaBmiVu+W5t4lEFMcuzmY81nsYFANo56AjKji JcVoVwm2ltZO11Yolgt0nLaibjkUn/n0bBtz3YEslUD3PtnfWZum4/tOt9WMFmvs+gzb Xk7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tYMBvZXJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf17si1377436edb.344.2021.01.12.06.27.24; Tue, 12 Jan 2021 06:27:49 -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=@gmail.com header.s=20161025 header.b=tYMBvZXJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731757AbhALOY4 (ORCPT + 99 others); Tue, 12 Jan 2021 09:24:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbhALOYz (ORCPT ); Tue, 12 Jan 2021 09:24:55 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E1BC061786; Tue, 12 Jan 2021 06:24:15 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id jx16so3739987ejb.10; Tue, 12 Jan 2021 06:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O5/HL8VVGM5tx4Z8dAyAokogpc1Z04/fo1fGs1jUizo=; b=tYMBvZXJbgouAv/74jI0R/AItKNmhSOgh+xASdDYxzc8X7c7KSAwM4ftUkoHfnyYxW y9WzzBCSjsRKZURM1WaLTtme+zOUnSmIRdTkvNMZFd8cPore2leXkWeE+NFnFe3/cmr/ daOMwVcCpFOyvBePet7lF5Fr40U+AljLRaY7uI1QIRGPc/a6PUzpnzs3daBP6QU2GDcX QEUrOrB+Y4MW/BOdm59cvUIzoNM8OPeJOxMafGkCd8U/kmt92ij/0V1u3n1T/4GkxcMR YPin4m4Vx77ktlClhtLJZRuZbc4XqK9YOaqYJ+fxtrf8M9/vqIBL7V6BwONF9oRZ4t2o tpjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O5/HL8VVGM5tx4Z8dAyAokogpc1Z04/fo1fGs1jUizo=; b=O3T6jXu+OPkNcNDTlDcdoQmFW/ohX0Uy3P27URq7bfwt15LMuWA8drcwsocAWMlUEG aPHpWKpdR9+6XHcf+2l9u+WavDv6XlTtFezNXFkBA//g3yx3ELuj2M605oSLOUUPyGOY WLK55ABx7jl4OPEmFCz05GzQdP5E3BPmlB3sZvNWMxEJJ18NWle9G0woUPuUYRwJupNi UDiCaTN+UOf8cwOTJi+my6q6ptrwiGuYoqdSB10b6AN2Asgr/TC8YqUtz4326+j1bt4j Dkq46MIVBAHGyTo3mYratZJxRBvfRCi/UQG+CnmSKp+rsrctswDdFn6sC2hc/ywAHGQB bhAw== X-Gm-Message-State: AOAM532BikWpSwXhwRNUlYFK6b3PlLuJJWal1t9rAGORDXYLU05wilCZ uz2WYbfJMQnDgP60v/s+LzWUCwIxVJGTJaiGcts= X-Received: by 2002:a17:907:1004:: with SMTP id ox4mr3381026ejb.240.1610461453603; Tue, 12 Jan 2021 06:24:13 -0800 (PST) MIME-Version: 1.0 References: <20210112091403.10458-1-gilad.reti@gmail.com> In-Reply-To: From: Gilad Reti Date: Tue, 12 Jan 2021 16:23:37 +0200 Message-ID: Subject: Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling To: KP Singh 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 3:57 PM KP Singh wrote: > > 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 Thanks > > > 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. Thanks > > > > > The patch was partially contibuted by CyberArk Software, Inc. > > nit: typo *contributed Thanks. Should I submit a v2 of the patch to correct all of those? > > 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. No, I did it alone. I mentioned CyberArk since I work there and did some of the coding during my daily work, so they deserve credit. > > 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 > >