Re: [PATCH v6 6/44] kmsan: add ReST documentation
From: Alexander Potapenko
Date: Mon Nov 07 2022 - 09:30:25 EST
On Tue, Sep 6, 2022 at 5:10 AM Bagas Sanjaya <bagasdotme@xxxxxxxxx> wrote:
>
Uh-oh, somehow missed this letter during the review process.
> > + CPU: 0 PID: 6731 Comm: kunit_try_catch Tainted: G B E 5.16.0-rc3+ #104
> > + Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
> > + =====================================================
>
> Are these table markers in the code block above part of kmsan output?
Correct.
>
> > +A use of uninitialized value ``v`` is reported by KMSAN in the following cases:
> > + - in a condition, e.g. ``if (v) { ... }``;
> > + - in an indexing or pointer dereferencing, e.g. ``array[v]`` or ``*v``;
> > + - when it is copied to userspace or hardware, e.g. ``copy_to_user(..., &v, ...)``;
> > + - when it is passed as an argument to a function, and
> > + ``CONFIG_KMSAN_CHECK_PARAM_RETVAL`` is enabled (see below).
>
> The sentence before the list above is rendered as definition list term
> instead, so I add the blank line separator:
>
> ---- >8 ----
>
> diff --git a/Documentation/dev-tools/kmsan.rst b/Documentation/dev-tools/kmsan.rst
> index 2a53a801198cbf..55fa82212eb255 100644
> --- a/Documentation/dev-tools/kmsan.rst
> +++ b/Documentation/dev-tools/kmsan.rst
> @@ -67,6 +67,7 @@ uninitialized in the local variable, as well as the stack where the value was
> copied to another memory location before use.
>
> A use of uninitialized value ``v`` is reported by KMSAN in the following cases:
> +
> - in a condition, e.g. ``if (v) { ... }``;
> - in an indexing or pointer dereferencing, e.g. ``array[v]`` or ``*v``;
> - when it is copied to userspace or hardware, e.g. ``copy_to_user(..., &v, ...)``;
Nice catch, thank you! Sent a patch to fix this.
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg