[PATCH 0/6] Fix current CI failures and document behaviour

Peter Krempa via Devel posted 6 patches 6 days, 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1774605192.git.pkrempa@redhat.com
src/conf/virsecretobj.c |   3 -
src/util/virfile.c      | 145 +++++++++++++++++++++++++++++++++++-----
src/util/virnetdevip.c  |   4 --
src/util/virpci.c       |  10 +--
4 files changed, 135 insertions(+), 27 deletions(-)
[PATCH 0/6] Fix current CI failures and document behaviour
Posted by Peter Krempa via Devel 6 days, 5 hours ago
Fix the CI failure I've caused, one more instance of the same problem
that didn't yet cause write beyound buffer, document all the functions
to prevent users from guessing and remove redundant code.

The last function also optimizes further to prevent over-allocating the
buffers to read the files.

Peter Krempa (6):
  virPCIDeviceReadClass: Don't write beyond end of buffer from
    virFileReadAll
  virSecretLoadValue: Don't re-termiante the buffer
  virNetDevIPCheckIPv6Forwarding: Don't NUL terminate buffer from
    virFileReadAll
  virPCIDeviceReadID: Fix use of 'virFileReadAll'
  util: virfile: Document the various functions for reading from file/fd
  util: virfile: Don't over-allocate buffers in saferead_lim

 src/conf/virsecretobj.c |   3 -
 src/util/virfile.c      | 145 +++++++++++++++++++++++++++++++++++-----
 src/util/virnetdevip.c  |   4 --
 src/util/virpci.c       |  10 +--
 4 files changed, 135 insertions(+), 27 deletions(-)

-- 
2.53.0
Re: [PATCH 0/6] Fix current CI failures and document behaviour
Posted by Pavel Hrdina via Devel 6 days, 5 hours ago
On Fri, Mar 27, 2026 at 10:54:35AM +0100, Peter Krempa via Devel wrote:
> Fix the CI failure I've caused, one more instance of the same problem
> that didn't yet cause write beyound buffer, document all the functions
> to prevent users from guessing and remove redundant code.
> 
> The last function also optimizes further to prevent over-allocating the
> buffers to read the files.
> 
> Peter Krempa (6):
>   virPCIDeviceReadClass: Don't write beyond end of buffer from
>     virFileReadAll
>   virSecretLoadValue: Don't re-termiante the buffer
>   virNetDevIPCheckIPv6Forwarding: Don't NUL terminate buffer from
>     virFileReadAll
>   virPCIDeviceReadID: Fix use of 'virFileReadAll'
>   util: virfile: Document the various functions for reading from file/fd
>   util: virfile: Don't over-allocate buffers in saferead_lim

With the typos fixed.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>