[PATCH 0/2] linux-user/gen-vdso: minor error handling improvements

Peter Maydell posted 2 patches 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250710170707.1299926-1-peter.maydell@linaro.org
Maintainers: Laurent Vivier <laurent@vivier.eu>
linux-user/gen-vdso.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
[PATCH 0/2] linux-user/gen-vdso: minor error handling improvements
Posted by Peter Maydell 5 months, 1 week ago
These two small patches improve the error handling in the gen-vdso
program. Error handling isn't particularly critical here because
the tool only gets run during the QEMU build process on input
that we trust (because we generated it by calling a compiler
for the guest architecture), but these were easy to do.

The main motivation here is that Coverity complained about not
checking fseek()'s return value.

thanks
-- PMM

Peter Maydell (2):
  linux-user/gen-vdso: Handle fseek() failure
  linux-user/gen-vdso: Don't write off the end of buf[]

 linux-user/gen-vdso.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

-- 
2.43.0
Re: [PATCH 0/2] linux-user/gen-vdso: minor error handling improvements
Posted by Richard Henderson 5 months, 1 week ago
On 7/10/25 11:07, Peter Maydell wrote:
> These two small patches improve the error handling in the gen-vdso
> program. Error handling isn't particularly critical here because
> the tool only gets run during the QEMU build process on input
> that we trust (because we generated it by calling a compiler
> for the guest architecture), but these were easy to do.
> 
> The main motivation here is that Coverity complained about not
> checking fseek()'s return value.
> 
> thanks
> -- PMM
> 
> Peter Maydell (2):
>    linux-user/gen-vdso: Handle fseek() failure
>    linux-user/gen-vdso: Don't write off the end of buf[]
> 
>   linux-user/gen-vdso.c | 16 ++++++++++++++--
>   1 file changed, 14 insertions(+), 2 deletions(-)
> 

Queued, thanks.

r~
Re: [PATCH 0/2] linux-user/gen-vdso: minor error handling improvements
Posted by Peter Maydell 5 months, 1 week ago
On Thu, 10 Jul 2025 at 18:58, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 7/10/25 11:07, Peter Maydell wrote:
> > These two small patches improve the error handling in the gen-vdso
> > program. Error handling isn't particularly critical here because
> > the tool only gets run during the QEMU build process on input
> > that we trust (because we generated it by calling a compiler
> > for the guest architecture), but these were easy to do.
> >
> > The main motivation here is that Coverity complained about not
> > checking fseek()'s return value.
> >
> > thanks
> > -- PMM
> >
> > Peter Maydell (2):
> >    linux-user/gen-vdso: Handle fseek() failure
> >    linux-user/gen-vdso: Don't write off the end of buf[]
> >
> >   linux-user/gen-vdso.c | 16 ++++++++++++++--
> >   1 file changed, 14 insertions(+), 2 deletions(-)
> >
>
> Queued, thanks.

Would you mind fixing up the read/write thinko in the subject
line of patch 2?

thanks
-- PMM