Skip to content

chardev: Convert qemu_chr_write() to take a size_t argument

Philippe Mathieu-Daudé qemu-devel xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest25 patches 50 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFuncchardev/char-fd.c chardev/char-io.c chardev/char-pty.c +3 more+13 -131 reply
2/25chardev: Assert IOCanReadHandler can not be negativechardev/char.c+4 -15 replies
3/25chardev/wctablet: Use unsigned type to hold unsigned valuechardev/trace-events chardev/wctablet.c+4 -34 replies
4/25chardev: Let qemu_chr_be_can_write() return a size_t typeschardev/baum.c chardev/char-fd.c chardev/char-pty.c +11 more+25 -244 replies
5/25gdbstub: Use size_t for strlen() return valuegdbstub.c+1 -12 replies
6/25gdbstub: Use size_t to hold GDBState::last_packet_lengdbstub.c+1 -11 reply
7/25gdbstub: Let put_buffer() use size_tgdbstub.c+2 -21 reply
8/25ui/gtk: Remove pointless castui/gtk.c+1 -11 reply
9/25vhost-user: Express sizeof with size_thw/virtio/vhost-user.c+8 -62 replies
10/25usb-redir: Verify usbredirparser_write get called with positive counthw/usb/redirect.c+5 -11 reply
11/25xen: Let xencons_send() take a 'size' argumenthw/char/xen_console.c+7 -52 replies
12/25xen: Let buffer_append() return the size consumedhw/char/xen_console.c+8 -51 reply
13/25xen: Let buffer_append() return a size_thw/char/xen_console.c+1 -01 reply
14/25virtio-serial: Let VirtIOSerialPortClass::have_data() use size_thw/char/virtio-console.c include/hw/virtio/virtio-serial.h+2 -21 reply
15/25spapr-vty: Let vty_putchars() use size_thw/char/spapr_vty.c include/hw/ppc/spapr_vio.h+2 -21 reply
16/25tpm: Use size_t to hold sizeshw/tpm/tpm_emulator.c+4 -31 reply
17/25net/filter-mirror: Use size_tnet/filter-mirror.c+1 -11 reply
18/25s390x/3270: Let insert_IAC_escape_char() use size_thw/char/terminal3270.c+4 -32 replies
19/25s390/ebcdic: Use size_t to iterate over arraysinclude/hw/s390x/ebcdic.h+4 -43 replies
20/25s390x/sclp: Use a const variable to improve readabilityhw/char/sclpconsole-lm.c+4 -32 replies
21/25s390x/sclp: Use size_t in process_mdb()hw/char/sclpconsole-lm.c+2 -11 reply
22/25s390x/sclp: Let write_console_data() take a size_thw/char/sclpconsole-lm.c+1 -11 reply
23/25hw/ipmi: Assert outlen > outposhw/ipmi/ipmi_bmc_extern.c+2 -12 replies
24/25chardev: Let qemu_chr_fe_write[_all] use size_t type argumentchardev/char-fe.c chardev/char-mux.c include/chardev/char-fe.h+6 -51 reply
25/25chardev: Let qemu_chr_write[_all] use size_tchardev/char.c include/chardev/char.h include/sysemu/replay.h +2 more+8 -84 replies

Reviews trailers per patch

21 of 25 patches have a Reviewed-by or Acked-by.

PatchDavid GibsonGerd HoffmannCornelia HuckMarc-André LureauCorey Minyard
1/25R-b
2/25
3/25R-b R-b R-b R-b
4/25R-b R-b
5/25R-b R-b
6/25R-b
7/25R-b
8/25R-b
9/25R-b R-b
10/25R-b
11/25R-b
12/25
13/25
14/25R-b
15/25A-b
16/25R-b
17/25R-b
18/25R-b R-b
19/25A-b
20/25R-b
21/25R-b
22/25R-b
23/25R-b
24/25R-b
25/25

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/25] chardev: Convert qemu_chr_write() to take a size_t argument

Hi,

This series convert the chardev::qemu_chr_write() to take unsigned length argument. To do so I went through all caller and checked if there are no negative value possible.

