qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] chardev patches
@ 2024-10-09  8:39 marcandre.lureau
  2024-10-09 19:11 ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: marcandre.lureau @ 2024-10-09  8:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Markus Armbruster, Eric Blake, Paolo Bonzini, devel,
	peter.maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit 2af37e791906cfda42cb9604a16d218e56994bb1:

  Merge tag 'pull-request-2024-10-07' of https://gitlab.com/thuth/qemu into staging (2024-10-07 12:55:02 +0100)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request

for you to fetch changes up to b74cb8761c68275240af0826086590a03a1f419d:

  chardev: add path option for pty backend (2024-10-09 12:13:05 +0400)

----------------------------------------------------------------
chardev: introduce 'reconnect-ms' and deprecate 'reconnect'
chardev: add path option for pty backend

----------------------------------------------------------------

Daniil Tatianin (1):
  chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

Octavian Purdila (1):
  chardev: add path option for pty backend

 docs/about/deprecated.rst     |  6 +++++
 qapi/char.json                | 44 ++++++++++++++++++++++++++++++++---
 include/chardev/char-socket.h |  2 +-
 chardev/char-pty.c            | 33 ++++++++++++++++++++++++++
 chardev/char-socket.c         | 33 +++++++++++++++++++-------
 chardev/char.c                |  8 +++++++
 qemu-options.hx               | 33 +++++++++++++++++++++-----
 7 files changed, 140 insertions(+), 19 deletions(-)

-- 
2.47.0



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

* Re: [PULL 0/2] chardev patches
  2024-10-09  8:39 marcandre.lureau
@ 2024-10-09 19:11 ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2024-10-09 19:11 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, Markus Armbruster, Eric Blake, Paolo Bonzini, devel

On Wed, 9 Oct 2024 at 09:39, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The following changes since commit 2af37e791906cfda42cb9604a16d218e56994bb1:
>
>   Merge tag 'pull-request-2024-10-07' of https://gitlab.com/thuth/qemu into staging (2024-10-07 12:55:02 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request
>
> for you to fetch changes up to b74cb8761c68275240af0826086590a03a1f419d:
>
>   chardev: add path option for pty backend (2024-10-09 12:13:05 +0400)
>
> ----------------------------------------------------------------
> chardev: introduce 'reconnect-ms' and deprecate 'reconnect'
> chardev: add path option for pty backend
>

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.2
for any user-visible changes.

-- PMM


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

* [PULL 0/2] chardev patches
@ 2024-12-02 12:27 marcandre.lureau
  2024-12-02 16:15 ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: marcandre.lureau @ 2024-12-02 12:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Paolo Bonzini, peter.maydell

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit 72b88908d12ee9347d13539c7dd9a252625158d1:

  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-11-29 10:09:05 +0000)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request

for you to fetch changes up to e6214fd6d48e704ed3aed6ea2053a9756d0ca13f:

  chardev/char-mux: make boolean bit check instead of find_next_bit() (2024-12-02 16:23:12 +0400)

----------------------------------------------------------------
chardev patch queue

----------------------------------------------------------------

Roman Penyaev (2):
  chardev/char-mux: shift unsigned long to avoid 32-bit overflow
  chardev/char-mux: make boolean bit check instead of find_next_bit()

 chardev/char-mux.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

-- 
2.47.0



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

* Re: [PULL 0/2] chardev patches
  2024-12-02 12:27 marcandre.lureau
@ 2024-12-02 16:15 ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2024-12-02 16:15 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel, Paolo Bonzini

On Mon, 2 Dec 2024 at 12:27, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The following changes since commit 72b88908d12ee9347d13539c7dd9a252625158d1:
>
>   Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-11-29 10:09:05 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request
>
> for you to fetch changes up to e6214fd6d48e704ed3aed6ea2053a9756d0ca13f:
>
>   chardev/char-mux: make boolean bit check instead of find_next_bit() (2024-12-02 16:23:12 +0400)
>
> ----------------------------------------------------------------
> chardev patch queue
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.2
for any user-visible changes.

-- PMM


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

* [PULL 0/2] chardev patches
@ 2024-12-03 13:39 marcandre.lureau
  2024-12-03 13:40 ` [PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation marcandre.lureau
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: marcandre.lureau @ 2024-12-03 13:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Paolo Bonzini, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit eb22a064455aeebc105cc89bf77f48aa18b52938:

  Merge tag 'pull-request-2024-12-02' of https://gitlab.com/thuth/qemu into staging (2024-12-02 16:16:15 +0000)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request

for you to fetch changes up to 3c8ab23fb30328111304cb8eab9bda769d52048f:

  chardev: Remove __-prefixed names (2024-12-03 16:09:19 +0400)

----------------------------------------------------------------
chardev patch queue

----------------------------------------------------------------

Nicholas Piggin (2):
  chardev: Fix record/replay error path NULL deref in device creation
  chardev: Remove __-prefixed names

 chardev/char.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

-- 
2.47.0



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

* [PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation
  2024-12-03 13:39 [PULL 0/2] chardev patches marcandre.lureau
@ 2024-12-03 13:40 ` marcandre.lureau
  2024-12-03 13:40 ` [PULL 2/2] chardev: Remove __-prefixed names marcandre.lureau
  2024-12-03 16:50 ` [PULL 0/2] chardev patches Peter Maydell
  2 siblings, 0 replies; 8+ messages in thread
From: marcandre.lureau @ 2024-12-03 13:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Paolo Bonzini, Marc-André Lureau,
	Nicholas Piggin

