mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: "Toralf Förster" <toralf.foerster@gmx.de>, netdev@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: may I ignore "net/core/rtnetlink.c:3156:1: warning: the frame size of 1280 bytes ..."?
Date: Mon, 5 Nov 2018 12:57:21 -0700	[thread overview]
Message-ID: <c4a54cac-89be-157e-d158-46ba3488ccc2@gmail.com> (raw)
In-Reply-To: <0cfb892c-b358-4bd6-f7c9-071a0039bc71@gmx.de>

On 11/4/18 9:14 AM, Toralf Förster wrote:
> compiling recent kernel (4.18.x, 4.19.1) at my server I do still get :
> 
> 
> net/core/rtnetlink.c: In function ‘rtnl_newlink’:
> net/core/rtnetlink.c:3156:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> 
> with "gcc version 7.3.0 (Gentoo Hardened 7.3.0-r3 p1.4) " and do wonder whether it is safe to ignore it?
> 
> 

I believe the warning is coming from this part of rtnl_newlink():

        if (1) {
                struct nlattr *attr[RTNL_MAX_TYPE + 1];
                struct nlattr *slave_attr[RTNL_SLAVE_MAX_TYPE + 1];
                struct nlattr **data = NULL;
                struct nlattr **slave_data = NULL;
                struct net *dest_net, *link_net = NULL;

The heavy hitters are:
#define RTNL_MAX_TYPE           49
#define RTNL_SLAVE_MAX_TYPE     36

attr and slave_attr would amount to 696 bytes of that 1280. The earlier
defined:

struct nlattr *tb[IFLA_MAX+1];

Would be another 416, so those 3 are 1112 bytes of the warning.

I have been using CONFIG_FRAME_WARN=2048 for a while without a problem.

      parent reply	other threads:[~2018-11-05 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04 16:14 Toralf Förster
2018-11-04 17:15 ` Joe Perches
2018-11-05 19:57 ` David Ahern [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=c4a54cac-89be-157e-d158-46ba3488ccc2@gmail.com \
    --to=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=toralf.foerster@gmx.de \
    /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

all inboxes | Powered by JetHome®