Re: [PATCH v5 02/38] kmsan: add ReST documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +The function name depends on the memory access size.
> > +Each such function also checks if the shadow of the memory in the range
> > +[``addr``, ``addr + n``) is contiguous and reports an error otherwise.
>
> Makes sense to refer to the "Metadata allocation" section here, which
> explains what happens in case of an error.

Will do.

> > +
> > +LSB of the ``shadow`` pointer in a ``struct page`` may be set to 1. In this case
> > +shadow and origin pages are allocated, but KMSAN ignores accesses to them by
> > +falling back to dummy pages. Allocating the metadata pages is still needed to
> > +support ``vmap()/vunmap()`` operations on this struct page.
>
> This part is not clear. We allocate shadow for vmap()'ed regions but
> don't do any initialization checks for that memory?

Changed as follows:

LSB of the ``shadow`` pointer in a ``struct page`` may be set to 1. In this case
shadow and origin pages are allocated, but KMSAN ignores accesses to them by
falling back to dummy pages. Because this ``struct page`` could be used in a
virtual mapping, we still allocate metadata for it. Accesses to such virtual
mappings will be ignored by KMSAN as well.


>
> Nit: some sections have empty lines after the section header, while
> others don't.

Fixed that, thank you!




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux