Re: + kasan-emit-different-calls-for-instrumentable-memintrinsics.patch added to mm-hotfixes-unstable branch

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

 



On Sun, Feb 26, 2023 at 8:41 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, 26 Feb 2023 11:59:55 +0100 Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> > On Sat, Feb 25, 2023 at 09:03:40PM -0800, Andrew Morton wrote:
> > > --- a/mm/kasan/shadow.c~kasan-emit-different-calls-for-instrumentable-memintrinsics
> > > +++ b/mm/kasan/shadow.c
> > > @@ -107,6 +107,17 @@ void *__asan_memcpy(void *dest, const void *src, size_t len)
> > >  }
> > >  EXPORT_SYMBOL(__asan_memcpy);
> > >
> > > +#ifdef CONFIG_KASAN_SW_TAGS
> > > +void *__hwasan_memset(void *addr, int c, size_t len) __alias(__asan_memset);
> > > +EXPORT_SYMBOL(__hwasan_memset);
> > > +#ifdef __HAVE_ARCH_MEMMOVE
> > > +void *__hwasan_memmove(void *dest, const void *src, size_t len) __alias(__asan_memmove);
> > > +EXPORT_SYMBOL(__hwasan_memmove);
> > > +#endif
> > > +void *__hwasan_memcpy(void *dest, const void *src, size_t len) __alias(__asan_memcpy);
> > > +EXPORT_SYMBOL(__hwasan_memcpy);
> >
> > Any particular reason those exports are not _GPL?

Not using _GPL will allow using KASAN with non-GPL modules AFAIU. I
don't see why this should be forbidden.

> mm/kasan/ is an exotic blend of both.  Perhaps the maintainers will
> take a look at this sometime?

All of the _GPL exports in mm/kasan/ are for symbols required for
KASAN tests. If there was a way to only export them for kasan_test.ko,
we could use that instead. _GPL is used as a best-effort marking.

Everything else is using EXPORT_SYMBOL().



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux