Re: [PATCH v4 29/45] block: kmsan: skip bio block merging logic for KMSAN

Marco Elver
2022-07-13T10:23:14Z

On Fri, Jul 01, 2022 at 04:22PM +0200, 'Alexander Potapenko' via kasan-dev wrote:
[...]
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -867,6 +867,8 @@ static inline bool page_is_mergeable(const struct bio_vec *bv,
> return false;
>
> *same_page = ((vec_end_addr & PAGE_MASK) == page_addr);
> + if (!*same_page && IS_ENABLED(CONFIG_KMSAN))
> + return false;
> if (*same_page)
> return true;

if (*same_page)
return true;
else if (IS_ENABLED(CONFIG_KMSAN))
return false;

> return (bv->bv_page + bv_end / PAGE_SIZE) == (page + off / PAGE_SIZE);