All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] improve error handling for module load
@ 2022-09-08 14:53 Claudio Fontana
  2022-09-08 14:53 ` [PATCH v3 1/3] module: removed unused function argument "mayfail" Claudio Fontana
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Claudio Fontana @ 2022-09-08 14:53 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Markus Armbruster
  Cc: qemu-devel, dinechin, Gerd Hoffmann, Marc-André Lureau,
	Daniel P . Berrangé, Philippe Mathieu-Daudé,
	Claudio Fontana

CHANGELOG:

v2 -> v3:

* take the file existence check outside of module_load_file,
  rename module_load_file to module_load_dso, will be called only on
  an existing file. This will simplify the return value. (Richard)

v1 -> v2:

* do not treat the display help text any differently and do report
  module load _errors_. If the module does not exist (ENOENT, ENOTDIR),
  no error will be produced.

DESCRIPTION:

while investigating a permission issue in accel, where accel-tcg-x86_64.so
was not accessible, I noticed that no errors were produced regarding the
module load failure.

This series attempts to improve module_load_one and module_load_qom_one
to handle the error cases better and produce some errors.

Patch 1 is already reviewed and is about removing an unused existing
argument "mayfail" from the call stack.

Patch 2 is the real meat, and that one I would say is RFC.
Will follow up with comments on the specific questions I have.

Patch 3 finally adds a simple check in accel/, aborting if a module
is not found, but relying on the existing error report from
module_load_qom_one.

Claudio Fontana (3):
  module: removed unused function argument "mayfail"
  module: add Error arguments to module_load_one and module_load_qom_one
  accel: abort if we fail to load the accelerator plugin

 accel/accel-softmmu.c |   8 ++-
 audio/audio.c         |   6 +-
 block.c               |  12 +++-
 block/dmg.c           |  10 ++-
 hw/core/qdev.c        |  10 ++-
 include/qemu/module.h |  27 ++++++--
 qom/object.c          |  15 ++++-
 softmmu/qtest.c       |   6 +-
 ui/console.c          |  18 ++++-
 util/module.c         | 152 +++++++++++++++++++++++++-----------------
 10 files changed, 183 insertions(+), 81 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH RESEND v3 0/3] improve error handling for module load
@ 2022-09-08 15:00 Claudio Fontana
  2022-09-08 15:00 ` [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one Claudio Fontana
  0 siblings, 1 reply; 22+ messages in thread
From: Claudio Fontana @ 2022-09-08 15:00 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Markus Armbruster
  Cc: qemu-devel, dinechin, Gerd Hoffmann, Marc-André Lureau,
	Daniel P . Berrangé, Philippe Mathieu-Daudé,
	Claudio Fontana

CHANGELOG:

v2 -> v3:

* take the file existence check outside of module_load_file,
  rename module_load_file to module_load_dso, will be called only on
  an existing file. This will simplify the return value. (Richard)

* move exported function documentation into header files (Richard)

v1 -> v2:

* do not treat the display help text any differently and do report
  module load _errors_. If the module does not exist (ENOENT, ENOTDIR),
  no error will be produced.

DESCRIPTION:

while investigating a permission issue in accel, where accel-tcg-x86_64.so
was not accessible, I noticed that no errors were produced regarding the
module load failure.

This series attempts to improve module_load_one and module_load_qom_one
to handle the error cases better and produce some errors.

Patch 1 is already reviewed and is about removing an unused existing
argument "mayfail" from the call stack.

Patch 2 is the real meat, and that one I would say is RFC.
Will follow up with comments on the specific questions I have.

Patch 3 finally adds a simple check in accel/, aborting if a module
is not found, but relying on the existing error report from
module_load_qom_one.

Claudio Fontana (3):
  module: removed unused function argument "mayfail"
  module: add Error arguments to module_load_one and module_load_qom_one
  accel: abort if we fail to load the accelerator plugin

 accel/accel-softmmu.c |   8 ++-
 audio/audio.c         |   6 +-
 block.c               |  12 +++-
 block/dmg.c           |  10 ++-
 hw/core/qdev.c        |  10 ++-
 include/qemu/module.h |  38 +++++++++--
 qom/object.c          |  15 ++++-
 softmmu/qtest.c       |   6 +-
 ui/console.c          |  18 +++++-
 util/module.c         | 142 ++++++++++++++++++++++++------------------
 10 files changed, 184 insertions(+), 81 deletions(-)

-- 
2.26.2



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

end of thread, other threads:[~2022-09-23 22:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 14:53 [PATCH v3 0/3] improve error handling for module load Claudio Fontana
2022-09-08 14:53 ` [PATCH v3 1/3] module: removed unused function argument "mayfail" Claudio Fontana
2022-09-08 14:53 ` [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one Claudio Fontana
2022-09-08 16:03   ` Richard Henderson
2022-09-08 17:10     ` Claudio Fontana
2022-09-08 17:36       ` Claudio Fontana
2022-09-20 16:50         ` Kevin Wolf
2022-09-21  4:45           ` Markus Armbruster
2022-09-21 11:43             ` Kevin Wolf
2022-09-21 12:08               ` Markus Armbruster
2022-09-22 14:33                 ` Kevin Wolf
2022-09-22 15:09                   ` Markus Armbruster
2022-09-21  7:50           ` Claudio Fontana
2022-09-21 11:56             ` Kevin Wolf
2022-09-23 14:10               ` Claudio Fontana
2022-09-23 14:42                 ` Kevin Wolf
2022-09-23 14:46                   ` Claudio Fontana
2022-09-23 16:29                     ` Kevin Wolf
2022-09-23 22:23                       ` Claudio Fontana
2022-09-08 14:53 ` [PATCH v3 3/3] accel: abort if we fail to load the accelerator plugin Claudio Fontana
2022-09-08 16:03   ` Richard Henderson
2022-09-08 15:00 [PATCH RESEND v3 0/3] improve error handling for module load Claudio Fontana
2022-09-08 15:00 ` [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one Claudio Fontana

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.