Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp701711imm; Wed, 19 Sep 2018 05:41:02 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbm9VzMxm7H4mV4lZiMpoMcCbNBEVNmDl9cuY+DITO3YqNfUJ+FqoNqLmUUn38myS1QXeJK X-Received: by 2002:a62:6104:: with SMTP id v4-v6mr36420466pfb.122.1537360862921; Wed, 19 Sep 2018 05:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537360862; cv=none; d=google.com; s=arc-20160816; b=NqMUHoEON0OFXgb0HF9qsIVwnhJHXGAepIS7tAuUyO1svqCxke/2FZ2fWcW18Dg679 ehSQ1plD1upQc8vEt67hKs/5JBGeZqoQbmPxO9Fs5J/amykv/v26NvbbfwW9z/h3ANxV 0kEGYsmo9mhZcp5eU1Q73QFoL93BvLVqiGMvjX3m5Q51FImhamdcpOXcNPU1S11hqe4d sHX1kZjLCSK34cJ9d0XcW9BBHk3WIvRUiDPM33CwS09tBRDT6kYvJyvI/m54PQ3tP9WS arewlCJIDBtWGSMz/ZAP9lNk2yDiz8ii9ILbx4IdKu0rcysehXVBSnEQ7l969s4iSicK qj0w== 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=ZRgPvkGLdx/jDgEFJBdid4djCHeP2et5qQrSkCH3SdI=; b=dYOpDnMQLTgtGySvi4D/9XUiz66mjHrn+x9behaTp5D0o6Wk5iUdlofCKSHjjSoozD nB8Qc7QMyd91jPQGGWcvnaVVLTROlC78lc3jHt038kYFYfykHetEbo1XYAl4ftjBoByF rQOqYOHfTG4nN4gVunff+CSAuRg29vrFQV99VGQlbMur+36EOCwXVSTkyCv6mYsO5oNT 6Dhr1eWeg6GlzaxFPxi5BhqG3nr0YANVoGqtJMJULyhyeyTN9rm7wSIiZ3ZtYQYOUDVs JX/gncwZv7nczNR91OB4Idz2fbv995gOz34piZdvkD02nMC5QuQ3qv0P4aeFEIakxsf1 YdeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Xeed1bjY; 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 n19-v6si20412750pgb.3.2018.09.19.05.40.47; Wed, 19 Sep 2018 05:41:02 -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=Xeed1bjY; 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 S1732076AbeISSQm (ORCPT + 99 others); Wed, 19 Sep 2018 14:16:42 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38737 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731235AbeISSQl (ORCPT ); Wed, 19 Sep 2018 14:16:41 -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=ZRgPvkGLdx/jDgEFJBdid4djCHeP2et5qQrSkCH3SdI=; b=Xeed1bjYLhc4ge3WTLOAZ4DWIHIyYroHKyR3qp8TPotEfZvvmuN0cL3aXkKGFLpd6gozdRc9SKcmUZevafxVC5vug6mYSR9Rv1ai+50yHljTauTfsMOTC3bqkYgsINSlX4LDxSitotJ6Ie0/hCVNOSDiF9sEya988QfBIdthzx4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1g2bkr-0007Ow-Dy; Wed, 19 Sep 2018 14:38:53 +0200 Date: Wed, 19 Sep 2018 14:38:53 +0200 From: Andrew Lunn To: "Jason A. Donenfeld" Cc: LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman Subject: Re: [PATCH net-next v5 20/20] net: WireGuard secure network tunnel Message-ID: <20180919123853.GC26940@lunn.ch> References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-21-Jason@zx2c4.com> <20180918233411.GB17466@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Wed, Sep 19, 2018 at 04:04:01AM +0200, Jason A. Donenfeld wrote: > Hi Andrew, > > On Wed, Sep 19, 2018 at 1:34 AM Andrew Lunn wrote: > > I see this BUG_ON() is still here. It really needs to be removed. It > > does not look like you need to crash the kernel here. Can you add in a > > test of len >= 128, do a WARN and then return. I think you then leak > > some memory, but i would much prefer that to a crashed machine. > > Sure, I'll change it to that. Great, thanks. I noticed there is at least one more BUG() statements. It would be good to remove them all. BUG() should only be used when something bad has already happened and we want to minimise the damage by killing the machine immediately. Andrew