Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1426780imm; Wed, 26 Sep 2018 18:15:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV612odI5P/9PAmHM5l1QRvMquVb3DZYBmO+Y/aav0rPMUxzFMQsNC9H5Y7Gsi9hvMzXt6kGd X-Received: by 2002:a17:902:6b06:: with SMTP id o6-v6mr4855515plk.6.1538010949766; Wed, 26 Sep 2018 18:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538010949; cv=none; d=google.com; s=arc-20160816; b=LJOWoGBk5boF5pWO1OrFNuXxyYVEo6voSbf/EDoI16tBBlvY9IWHE7cUcoVK1YVW44 8wXFEvMuywINYK6k2JX4GvEgoLJDNA3JvOyVSlI1uhJ3a/hqMrefZA4riBGUHLgHKvY4 rQLgVbSWJojt8Mml+zKlawBf8pjFOZO3gf3ksa/Z0GD8ymDS0jLWMNLdMTg/EHTfJnBC SJ8Qo8PLA0gFFezw1e0hbUNOOtoJtb1lSBekk2rlK2edXr+fjbcET37J5FiXEh7KyuEY b1zt9+6d+6mT+uaPTCstc3pTSYsVeOOi1SIHmvQEzjPKoQsowz+yFLTDiB0duwmoGmqV 9ugg== 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:dkim-signature; bh=97z9iuw4qeNZ1U6BxcuWueEeH89AVHDxXeL8UVskb1Q=; b=YMTl8IyFe+uydHyZnIfwPCsehrAeERZkW4txbMtJGab9/7f6oez7Qwtgir/yVS6VtL dmBmzRn6HDwJ4XJ5HK/7UDoEEiZtEhz96Rz1eRaYjXLlEMOeH2c2BTiT9gsdpPhkuEEA LWgaJbRm9AUFRD2slSqNMaB7KC30QW0TMzkWW2EmMVBsOXaWEd2ZXKiKRoJ8jq7+Vf3E bSfTrxIZh+E7exnmFxL9YFXUy1ssZr90Z6uxTxIASPhNz8rXH5ZripcHxl2Jzaeca2rq PCWEFCfWKTlHe4/a8yfouFp/x5E+PuKI4UbJOE7y1+SteZHLiTx2duKlRCEIN1jaNud5 G7jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Eh+FXojT; 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 q1-v6si528484pgs.110.2018.09.26.18.15.34; Wed, 26 Sep 2018 18:15:49 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Eh+FXojT; 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 S1726948AbeI0HbJ (ORCPT + 99 others); Thu, 27 Sep 2018 03:31:09 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46909 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbeI0HbI (ORCPT ); Thu, 27 Sep 2018 03:31:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=97z9iuw4qeNZ1U6BxcuWueEeH89AVHDxXeL8UVskb1Q=; b=Eh+FXojTqMBsmko8hhgbnPtT6MJhRmvPgK435OEPGtiGL+dAwa63/jKEdWcA+Tatnu9jUIOys8cAjGdn4yYUHK2Jkaw9PnRpRDN0lCsAlIiw3RvPs+Rh2rfNrB1ek2XEN5TACnJsdo3VNTKlzE4dPJ78ivMaWugtEJt8D6OU168=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1g5Ktq-0003xa-0S; Thu, 27 Sep 2018 03:15:26 +0200 Date: Thu, 27 Sep 2018 03:15:26 +0200 From: Andrew Lunn To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-crypto@vger.kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org Subject: Re: [PATCH net-next v6 23/23] net: WireGuard secure network tunnel Message-ID: <20180927011526.GB1193@lunn.ch> References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-24-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180925145622.29959-24-Jason@zx2c4.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jason I know you have been concentrating on the crypto code, so i'm not expecting too many changes at the moment in the network code. It would be good to further reduce the number of checkpatch warnings. The biggest problem i have at the moment is that all the trivial to fix warnings are hiding a few more important warnings. There are a few like these which are not obvious to see: WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #2984: FILE: drivers/net/wireguard/noise.c:293: + BUG_ON(first_len > BLAKE2S_HASH_SIZE || second_len > BLAKE2S_HASH_SIZE || WARNING: Macros with flow control statements should be avoided #5471: FILE: drivers/net/wireguard/selftest/allowedips.h:456: +#define init_peer(name) do { \ + name = kzalloc(sizeof(*name), GFP_KERNEL); \ + if (unlikely(!name)) { \ + pr_info("allowedips self-test: out of memory\n"); \ + goto free; \ + } \ + kref_init(&name->refcount); \ + } while (0) The namespace pollution also needs to be addresses. You have some pretty generic named global symbols. I picked out a few examples from objdump 00002a94 g F .text 00000060 peer_put 00003484 g F .text 0000004c timers_stop 00003520 g F .text 00000114 packet_queue_init 00002640 g F .text 00000034 device_uninit 000026bc g F .text 00000288 peer_create 000090d4 g F .text 000001bc ratelimiter_init Please make use of a prefix for global symbols, e.g. wg_. Andrew