From: Nicholas Piggin <npiggin@gmail.com>

qemu_chardev_set_replay() was being called in chardev creation to
set up replay parameters even if the chardev is NULL.

A segfault can be reproduced by specifying '-serial chardev:bad' with
an rr=record mode.

Fix this with a NULL pointer check.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Resolves: Coverity CID 1559470
Fixes: 4c193bb129dae ("chardev: set record/replay on the base device of a muxed device")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240828043337.14587-2-npiggin@gmail.com>
---
 chardev/char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char.c b/chardev/char.c
index a1722aa076..1c7f6c711a 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -726,7 +726,7 @@ static Chardev *__qemu_chr_new(const char *label, const char *filename,
 
     if (strstart(filename, "chardev:", &p)) {
         chr = qemu_chr_find(p);
-        if (replay) {
+        if (replay && chr) {
             qemu_chardev_set_replay(chr, &err);
             if (err) {
                 error_report_err(err);
-- 
2.47.0



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

* [PULL 2/2] chardev: Remove __-prefixed names
  2024-12-03 13:39 [PULL 0/2] chardev patches marcandre.lureau
  2024-12-03 13:40 ` [PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation marcandre.lureau
@ 2024-12-03 13:40 ` marcandre.lureau
  2024-12-03 16:50 ` [PULL 0/2] chardev patches Peter Maydell
  2 siblings, 0 replies; 8+ messages in thread
From: marcandre.lureau @ 2024-12-03 13:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Paolo Bonzini, Marc-André Lureau,
	Nicholas Piggin

From: Nicholas Piggin <npiggin@gmail.com>

Peter points out double underscore prefix names tend to be reserved
for the system. Clean these up.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240828043337.14587-3-npiggin@gmail.com>
---
 chardev/char.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/chardev/char.c b/chardev/char.c
index 1c7f6c711a..d06698228a 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -633,8 +633,8 @@ static void qemu_chardev_set_replay(Chardev *chr, Error **errp)
     }
 }
 
-static Chardev *__qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
-                                         bool replay, Error **errp)
+static Chardev *do_qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
+                                          bool replay, Error **errp)
 {
     const ChardevClass *cc;
     Chardev *base = NULL, *chr = NULL;
@@ -712,12 +712,12 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
                                 Error **errp)
 {
     /* XXX: should this really not record/replay? */
-    return __qemu_chr_new_from_opts(opts, context, false, errp);
+    return do_qemu_chr_new_from_opts(opts, context, false, errp);
 }
 
-static Chardev *__qemu_chr_new(const char *label, const char *filename,
-                               bool permit_mux_mon, GMainContext *context,
-                               bool replay)
+static Chardev *qemu_chr_new_from_name(const char *label, const char *filename,
+                                       bool permit_mux_mon,
+                                       GMainContext *context, bool replay)
 {
     const char *p;
     Chardev *chr;
@@ -740,7 +740,7 @@ static Chardev *__qemu_chr_new(const char *label, const char *filename,
     if (!opts)
         return NULL;
 
-    chr = __qemu_chr_new_from_opts(opts, context, replay, &err);
+    chr = do_qemu_chr_new_from_opts(opts, context, replay, &err);
     if (!chr) {
         error_report_err(err);
         goto out;
@@ -765,7 +765,8 @@ out:
 Chardev *qemu_chr_new_noreplay(const char *label, const char *filename,
                                bool permit_mux_mon, GMainContext *context)
 {
-    return __qemu_chr_new(label, filename, permit_mux_mon, context, false);
+    return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
+                                  false);
 }
 
 static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
@@ -773,7 +774,8 @@ static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
                                           bool permit_mux_mon,
                                           GMainContext *context)
 {
-    return __qemu_chr_new(label, filename, permit_mux_mon, context, true);
+    return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
+                                  true);
 }
 
 Chardev *qemu_chr_new(const char *label, const char *filename,
-- 
2.47.0



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

* Re: [PULL 0/2] chardev patches
  2024-12-03 13:39 [PULL 0/2] chardev patches marcandre.lureau
  2024-12-03 13:40 ` [PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation marcandre.lureau
  2024-12-03 13:40 ` [PULL 2/2] chardev: Remove __-prefixed names marcandre.lureau
@ 2024-12-03 16:50 ` Peter Maydell
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2024-12-03 16:50 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel, Paolo Bonzini

On Tue, 3 Dec 2024 at 13:40, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The following changes since commit eb22a064455aeebc105cc89bf77f48aa18b52938:
>
>   Merge tag 'pull-request-2024-12-02' of https://gitlab.com/thuth/qemu into staging (2024-12-02 16:16:15 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-request
>
> for you to fetch changes up to 3c8ab23fb30328111304cb8eab9bda769d52048f:
>
>   chardev: Remove __-prefixed names (2024-12-03 16:09:19 +0400)
>
> ----------------------------------------------------------------
> chardev patch queue
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.2
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2024-12-03 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 13:39 [PULL 0/2] chardev patches marcandre.lureau
2024-12-03 13:40 ` [PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation marcandre.lureau
2024-12-03 13:40 ` [PULL 2/2] chardev: Remove __-prefixed names marcandre.lureau
2024-12-03 16:50 ` [PULL 0/2] chardev patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2024-12-02 12:27 marcandre.lureau
2024-12-02 16:15 ` Peter Maydell
2024-10-09  8:39 marcandre.lureau
2024-10-09 19:11 ` Peter Maydell

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