I'm having headaches with the Xen backend, talking with Marc-André he suggested I ask help to the Xen maintainers.

Since the series is becoming quite big, I splitted it:
- part 1: convert qemu_chr_write()
- part 2: convert IOReadHandler

part 1 can be reviewed and merged without part 2.

The git diffstat is not huge, but there are various chardev subsystems so many maintainers to ask for Ack.

v2: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02396.html
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02200.html
(from Prasad J Pandit)
Changes requested by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html

Please review,

Phil.

Philippe Mathieu-Daudé (25):
chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc
chardev: Assert IOCanReadHandler can not be negative chardev/wctablet: Use unsigned type to hold unsigned value
chardev: Let qemu_chr_be_can_write() return a size_t types
gdbstub: Use size_t for strlen() return value
gdbstub: Use size_t to hold GDBState::last_packet_len
gdbstub: Let put_buffer() use size_t
ui/gtk: Remove pointless cast
vhost-user: Express sizeof with size_t
usb-redir: Verify usbredirparser_write get called with positive count
xen: Let xencons_send() take a 'size' argument
xen: Let buffer_append() return the size consumed
RFC xen: Let buffer_append() return a size_t
virtio-serial: Let VirtIOSerialPortClass::have_data() use size_t
spapr-vty: Let vty_putchars() use size_t
tpm: Use size_t to hold sizes
net/filter-mirror: Use size_t
s390x/3270: Let insert_IAC_escape_char() use size_t s390/ebcdic: Use size_t to iterate over arrays
s390x/sclp: Use a const variable to improve readability s390x/sclp: Use size_t in process_mdb()
s390x/sclp: Let write_console_data() take a size_t hw/ipmi: Assert outlen > outpos
chardev: Let qemu_chr_fe_write[_all] use size_t type argument
chardev: Let qemu_chr_write[_all] use size_t

 chardev/baum.c                    |  6 +++---
 chardev/char-fd.c                 |  6 +++---
 chardev/char-fe.c                 |  4 ++--
 chardev/char-io.c                 |  6 +++---
 chardev/char-mux.c                |  3 ++-
 chardev/char-pty.c                |  8 ++++----
 chardev/char-socket.c             | 13 +++++++------
 chardev/char-udp.c                |  8 ++++----
 chardev/char-win.c                |  2 +-
 chardev/char.c                    | 15 +++++++++------
 chardev/msmouse.c                 |  4 ++--
 chardev/spice.c                   |  2 +-
 chardev/trace-events              |  2 +-
 chardev/wctablet.c                |  9 +++++----
 gdbstub.c                         |  8 ++++----
 hw/bt/hci-csr.c                   |  2 +-
 hw/char/sclpconsole-lm.c          | 12 +++++++-----
 hw/char/spapr_vty.c               |  2 +-
 hw/char/terminal3270.c            |  7 ++++---
 hw/char/virtio-console.c          |  2 +-
 hw/char/xen_console.c             | 24 +++++++++++++++---------
 hw/ipmi/ipmi_bmc_extern.c         |  3 ++-
 hw/tpm/tpm_emulator.c             |  7 ++++---
 hw/usb/redirect.c                 |  6 +++++-
 hw/virtio/vhost-user.c            | 14 ++++++++------
 include/chardev/char-fd.h         |  2 +-
 include/chardev/char-fe.h         |  4 ++--
 include/chardev/char-io.h         |  2 +-
 include/chardev/char.h            |  4 ++--
 include/hw/ppc/spapr_vio.h        |  2 +-
 include/hw/s390x/ebcdic.h         |  8 ++++----
 include/hw/virtio/virtio-serial.h |  2 +-
 include/sysemu/replay.h           |  2 +-
 net/filter-mirror.c               |  2 +-
 replay/replay-char.c              |  2 +-
 stubs/replay.c                    |  2 +-
 ui/console.c                      |  6 +++---
 ui/gtk.c                          |  2 +-
 38 files changed, 119 insertions(+), 96 deletions(-)
Signature · 7 lines
2.20.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel