From: Christian Marangi <ansuelsmth@gmail.com>
To: Simon Horman <simon.horman@corigine.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
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
Date: Sat, 27 May 2023 14:47:25 +0200 [thread overview]
Message-ID: <64720124.1c0a0220.67a2a.c3cc@mx.google.com> (raw)
In-Reply-To: <ZHIAibPKikGjLD8+@corigine.com>
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
prev parent reply other threads:[~2023-05-27 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 20:41 [net PATCH] wireguard: allowedips: fix compilation warning for stack limit exceeded Christian Marangi
2023-05-27 13:07 ` Simon Horman
2023-05-27 12:47 ` Christian Marangi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64720124.1c0a0220.67a2a.c3cc@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=Jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=stable@vger.kernel.org \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).