Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37E2BC04A6B for ; Sun, 12 May 2019 20:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09C4D20989 for ; Sun, 12 May 2019 20:20:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbfELUUI (ORCPT ); Sun, 12 May 2019 16:20:08 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:56740 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726664AbfELUUH (ORCPT ); Sun, 12 May 2019 16:20:07 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d8]) (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 3CDBD14BFCB58; Sun, 12 May 2019 13:20:06 -0700 (PDT) Date: Sun, 12 May 2019 13:20:03 -0700 (PDT) Message-Id: <20190512.132003.2243755455260411368.davem@davemloft.net> To: olteanv@gmail.com Cc: f.fainelli@gmail.com, vivien.didelot@gmail.com, andrew@lunn.ch, netdev@vger.kernel.org Subject: Re: [PATCH net 0/3] Fix a bug and avoid dangerous usage patterns From: David Miller In-Reply-To: <20190511201447.15662-1-olteanv@gmail.com> References: <20190511201447.15662-1-olteanv@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Sun, 12 May 2019 13:20:06 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Date: Sat, 11 May 2019 23:14:44 +0300 > Making DSA use the sk_buff control block was my idea during the > 'Traffic-support-for-SJA1105-DSA-driver' patchset, and I had also > introduced a series of macro helpers that turned out to not be so > helpful: > > 1. DSA_SKB_ZERO() zeroizes the 48-byte skb->cb area, but due to the high > performance impact in the hotpath it was only intended to be called > from the timestamping path. But it turns out that not zeroizing it > has uncovered the reading of an uninitialized member field of > DSA_SKB_CB, so in the future just be careful about what needs > initialization and remove this macro. > 2. DSA_SKB_CLONE() contains a flaw in its body definition (originally > put there to silence checkpatch.pl) and is unusable at this point > (will only cause NPE's when used). So remove it. > 3. For DSA_SKB_COPY() the same performance considerations apply as above > and therefore it's best to prune this function before it reaches a > stable kernel and potentially any users. Series applied, thank you.