public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Cermak <mcermak@redhat.com>
Cc: valgrind-developers@lists.sourceforge.net, ltp@lists.linux.it
Subject: Re: [LTP] Avoid syscall param ioctl(generic) points to uninitialised byte(s)
Date: Wed, 15 Apr 2026 12:18:20 +0200	[thread overview]
Message-ID: <ad9l7MeJneX1LdCe@yuki.lan> (raw)
In-Reply-To: <20260414114758.7xtei7hyddxu2fic@lida.tpb.lab.eng.brq.redhat.com>

Hi!
> From b81924101f441d7f2103197c8b81a38e8920fda4 Mon Sep 17 00:00:00 2001
> From: Super User <root@vm-10-0-185-15.hosted.upshift.rdu2.redhat.com>
> Date: Wed, 20 Jan 2038 01:08:34 -0500
> Subject: [PATCH] Avoid syscall param ioctl(generic) points to uninitialised
>  byte(s)
> 
> lib/tst_clocks.c: fix uninitialized memory in run()  Reproducible
>                   using userfaultfd01.

This description does not seem to correspond to the actual change.

> Signed-off-by: Martin Cermak <mcermak@redhat.com>
> ---
>  testcases/kernel/syscalls/userfaultfd/userfaultfd01.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
> index 7368d3863..d24766e7c 100644
> --- a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
> +++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
> @@ -92,8 +92,8 @@ static void *handle_thread(void)
>  static void run(unsigned int i)
>  {
>  	pthread_t thr;
> -	struct uffdio_api uffdio_api = {};
> -	struct uffdio_register uffdio_register;
> +	struct uffdio_api uffdio_api = {0, };
> +	struct uffdio_register uffdio_register = {0, };

Given that we were using = {}; in the code before can we keep using that
and for all instances?

Also I assume the problem is the ioctls field in the uffdio_api
structure that is not initialized beacuse is supposed to be set by
kernel before returning into userspace. Should valgrind warn about such
cases?


-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-04-15 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 11:47 [LTP] Avoid syscall param ioctl(generic) points to uninitialised byte(s) Martin Cermak via ltp
2026-04-14 12:44 ` linuxtestproject.agent
2026-04-15 10:18 ` Cyril Hrubis [this message]
2026-04-16  9:21   ` Martin Cermak via ltp
2026-04-16 10:07     ` Cyril Hrubis
2026-04-16 12:39       ` Martin Cermak via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad9l7MeJneX1LdCe@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mcermak@redhat.com \
    --cc=valgrind-developers@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox