xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Juergen Gross <jgross@suse.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2 1/2] xen/xenbus: avoid large structs and arrays on the stack
Date: Thu, 2 Jul 2020 17:02:37 -0400	[thread overview]
Message-ID: <80b8927f-d654-44f3-a860-fb3e395652d6@oracle.com> (raw)
In-Reply-To: <20200701121638.19840-2-jgross@suse.com>

On 7/1/20 8:16 AM, Juergen Gross wrote:
> xenbus_map_ring_valloc() and its sub-functions are putting quite large
> structs and arrays on the stack. This is problematic at runtime, but
> might also result in build failures (e.g. with clang due to the option
> -Werror,-Wframe-larger-than=... used).
>
> Fix that by moving most of the data from the stack into a dynamically
> allocated struct. Performance is no issue here, as
> xenbus_map_ring_valloc() is used only when adding a new PV device to
> a backend driver.
>
> While at it move some duplicated code from pv/hvm specific mapping
> functions to the single caller.
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Juergen Gross <jgross@suse.com>


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>




  reply	other threads:[~2020-07-02 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 12:16 [PATCH v2 0/2] xen/xenbus: some cleanups Juergen Gross
2020-07-01 12:16 ` [PATCH v2 1/2] xen/xenbus: avoid large structs and arrays on the stack Juergen Gross
2020-07-02 21:02   ` Boris Ostrovsky [this message]
2020-07-01 12:16 ` [PATCH v2 2/2] xen/xenbus: let xenbus_map_ring_valloc() return errno values only Juergen Gross
2020-07-03 10:22 ` [PATCH v2 0/2] xen/xenbus: some cleanups Boris Ostrovsky

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=80b8927f-d654-44f3-a860-fb3e395652d6@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).