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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG_fn=WDOu2sRv_RhRm8XhgCAgVJsMaPXp9TbcaknTn_84cNOg@mail.gmail.com>
Date: Thu, 31 Jul 2025 10:02:45 +0200
From: Alexander Potapenko <glider@...gle.com>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: quic_jiangenj@...cinc.com, linux-kernel@...r.kernel.org, 
	kasan-dev@...glegroups.com, Aleksandr Nogikh <nogikh@...gle.com>, 
	Andrey Konovalov <andreyknvl@...il.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>, 
	Josh Poimboeuf <jpoimboe@...nel.org>, Marco Elver <elver@...gle.com>, 
	Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v3 09/10] kcov: selftests: add kcov_test

On Tue, Jul 29, 2025 at 1:20 PM Dmitry Vyukov <dvyukov@...gle.com> wrote:
>
> On Mon, 28 Jul 2025 at 17:26, Alexander Potapenko <glider@...gle.com> wrote:
> >
> > Implement test fixtures for testing different combinations of coverage
> > collection modes:
> >  - unique and non-unique coverage;
> >  - collecting PCs and comparison arguments;
> >  - mapping the buffer as RO and RW.
> >
> > To build:
> >  $ make -C tools/testing/selftests/kcov kcov_test
> >
> > Signed-off-by: Alexander Potapenko <glider@...gle.com>
> > ---
> > v3:
> >  - Address comments by Dmitry Vyukov:
> >    - add tools/testing/selftests/kcov/config
> >    - add ifdefs to KCOV_UNIQUE_ENABLE and KCOV_RESET_TRACE
> >  - Properly handle/reset the coverage buffer when collecting unique
> >    coverage
> >
> > Change-Id: I0793f1b91685873c77bcb222a03f64321244df8f
> > ---
> >  MAINTAINERS                              |   1 +
> >  tools/testing/selftests/kcov/Makefile    |   6 +
> >  tools/testing/selftests/kcov/config      |   1 +
> >  tools/testing/selftests/kcov/kcov_test.c | 401 +++++++++++++++++++++++
> >  4 files changed, 409 insertions(+)
> >  create mode 100644 tools/testing/selftests/kcov/Makefile
> >  create mode 100644 tools/testing/selftests/kcov/config
> >  create mode 100644 tools/testing/selftests/kcov/kcov_test.c
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 6906eb9d88dae..c1d64cef693b9 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -13018,6 +13018,7 @@ F:      include/linux/kcov_types.h
> >  F:     include/uapi/linux/kcov.h
> >  F:     kernel/kcov.c
> >  F:     scripts/Makefile.kcov
> > +F:     tools/testing/selftests/kcov/
> >
> >  KCSAN
> >  M:     Marco Elver <elver@...gle.com>
> > diff --git a/tools/testing/selftests/kcov/Makefile b/tools/testing/selftests/kcov/Makefile
> > new file mode 100644
> > index 0000000000000..08abf8b60bcf9
> > --- /dev/null
> > +++ b/tools/testing/selftests/kcov/Makefile
> > @@ -0,0 +1,6 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +LDFLAGS += -static
> > +
> > +TEST_GEN_PROGS := kcov_test
> > +
> > +include ../lib.mk
> > diff --git a/tools/testing/selftests/kcov/config b/tools/testing/selftests/kcov/config
> > new file mode 100644
> > index 0000000000000..75726b2aa9979
> > --- /dev/null
> > +++ b/tools/testing/selftests/kcov/config
> > @@ -0,0 +1 @@
> > +CONFIG_KCOV=y
>
> Doesn't it also need CONFIG_KCOV_UNIQUE=y since it tests the unique
> mode as well?

You are right, I missed that.
Another option would be to skip the test under #ifndef
CONFIG_KCOV_UNIQUE, but I think for KCOV developers it is important to
enable all the necessary config options.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