Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2552020pxb; Mon, 11 Jan 2021 12:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXWqRxISq3FB73dBSgcZn67sNyKURh0OfsLswmcD1k6h0tbXcZnNwjgIIvWZ9ShHWWEj/6 X-Received: by 2002:a17:906:ce2b:: with SMTP id sd11mr874846ejb.334.1610397810868; Mon, 11 Jan 2021 12:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610397810; cv=none; d=google.com; s=arc-20160816; b=tz4oufvaNj/thLtYwqRJf3nvQ2Vdf+iwVZftqTaVQL5IwYF9yPnT/Jk3WOIM2FFB7v OnPt6TBbVagUQvGHGNFFrDx38imOplqB+j7eD+4/MlM5u/N/xAIQuDGb4yprdFOHAOk7 Pdcu9mSae0KRHnePpAcdd/Kc40SGf6X+4iWXlOyeDO6oUcWnUXYtXr2PBAwwfFPqN5UF 17E3UZSMSljkvhnORP0+e29/Pk0aiMzBVA0gTHDXm6DeEGd7cG5hBwIIHOmnahCvoLUV ULj0wXuH7CiMNRvp/UIJoGSIa9d9J847OuIWi3wfCBVe+y/m2dcDHOiKSRArSaE7iqCg J7hQ== 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=R4z8VuhNyMDL7g096sbikTkm1i+21r0leC/d47KG000=; b=VvIlok4cWzbUjljp6SYTHcQclXpfptJksJmts8e4WAV908I5+XsB/jyWPTNztS6a15 UNNMw++SeGd+O22uQEL436DiNJnGQFumHEiGtRRKenboIYO7DbN50WLlE16ZVzjtFtw1 hkZT+e7MJvRtJk1O6wxfpoJYqYjTXlHe22cIkw+c7aQ6fAo12Fo47rwd1CYW1SX/yrBo Iy2634KgS9h9D9zSrg+vYNXBeQD11Ll8cA1a1KWoHFzWe8QQQBk+UgiDu3V6nFYd4iUV 1oDMrMb1xegPiB+bzuP6h0Qa7YZIJ9k6VbYmZrP9UeTkr3pQw78Vj/JPuDQcUx2uQjKf yYbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZJeLWXP4; 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 p19si169839ejn.391.2021.01.11.12.43.07; Mon, 11 Jan 2021 12:43:30 -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=ZJeLWXP4; 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 S2390616AbhAKUj5 (ORCPT + 99 others); Mon, 11 Jan 2021 15:39:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387533AbhAKUj5 (ORCPT ); Mon, 11 Jan 2021 15:39:57 -0500 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90551C061794; Mon, 11 Jan 2021 12:39:16 -0800 (PST) Received: by mail-yb1-xb33.google.com with SMTP id b64so52705ybg.7; Mon, 11 Jan 2021 12:39:16 -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=R4z8VuhNyMDL7g096sbikTkm1i+21r0leC/d47KG000=; b=ZJeLWXP4rm29LpTASshdqb2QPKHYF7FZlN1CyQCn7y3N5TZAG81UbOkHMEOrTHs/Yp Id1Kj+czxOJ3iBhERZDdaVf3lt2WnVkKmaOzb/kUfB4vtjJkB9zzjWpGAG149FOdON8i 3d8IwdN8Vo8X5ckoqon9dFdRFXgRo2ruGw6acRHduw3klS0YSQQ2dbVvI1LebpvnCQqt bMBrWbx0MnvaWTqDseoJOc8dLzXCTcDgU2SSrHfdqSjNA7e4G0VpNXlgBdtXgyUePqKz GyHmyZ19FVO8XDuwaflslYk2FoSdh7D1CZE0W0nNYuL2+maaih7gR0RHr+k9g0Zu1c1l HI9g== 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=R4z8VuhNyMDL7g096sbikTkm1i+21r0leC/d47KG000=; b=PWUZZqbi504IpmfSJOxME2+frmkIdVCIffV4sMnyCdoQjkmhvMmFzMybtZwtnAR/kE ASMpIo5q06Nvne9z5POvRivDa9gE3miqIVusYzcKkE0ALIrfjJWQGNcJV/9RURXIZA53 zMbS9vcb0D4xGINkkaNHxD+cqzXJpXLhWMQlV+FpyzTgWGElSU0ggD6NjImUxTNzav3h Rw6JzX4iPTXrHXm4UC8gmEpIuuDR0augxVcxnsUdGeyP1MhDRBtNg8sOmkWV53fJp9FF k/7C9IAry4m/Tb4KmhJ9F1SnKG83VqWQpthYA94aPaQZvFNpgCXjBYDPjTngPSfwfYzi +V8w== X-Gm-Message-State: AOAM530654uW0aPt922cjc3WXVyaXanGxryAbs5n0VZP6RlRrZVPFWDR 1ziXWABfSYJbF7vFKydAADuWepnxssM8HqQxIF0= X-Received: by 2002:a25:d6d0:: with SMTP id n199mr2172909ybg.27.1610397555867; Mon, 11 Jan 2021 12:39:15 -0800 (PST) MIME-Version: 1.0 References: <20210111153123.GA423936@ubuntu> <17629073-4fab-a922-ecc3-25b019960f44@iogearbox.net> In-Reply-To: From: Andrii Nakryiko Date: Mon, 11 Jan 2021 12:39:05 -0800 Message-ID: Subject: Re: [PATCH] Signed-off-by: giladreti To: Gilad Reti Cc: Daniel Borkmann , bpf , Yonghong Song , Alexei Starovoitov , Networking , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 8:06 AM Gilad Reti wrote: > > On Mon, Jan 11, 2021, 17:55 Daniel Borkmann wrote: > > > > Hello Gilad, > > > > On 1/11/21 4:31 PM, giladreti wrote: > > > Added support for pointer to mem register spilling, to allow the verifier > > > to track pointer to valid memory addresses. Such pointers are returned > > > for example by a successful call of the bpf_ringbuf_reserve helper. > > > > > > This patch was suggested as a solution by Yonghong Song. > > > > The SoB should not be in subject line but as part of the commit message instead > > and with proper name, e.g. > > > > Signed-off-by: Gilad Reti > > > > For subject line, please use a short summary that fits the patch prefixed with > > the subsystem "bpf: [...]", see also [0] as an example. Thanks. > > > > It would be good if you could also add a BPF selftest for this [1]. > > > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e22d7f05e445165e58feddb4e40cc9c0f94453bc > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/ > > https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/verifier/spill_fill.c > > > > Sure. Thanks for your guidance. As you can probably tell, I am new to > kernel code contribution (in fact this is a first time for me). > Should I try to submit this patch again? In addition to all already mentioned things, also make sure you have [PATCH bpf] prefix in the subject, to identify that this is a bug fix for the bpf tree. Also you missed adding Fixes tag, please add this: Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") And yes, please re-submit with all the feedback incorporated (including the selftest). > > Sorry in advance for all the overhead I may be causing to you... > > > > --- > > > 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; > > > > >