lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 12 Jan 2021 19:10:09 +0100 From: Andrey Konovalov <andreyknvl@...gle.com> To: Alexander Potapenko <glider@...gle.com> Cc: Catalin Marinas <catalin.marinas@....com>, Vincenzo Frascino <vincenzo.frascino@....com>, Dmitry Vyukov <dvyukov@...gle.com>, Marco Elver <elver@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>, Will Deacon <will.deacon@....com>, Andrey Ryabinin <aryabinin@...tuozzo.com>, Evgenii Stepanov <eugenis@...gle.com>, Branislav Rankov <Branislav.Rankov@....com>, Kevin Brodsky <kevin.brodsky@....com>, kasan-dev <kasan-dev@...glegroups.com>, Linux ARM <linux-arm-kernel@...ts.infradead.org>, Linux Memory Management List <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 04/11] kasan: add match-all tag tests On Tue, Jan 12, 2021 at 9:05 AM Alexander Potapenko <glider@...gle.com> wrote: > > On Tue, Jan 5, 2021 at 7:28 PM Andrey Konovalov <andreyknvl@...gle.com> wrote: > > > > Add 3 new tests for tag-based KASAN modes: > > > > 1. Check that match-all pointer tag is not assigned randomly. > > 2. Check that 0xff works as a match-all pointer tag. > > 3. Check that there are no match-all memory tags. > > > > Note, that test #3 causes a significant number (255) of KASAN reports > > to be printed during execution for the SW_TAGS mode. > > > > Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com> > > Link: https://linux-review.googlesource.com/id/I78f1375efafa162b37f3abcb2c5bc2f3955dfd8e > > --- > > lib/test_kasan.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ > > mm/kasan/kasan.h | 6 ++++ > > 2 files changed, 99 insertions(+) > > > > diff --git a/lib/test_kasan.c b/lib/test_kasan.c > > index 46e578c8e842..f1eda0bcc780 100644 > > --- a/lib/test_kasan.c > > +++ b/lib/test_kasan.c > > @@ -13,6 +13,7 @@ > > #include <linux/mman.h> > > #include <linux/module.h> > > #include <linux/printk.h> > > +#include <linux/random.h> > > #include <linux/slab.h> > > #include <linux/string.h> > > #include <linux/uaccess.h> > > @@ -790,6 +791,95 @@ static void vmalloc_oob(struct kunit *test) > > vfree(area); > > } > > > > +/* > > + * Check that match-all pointer tag is not assigned randomly for > > + * tag-based modes. > > + */ > > +static void match_all_not_assigned(struct kunit *test) > > +{ > > Do we want to run this test in non-tag-based modes? Probably not? Will fix in v2, thanks!
Powered by blists - more mailing lists