From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77D57C77B7C for ; Sat, 27 May 2023 13:10:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbjE0NKD (ORCPT ); Sat, 27 May 2023 09:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232690AbjE0NJ7 (ORCPT ); Sat, 27 May 2023 09:09:59 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8680A10A; Sat, 27 May 2023 06:09:58 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f6da07ff00so18066445e9.3; Sat, 27 May 2023 06:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685192997; x=1687784997; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=dvsLtNhlfL+kHe9BSiqT/A+Q9kXCPHk0gZKozzO0bJM=; b=WLrKljfLhF8WFYgrKC/y30tAA2pSGGKV4VcMofR7v5HD8z8ltP7IC/WjFxokWL7HgF Ir59YLn1mkvjIstCVoM9VWRoNNS1Hcg55ZYOlsJHc9P99nTnQIkpxUg3A7XXWO81BfBB QZKfTbYaQcupe8Acqw/5YjKSjCYq0op1G1zVVNNMz7dSDqe3hz82EfdvsQ9jXseWVX81 3BTvivONwmpZs+7EbHmzBrSo88qXEkEaq7RZT/GeenA0fL1nc6D0MG6huWaMEPDt9TL6 0OXrm1uwPPdgWzlokG2DuGW2Ym44B3HMnVAVQFdEtSOCsROQjT5wmmaW2RRHkXKoMDMl 1s8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685192997; x=1687784997; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dvsLtNhlfL+kHe9BSiqT/A+Q9kXCPHk0gZKozzO0bJM=; b=FBDQNnHrPjtKx1MdWer67BJy4n1/F8aMCPq4SIoJpcZ3dyTnX7/Sj+s1hK2bMeY6qh RXwHj+QQcyhpzUjgNOLV3DC/iH6WdPzJ0ols0ANEhrFs76XwYtb9ASKEoXL4teWikgZ2 YKLy4LVPs5S8FSGtABtKHVY7G2KIQFivQehjXDa8ocdczcMZj7vX+dAXsSKqPPSXnAPo +NT+VNChckTJK6D70/z+azs9/HEn9hcoKxetCLshpyiwyLgusex0lOkkf0tKYATvK9+b EeOuYSsPv9QDR5GTCyCeQ6phFSTUbMRBgrLdMRcNNcfciCNfbY6zbXPrnX3/dRG+Xdoe 1Rfw== X-Gm-Message-State: AC+VfDxIDm6udd6z8IEG7sDAH8Y5ne4Zglbl061nJPt72Y02GNQRIjth FG2XzS2Vu3Bz+RPhR8WIedo= X-Google-Smtp-Source: ACHHUZ6Di1EVMVg8fhpYJlJ/Zx/4oQfPI5BKRlP7kb/227vNEI/3wULi2RrPXkmBNdC3bmJK6GS10g== X-Received: by 2002:a05:600c:d5:b0:3f5:ce2:9c82 with SMTP id u21-20020a05600c00d500b003f50ce29c82mr4700669wmm.32.1685192996652; Sat, 27 May 2023 06:09:56 -0700 (PDT) Received: from Ansuel-xps. (93-34-93-173.ip49.fastwebnet.it. [93.34.93.173]) by smtp.gmail.com with ESMTPSA id l22-20020a1c7916000000b003f607875e5csm12005664wme.24.2023.05.27.06.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 06:09:56 -0700 (PDT) Message-ID: <64720124.1c0a0220.67a2a.c3cc@mx.google.com> X-Google-Original-Message-ID: Date: Sat, 27 May 2023 14:47:25 +0200 From: Christian Marangi To: Simon Horman Cc: "Jason A. Donenfeld" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , wireguard@lists.zx2c4.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [net PATCH] wireguard: allowedips: fix compilation warning for stack limit exceeded References: <20230526204134.29058-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sat, May 27, 2023 at 03:07:21PM +0200, Simon Horman wrote: > On Fri, May 26, 2023 at 10:41:34PM +0200, Christian Marangi wrote: > > On some arch (for example IPQ8074) and other with > > KERNEL_STACKPROTECTOR_STRONG enabled, the following compilation error is > > triggered: > > drivers/net/wireguard/allowedips.c: In function 'root_remove_peer_lists': > > drivers/net/wireguard/allowedips.c:80:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > 80 | } > > | ^ > > drivers/net/wireguard/allowedips.c: In function 'root_free_rcu': > > drivers/net/wireguard/allowedips.c:67:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > 67 | } > > | ^ > > cc1: all warnings being treated as errors > > > > Since these are free function and returns void, using function that can > > fail is not ideal since an error would result in data not freed. > > Since the free are under RCU lock, we can allocate the required stack > > array as static outside the function and memset when needed. > > This effectively fix the stack frame warning without changing how the > > function work. > > > > Fixes: Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") > > nit: Not sure if this can be fixed-up manually. > But one instance of 'Fixes: ' is enough. > An oversight by me sorry. Will send v2 with the tag fixed after 24 hours. Totally fine if the patch is OK to fix this when it's merged by the maintainers. -- Ansuel