Xen-Devel Archive on lore.kernel.org
 help / color / 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,
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
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 index

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:

* 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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git