All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/17] misc: Replace alloca() by g_malloc()
@ 2021-05-07 14:42 Philippe Mathieu-Daudé
  2021-05-07 14:42 ` [PATCH v3 01/17] bsd-user/syscall: Replace alloca() by g_try_new() Philippe Mathieu-Daudé
                   ` (17 more replies)
  0 siblings, 18 replies; 27+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-07 14:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Philippe Mathieu-Daudé,
	Laurent Vivier, qemu-arm, qemu-ppc, Gerd Hoffmann, Paolo Bonzini,
	Alex Bennée

The ALLOCA(3) man-page mentions its "use is discouraged".
Replace few calls by equivalent GLib malloc().

Since v2:
- linux-user calls converted
- bsd-user returns ENOMEM (Peter)
- built on PPC+KVM host (David)
- removed tpm mutex cleanup (Christophe)
- included Alex gdbstub patch
- added R-b tags

Since v1:
- Converted more uses (alsaaudio, tpm, pca9552)
- Reworked gdbstub (Alex)
- Simplified PPC/KVM (Greg)

Alex Bennée (1):
  gdbstub: Replace GdbCmdContext with plain g_array()

Philippe Mathieu-Daudé (16):
  bsd-user/syscall: Replace alloca() by g_try_new()
  linux-user/elfload: Replace alloca() by g_try_malloc()
  linux-user/syscall: Replace alloca() by g_try_new()
  linux-user/syscall: Replace alloca() by g_try_malloc()
  linux-user: Replace alloca() by g_try_new() in ppoll() syscall
  linux-user: Replace alloca() by g_try_malloc() in setsockopt() syscall
  linux-user: Replace alloca() by g_try_malloc() in various socket
    syscall
  linux-user/syscall: Move code around in do_sendrecvmsg_locked()
  linux-user/syscall: Replace alloca() by GLib alloc() in sendrecvmsg
  audio/alsaaudio: Replace ALSA alloca() by malloc() equivalent
  backends/tpm: Replace g_alloca() by g_malloc()
  gdbstub: Constify GdbCmdParseEntry
  hw/misc/pca9552: Replace g_newa() by g_new()
  target/ppc/kvm: Replace alloca() by g_malloc()
  configure: Prohibit alloca() by using -Walloca CPPFLAG
  configure: libSLiRP buildsys kludge

 configure                   |   8 +
 audio/alsaaudio.c           |  11 +-
 backends/tpm/tpm_emulator.c |   3 +-
 bsd-user/syscall.c          |   7 +-
 gdbstub.c                   | 322 +++++++++++++++++-------------------
 hw/misc/pca9552.c           |   2 +-
 linux-user/elfload.c        |  14 +-
 linux-user/syscall.c        | 137 ++++++++++-----
 target/ppc/kvm.c            |   4 +-
 9 files changed, 277 insertions(+), 231 deletions(-)

-- 
2.26.3




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

end of thread, other threads:[~2021-05-10  6:01 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 14:42 [PATCH v3 00/17] misc: Replace alloca() by g_malloc() Philippe Mathieu-Daudé
2021-05-07 14:42 ` [PATCH v3 01/17] bsd-user/syscall: Replace alloca() by g_try_new() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 02/17] linux-user/elfload: Replace alloca() by g_try_malloc() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 03/17] linux-user/syscall: Replace alloca() by g_try_new() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 04/17] linux-user/syscall: Replace alloca() by g_try_malloc() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 05/17] linux-user: Replace alloca() by g_try_new() in ppoll() syscall Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 06/17] linux-user: Replace alloca() by g_try_malloc() in setsockopt() syscall Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 07/17] linux-user: Replace alloca() by g_try_malloc() in various socket syscall Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 08/17] linux-user/syscall: Move code around in do_sendrecvmsg_locked() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 09/17] linux-user/syscall: Replace alloca() by GLib alloc() in sendrecvmsg Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 10/17] audio/alsaaudio: Replace ALSA alloca() by malloc() equivalent Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 11/17] backends/tpm: Replace g_alloca() by g_malloc() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 12/17] gdbstub: Constify GdbCmdParseEntry Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 13/17] gdbstub: Replace GdbCmdContext with plain g_array() Philippe Mathieu-Daudé
2021-05-07 14:43 ` [PATCH v3 14/17] hw/misc/pca9552: Replace g_newa() by g_new() Philippe Mathieu-Daudé
2021-05-10  5:59   ` Cédric Le Goater
2021-05-07 14:43 ` [PATCH v3 15/17] target/ppc/kvm: Replace alloca() by g_malloc() Philippe Mathieu-Daudé
2021-05-07 14:43   ` Philippe Mathieu-Daudé
2021-05-10  5:38   ` David Gibson
2021-05-10  5:38     ` David Gibson
2021-05-07 14:43 ` [PATCH v3 16/17] configure: Prohibit alloca() by using -Walloca CPPFLAG Philippe Mathieu-Daudé
2021-05-07 17:14   ` Philippe Mathieu-Daudé
2021-05-07 14:43 ` [NOTFORMERGE PATCH v3 17/17] configure: libSLiRP buildsys kludge Philippe Mathieu-Daudé
2021-05-07 17:15   ` Philippe Mathieu-Daudé
2021-05-07 17:19 ` [PATCH v3 18/17] tests/unit/test-char: Replace g_alloca() by buffer on the stack Philippe Mathieu-Daudé
2021-05-07 20:44   ` Marc-André Lureau
2021-05-07 21:25     ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.