qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/8] Fix several unbounded stack usage
@ 2016-03-08  7:00 Peter Xu
  2016-03-08  7:00 ` [Qemu-devel] [PATCH 1/8] qdict: fix unbounded stack for qdict_array_entries Peter Xu
                   ` (7 more replies)
  0 siblings, 8 replies; 57+ messages in thread
From: Peter Xu @ 2016-03-08  7:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Eduardo Habkost, qemu-block, Michael S. Tsirkin,
	Juan Quintela, Markus Armbruster, peterx, Luiz Capitulino,
	Gerd Hoffmann, Amit Shah, pbonzini, Richard Henderson

Suggested by Paolo.

Ths patchset fixes several of the warnings generated by
"-Wstack-usage=100000".  There are about 20-30 unbound stack cases
during my build, and this patch is only fixing several of them,
those which are obvious and easy.  For the rest, most of them need
some knowledge on specific area (e.g., USB, net, block) to have a
better assessment on the limitiation values, and are not covered in
this patchset.

One thing to mention about patch 4: I still cannot figure out why
the function xhci_dma_write_u32s() cannot be inlined in short
time... However, the current fix can at least keep the code behavior
not changed while making it stack bounded.  Please let me know if
anyone knows.

Thanks.
Peter

CC: Markus Armbruster <armbru@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Gerd Hoffmann <kraxel@redhat.com>
CC: Juan Quintela <quintela@redhat.com>
CC: Amit Shah <amit.shah@redhat.com>
CC: Luiz Capitulino <lcapitulino@redhat.com>
CC: qemu-block@nongnu.org

Peter Xu (8):
  qdict: fix unbounded stack for qdict_array_entries
  block: fix unbounded stack for dump_qdict
  usb: fix unbounded stack for ohci_td_pkt
  usb: fix unbounded stack for xhci_dma_write_u32s
  usb: fix unbounded stack for inotify_watchfn
  usb: fix unbounded stack for usb_mtp_add_str
  migration: fix unbounded stack for source_return_path_thread
  hw/i386: fix unbounded stack for load_multiboot

 block/qapi.c          |  5 ++++-
 hw/i386/multiboot.c   | 10 +++++++++-
 hw/usb/dev-mtp.c      | 13 +++++++++----
 hw/usb/hcd-ohci.c     |  7 ++++---
 hw/usb/hcd-xhci.c     | 12 ++++++++----
 migration/migration.c |  7 ++++---
 qobject/qdict.c       | 15 +++++++++------
 7 files changed, 47 insertions(+), 22 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2016-03-10  2:07 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08  7:00 [Qemu-devel] [PATCH 0/8] Fix several unbounded stack usage Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 1/8] qdict: fix unbounded stack for qdict_array_entries Peter Xu
2016-03-08  8:22   ` Markus Armbruster
2016-03-08 10:19     ` Kevin Wolf
2016-03-08 16:21       ` Eric Blake
2016-03-08 16:30         ` Kevin Wolf
2016-03-08 16:50           ` Daniel P. Berrange
2016-03-09  2:57       ` Peter Xu
2016-03-09  3:04         ` Eric Blake
2016-03-09  3:27           ` Peter Xu
2016-03-09  9:48           ` Kevin Wolf
2016-03-09 13:23             ` Markus Armbruster
2016-03-09 13:57               ` Kevin Wolf
2016-03-09 21:03                 ` Markus Armbruster
2016-03-10  1:30                   ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict Peter Xu
2016-03-08  8:12   ` Markus Armbruster
2016-03-08  8:53     ` Fam Zheng
2016-03-08 13:47       ` Markus Armbruster
2016-03-09  3:00         ` Peter Xu
2016-03-08  9:31     ` Peter Xu
2016-03-08 13:50       ` Markus Armbruster
2016-03-08 12:17     ` Paolo Bonzini
2016-03-09  3:18       ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 3/8] usb: fix unbounded stack for ohci_td_pkt Peter Xu
2016-03-08 12:20   ` Paolo Bonzini
2016-03-09  4:59     ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 4/8] usb: fix unbounded stack for xhci_dma_write_u32s Peter Xu
2016-03-08  7:26   ` Peter Maydell
2016-03-09  5:12     ` Peter Xu
2016-03-08 12:21   ` Paolo Bonzini
2016-03-09  5:08     ` Peter Xu
2016-03-09  7:53       ` Paolo Bonzini
2016-03-09  8:07         ` Peter Xu
2016-03-09  8:34           ` Markus Armbruster
2016-03-09  9:19             ` Peter Xu
2016-03-09 12:52               ` Markus Armbruster
2016-03-09 12:59           ` Paolo Bonzini
2016-03-10  2:07             ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 5/8] usb: fix unbounded stack for inotify_watchfn Peter Xu
2016-03-08  7:20   ` Peter Maydell
2016-03-08 12:22     ` Paolo Bonzini
2016-03-09  5:22       ` Peter Xu
2016-03-08 12:22   ` Paolo Bonzini
2016-03-09  5:23     ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 6/8] usb: fix unbounded stack for usb_mtp_add_str Peter Xu
2016-03-08  8:10   ` Gerd Hoffmann
2016-03-09  5:29     ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 7/8] migration: fix unbounded stack for source_return_path_thread Peter Xu
2016-03-08  9:48   ` Juan Quintela
2016-03-08 12:27     ` Paolo Bonzini
2016-03-08 12:26   ` Paolo Bonzini
2016-03-09  5:27     ` Peter Xu
2016-03-08  7:00 ` [Qemu-devel] [PATCH 8/8] hw/i386: fix unbounded stack for load_multiboot Peter Xu
2016-03-08  7:17   ` Peter Maydell
2016-03-08 12:29   ` Paolo Bonzini
2016-03-09  5:39     ` Peter Xu

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).