Re: [PATCH 26/32] s390/mm: Define KMSAN metadata for vmalloc and modules

Alexander Gordeev
2023-11-17T16:42:32Z

On Thu, Nov 16, 2023 at 04:03:13PM +0100, Alexander Potapenko wrote:

Hi Alexander!

> > /* allow vmalloc area to occupy up to about 1/2 of the rest virtual space left */
> > vmalloc_size = min(vmalloc_size, round_down(VMALLOC_END / 2, _REGION3_SIZE));
> > +#ifdef CONFIG_KMSAN
> > + /* take 2/3 of vmalloc area for KMSAN shadow and origins */
> > + vmalloc_size = round_down(vmalloc_size / 3, PAGE_SIZE);
> Is it okay that vmalloc_size is only aligned on PAGE_SIZE?
> E.g. above the alignment is _REGION3_SIZE.

Good question!

This patch does not break anything, although the _REGION3_SIZE
alignment would be consistent here. Yet, we might rethink this
whole code piece and the next version would reflect that.

Thanks!