Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2369774pxb; Mon, 11 Jan 2021 08:00:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW4qow8rcyQWD8Zg+Aydos0eWBiqi52qYv8GTT7axueU8PvLwDdsOH/wnl4QnVYkSEXzHD X-Received: by 2002:a17:906:e18:: with SMTP id l24mr105307eji.434.1610380854374; Mon, 11 Jan 2021 08:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610380854; cv=none; d=google.com; s=arc-20160816; b=Eq5kmg0RdbMkMwFOqe5fltwnDOGtgiWntunzkujDt2l1YldEVWiCd9z22MwnNnJR/p CJ3Y/GjPMDaG505Njkf3eMFzkuU/rmMGMXGXya+0g2mXb46aNSkKtNpzMeO4htQyTIbY SdqsapUVrlCMRhOkIFE+nrDraCezgDcVxbAcpGCyIxNFGKaz0U2gJTkEybtXkPlkLPUI 2kYBm8s3JDtPNeRAssZ1MljMhmKmzghfLAbv/F+8L6woCicCZU8btZjvX0Bm/5zbUvAk ylnZX38SX9lYnB91la04g4Ud64Rzvpncl/t0uaD2xcbV1Emg8ZJCniDtYFSfKi1q4GJ1 7lEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=XFQCjUg6bC5uQMFZoFbn5yQPuxngopF3FB28mjJCK2M=; b=AdofagqizII70J/EXTf02I4eJNq42pHb4RQa1BxFDnV812jF9C5ZQXHAapzQLDk1ds YdmlIqNUkLZQ8+ipVcUwxrp6kiqNTU8lSc38uUnxcbaAp435TixT/Izhub5/r4o5Qily A8OSW3i342z6fEE8ooLRK0gM/lso3R6n0TVLZnsmGGWj1tjtPeJmDgv4g8cWk0VT+u9G wdOGwBgbGX+3TIkkDRiz9HOzmjH432+RKa4BEVdwkMLnwTWgHvbklTxKejaMVDFD/Cgb N0B3QxYlgvmyCn0KOd7NBP/6A+YnD2r2HQkXntJGZHr4DEjwYINOHCS3nIwXRR4qAhBY BTvg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si82063edj.120.2021.01.11.08.00.28; Mon, 11 Jan 2021 08:00:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730756AbhAKP43 (ORCPT + 99 others); Mon, 11 Jan 2021 10:56:29 -0500 Received: from www62.your-server.de ([213.133.104.62]:36360 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727195AbhAKP42 (ORCPT ); Mon, 11 Jan 2021 10:56:28 -0500 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kyzXm-000AEm-OE; Mon, 11 Jan 2021 16:55:46 +0100 Received: from [85.7.101.30] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyzXm-0002w9-IG; Mon, 11 Jan 2021 16:55:46 +0100 Subject: Re: [PATCH] Signed-off-by: giladreti To: giladreti , bpf@vger.kernel.org, Yonghong Song Cc: Alexei Starovoitov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210111153123.GA423936@ubuntu> From: Daniel Borkmann Message-ID: <17629073-4fab-a922-ecc3-25b019960f44@iogearbox.net> Date: Mon, 11 Jan 2021 16:55:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20210111153123.GA423936@ubuntu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/26046/Mon Jan 11 13:34:14 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; >