Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp64465pxy; Tue, 27 Apr 2021 22:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzUIhiGCqaYtIpLmaLVDFPY5k6FhIWOIg0vj0a7jw//ZuBYngsB1AoC4e3sanXW7K1jWx1 X-Received: by 2002:a05:6402:280d:: with SMTP id h13mr1155967ede.105.1619589417551; Tue, 27 Apr 2021 22:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619589417; cv=none; d=google.com; s=arc-20160816; b=0SXdJPso6LGltrdr3sJBuj0+oLtEaEEAg9uTL25S5Ld/wevlAuM1YTXoz/e41Tlqe+ UP/OoVzv6I/B2HabORdfbKr5p8BAqebIGvt1YbxRJApVInc3PKM6K3OH3Fcr/zTGViqF Qg8nstKt4MdizLa76KaEltRInMcnTH4zRZ4bKLWFMLNwZ55McV8hSt9FGfqcSaTQtR4I R6tZu3ysuBWECm6w2YArAwbnP/wV03JC6vm/lGkHJRtKK/d/3TGAXmuyUt5H3vgP8bCc CVilGrAqIj27MiwVUOqLkGgcSb5z+8r43pFeEkVnutBJdZNJhcWCbkE1bI2bibCP7J7H iPWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xTIK3SMLD3IIcc9YbkQLuCq6KOBi7/aP/7AJsj76dE4=; b=ljPYent+atyB+PDDzUZyzWp2hY7G9XV0aPkVA7hGeBTmc6Rog+1bPEPsgeD3mxDNso OHEVaq+zmQQOJTNHZjYHgXfGYE7q1tOXZM5eY3SdemnSS30IXJj5Jc2F98r0ySdeT5xq uW/RmPbN0YrIqI80EhgPNGFdK+E6XeoxUtWyoeRXQD3Qr0+YXsaI3lCIS6sE7N2pij9N nxg+4x5FqIdsxQFNnohAwnSJB5tXs06FbxRJswTeEYMdGVHzUGbBDphgG0xrzyejoKub K4zVvzCwT3jL5yyed8PVMWDOsuuZbtiKTfEnSv/YFMy3CmBdmpWHJ4JNcdUkEfhHD2aF oMgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jgJbv9U8; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si4720574edy.46.2021.04.27.22.56.30; Tue, 27 Apr 2021 22:56:57 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=jgJbv9U8; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbhD1Fxt (ORCPT + 99 others); Wed, 28 Apr 2021 01:53:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:35648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhD1Fxr (ORCPT ); Wed, 28 Apr 2021 01:53:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DBEF60E0B; Wed, 28 Apr 2021 05:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619589182; bh=pvFyP4U4yhRgxSZajdzI402m+lQIKufgQTOmom2kc9c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jgJbv9U8VY7nGkMv8CkUWD1c7gp+Fea3TH42wmoWL0PIPZY55vwazK9JvKzpy0HLz ElWBEZNfM9l2INqqO4XW55KgGUtty3IzM6F6vAPef0FW4JXCJQqS1ge+jhUVC6elhm 6qc0YKgpvuWRbb6EFbwAtyKyrw9XIf8fooqk1gWY= Date: Wed, 28 Apr 2021 07:52:55 +0200 From: Greg Kroah-Hartman To: Daniel Borkmann Cc: linux-kernel@vger.kernel.org, Aditya Pakki Subject: Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old" Message-ID: References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-67-gregkh@linuxfoundation.org> <56b8a42d-261e-1fc0-f572-8c3c1a98701d@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56b8a42d-261e-1fc0-f572-8c3c1a98701d@iogearbox.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 09:28:31PM +0200, Daniel Borkmann wrote: > On 4/27/21 7:58 PM, Greg Kroah-Hartman wrote: > > On Wed, Apr 21, 2021 at 02:59:01PM +0200, Greg Kroah-Hartman wrote: > [...] > > > kernel/bpf/core.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c > > > index 75244ecb2389..da29211ea5d8 100644 > > > --- a/kernel/bpf/core.c > > > +++ b/kernel/bpf/core.c > > > @@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, > > > struct bpf_prog *fp; > > > u32 pages; > > > + BUG_ON(fp_old == NULL); > > > + > > > size = round_up(size, PAGE_SIZE); > > > pages = size / PAGE_SIZE; > > > if (pages <= fp_old->pages) > > > > The original commit here is correct, I'll drop this revert. > > Ok, sounds good to me, thanks! (If there would ever be an incorrect fp_old with NULL, then at > latest we crash in fp_old->pages anyway, so the BUG_ON() was not needed.) Thanks for the re-review, much appreciated. greg k-h