Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Alexander Potapenko
> > Is there a possibility for infinite recursion here? E.g. can > > `lowcore_ptr[raw_smp_processor_id()]` point somewhere in between > > `(void *)&S390_lowcore` and `(void *)(&S390_lowcore + 1))`? > > No, it's allocated with __get_free_pages() or memblock_alloc_low(). > But since this question cam

Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Ilya Leoshkevich
On Mon, 2023-12-11 at 11:26 +0100, Alexander Potapenko wrote: > > +static inline void *arch_kmsan_get_meta_or_null(void *addr, bool > > is_origin) > > +{ > > +   if (addr >= (void *)&S390_lowcore && > > +   addr < (void *)(&S390_lowcore + 1)) { > > +   /* > > +  

Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Alexander Potapenko
> +static inline void *arch_kmsan_get_meta_or_null(void *addr, bool is_origin) > +{ > + if (addr >= (void *)&S390_lowcore && > + addr < (void *)(&S390_lowcore + 1)) { > + /* > +* Different lowcores accessed via S390_lowcore are described > +

[PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-11-21 Thread Ilya Leoshkevich
arch_kmsan_get_meta_or_null() finds the lowcore shadow by querying the prefix and calling kmsan_get_metadata() again. kmsan_virt_addr_valid() delegates to virt_addr_valid(). Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/kmsan.h | 36 +++ 1 file change