Received: by 10.192.165.156 with SMTP id m28csp333623imm; Tue, 17 Apr 2018 10:54:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx48KZmAI4P8W/6zZYKbqDsHdPrVpZSgNQi3gxNMLNBXFTNIx+lz+10NxPqlO1lPggbAl/JgI X-Received: by 10.99.115.69 with SMTP id d5mr2505241pgn.289.1523987643986; Tue, 17 Apr 2018 10:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523987643; cv=none; d=google.com; s=arc-20160816; b=0gqVzYaeH7uLtR+y571vTcvbQ14wen3yVZ9rBYVPESSkpLyhVyk1ejRSn13v8FDbkt YKwL7m5cQjccOv3POv/8BPR1kKkrpB/u+ocOreSlS5MI0VBRONacJeJdUUTaFsYmKTEP KCWxdMyMHo4WnhxkKiVELI6f/d/4Xhfw7d+Ac+S6j/i5fu3jwZwNiKLVeRrKj3YnXd2/ tTLE7yOUjlGE3nCSnv1nfBcwbPMYf3l3FG5xEeCbHLzZI6n1IV7woFNwHXgHPsBWA0wx 77TPiqCOnhyDp54plWgqI4PgBXECCGPNMVpj+zTSHtjgZFb5cPRgNuEJRAdf9++iSAHX Sr4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=Sz7VBULvPjNaI/F0Gtzfrj7nAu4xfS5PXQ6NEh5vdwo=; b=DXHNF/1Ulsl/e6H9H5QsfI/KdWcjlPYYbP/pElMuZu+ymJk6t7V3SZ+NTx1UV0S5ZI 1mbbsq0PqNodWHcPkpgAybP88pjJpLc8iHornZeaG3l4ZVMFRWM4bLScAZhFaPkm6eC3 UkSGcAB+eaBYKMEQuf0q995uWGkTA6tA5NCvqkp1g4bN3Jf6rZOn5POgTSrX0ess8ofq bXKpoLq/HPa+9cPj3kZqRw6LbRREdAe3Yfs/dKblPqEB49jvliZz+3E6UI8H4nGQ0Zas e/t3/2yAYRrtr3FEINKTEmYuRueGqTGGgLXAoJyVF/HK1AMLh8nYU+EP8vRqfA3Ax0v2 WLbg== 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 k2-v6si14795730plt.406.2018.04.17.10.53.49; Tue, 17 Apr 2018 10:54:03 -0700 (PDT) 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 S1753368AbeDQRvW (ORCPT + 99 others); Tue, 17 Apr 2018 13:51:22 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:59212 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbeDQRvR (ORCPT ); Tue, 17 Apr 2018 13:51:17 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id B8B3D14356367; Tue, 17 Apr 2018 10:51:16 -0700 (PDT) Date: Tue, 17 Apr 2018 13:51:15 -0400 (EDT) Message-Id: <20180417.135115.342004798174126821.davem@davemloft.net> To: sam@mendozajonas.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: Re: [PATCH RESEND net-next] net/ncsi: Refactor MAC, VLAN filters From: David Miller In-Reply-To: <20180417042323.27941-1-sam@mendozajonas.com> References: <20180417042323.27941-1-sam@mendozajonas.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 17 Apr 2018 10:51:17 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Samuel Mendoza-Jonas Date: Tue, 17 Apr 2018 14:23:23 +1000 > The NCSI driver defines a generic ncsi_channel_filter struct that can be > used to store arbitrarily formatted filters, and several generic methods > of accessing data stored in such a filter. > However in both the driver and as defined in the NCSI specification > there are only two actual filters: VLAN ID filters and MAC address > filters. The splitting of the MAC filter into unicast, multicast, and > mixed is also technically not necessary as these are stored in the same > location in hardware. > > To save complexity, particularly in the set up and accessing of these > generic filters, remove them in favour of two specific structs. These > can be acted on directly and do not need several generic helper > functions to use. > > This also fixes a memory error found by KASAN on ARM32 (which is not > upstream yet), where response handlers accessing a filter's data field > could write past allocated memory. ... > Reported-by: Joel Stanley > Signed-off-by: Samuel Mendoza-Jonas Applied to net-next, thank you.