[PATCH 0/3] improve error handling for module load

Claudio Fontana posted 3 patches 1 year, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220906115501.28581-1-cfontana@suse.de
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
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 |  10 +--
qom/object.c          |  15 +++-
softmmu/qtest.c       |   6 +-
ui/console.c          |  19 ++++-
util/module.c         | 157 ++++++++++++++++++++++++++++++------------
10 files changed, 189 insertions(+), 64 deletions(-)
[PATCH 0/3] improve error handling for module load
Posted by Claudio Fontana 1 year, 7 months ago
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 |  10 +--
 qom/object.c          |  15 +++-
 softmmu/qtest.c       |   6 +-
 ui/console.c          |  19 ++++-
 util/module.c         | 157 ++++++++++++++++++++++++++++++------------
 10 files changed, 189 insertions(+), 64 deletions(-)

-- 
2.26.2