Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2425361ybl; Thu, 19 Dec 2019 13:27:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxC1KTLEs6jYY5WJnYMiuv9n26eJJfAVTzDlnJz4vNXKGqkaVVXCDkyZmXF3v1kk10qTSlk X-Received: by 2002:a9d:be2:: with SMTP id 89mr3949698oth.101.1576790842037; Thu, 19 Dec 2019 13:27:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576790842; cv=none; d=google.com; s=arc-20160816; b=ooNSy/39iko2LC6aprgJsqGTD+7p7Bv1KiTe/k0Tl/+1+rBhjdT1yn/T7gi1flV1Ej ahvpJaFKeQd2jzJAP+AcG0VC8s8LrIcWyIJt+pQdU8cj+OBKzi9x508yj4bAXKDp/vNI Qhic9Q4JJyV6fckQL1JBxoOzVkdhf37i0C7B2nfd5JS2KzreoqTe9s7ME6kwR+9oO+GP Fn4idu6kQUSmB1rM5oIFD6ZdRr2q0oRKGKUBkGp4fAMguJxMmCL523LNSfPFcaGdM3e+ lyZv/45ECEzpTXK4xht/tCZVmtYpCPzJi/7mBRT+GWoB6M5QzIa7VmxeGsHwOntE6w4P +N7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7gN9yOQSNYbE+9saj5106VSn0rAMqgMvuzVjhiuRSrY=; b=kvSrNNGe4F3rZ0AQ0N5qWmpStcNvCILTLpY35I7lGkHIF6I0BIyeQGOJzDuOQaMNzA PaNpYgzI4Jr09vGQHmPYMoynowjU+Po5imK8YWc7WyTHB4f/z0YTwf4/RK7+OkrPkSNB 1WnAQXUdpRVAzKmd44iGXMoUZ4r8idRl6Hvlcaw/9CacEBx8AKes3z/8eRE5AMLN9I7N XLq5RZl1p9/v+wCNjNgDORJuB2UC+RiD9xvpNUalF+rNiD9sCGNhU9xeJt1/SGq9hZI6 tvr5mXG2rE51qyjGhX4Zf8HTr2ATzQqqz//3JR3QndvAjuWBtsrAROnNeddW0mhXKvt6 Qmdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si4118496oto.46.2019.12.19.13.27.09; Thu, 19 Dec 2019 13:27:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727262AbfLSV02 (ORCPT + 99 others); Thu, 19 Dec 2019 16:26:28 -0500 Received: from www62.your-server.de ([213.133.104.62]:60496 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbfLSV02 (ORCPT ); Thu, 19 Dec 2019 16:26:28 -0500 Received: from 31.249.197.178.dynamic.dsl-lte-bonding.lssmb00p-msn.res.cust.swisscom.ch ([178.197.249.31] helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1ii3JS-0005a8-Jf; Thu, 19 Dec 2019 22:26:26 +0100 Date: Thu, 19 Dec 2019 22:26:26 +0100 From: Daniel Borkmann To: Aditya Pakki Cc: kjlu@umn.edu, Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] bpf: Remove unnecessary assertion on fp_old Message-ID: <20191219212626.GA19344@pc-9.home> References: <20191219175735.19231-1-pakki001@umn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191219175735.19231-1-pakki001@umn.edu> User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25668/Thu Dec 19 10:55:58 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 19, 2019 at 11:57:35AM -0600, Aditya Pakki wrote: > The two callers of bpf_prog_realloc - bpf_patch_insn_single and > bpf_migrate_filter dereference the struct fp_old, before passing > it to the function. Thus assertion to check fp_old is unnecessary > and can be removed. > > Signed-off-by: Aditya Pakki Applied, thanks!