On Thu, 14 Jan 2021 at 08:50, Alexander Potapenko wrote:
>
> On Wed, Jan 13, 2021 at 10:10 PM Steven Rostedt wrote:
> >
> > On Wed, 13 Jan 2021 10:16:54 +0100
> > Alexander Potapenko wrote:
> >
> > > +DECLARE_EVENT_CLASS(error_report_template,
> > > + TP_PROTO(const char
On Fri, 15 Jan 2021 at 22:58, Paul E. McKenney wrote:
> This one seemed straightforward and I heard no objections to the previous
> two-patch series, so I queued them for the v5.13 merge window, thank you!
>
> If any of them need adjustment, please send me the updated patch and
> tell me which
On Sat, 16 Jan 2021 at 00:31, Paul E. McKenney wrote:
> On Sat, Jan 16, 2021 at 12:21:53AM +0100, Marco Elver wrote:
> > On Fri, 15 Jan 2021 at 22:58, Paul E. McKenney wrote:
> >
> > > This one seemed straightforward and I heard no objections to the previous
> > &
On Thu, 21 Jan 2021 at 19:30, syzbot
wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:9791581c Merge tag 'for-5.11-rc4-tag' of git://git.kernel...
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=13cd09a4d0
> kernel
.googlesource.com/id/Ib3694ed90b1e8ccac6cf77dfd301847af4aba7b8
> Signed-off-by: Andrey Konovalov
Thanks for the simplification.
Reviewed-by: Marco Elver
> ---
> Documentation/dev-tools/kasan.rst | 27 +++
> mm/kasan/hw_tags.c| 77 +--
w.googlesource.com/id/I237484a7fddfedf4a4aae9cc61ecbcdbe85a0a63
> Suggested-by: Alexander Potapenko
> Signed-off-by: Andrey Konovalov
Nice!
Reviewed-by: Marco Elver
> ---
> lib/test_kasan.c | 101 +++
> 1 file changed, 31 insertions(+), 70 deletions(-)
>
00bf36388d55
> Signed-off-by: Andrey Konovalov
Reviewed-by: Marco Elver
> ---
> lib/test_kasan.c | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index 283feda9882a..a1a35d75ee1e 100644
> --- a/lib/test_kasan.
On Wed, 13 Jan 2021 at 17:22, Andrey Konovalov wrote:
>
> Don't run KASAN tests when it's disabled with kasan.mode=off to avoid
> corrupting kernel memory.
>
> Link:
> https://linux-review.googlesource.com/id/I6447af436a69a94bfc35477f6bf4e2122948355e
> Signed-off-by: Andrey Konovalov
> ---
>
l fail.
>
> Add compiler barriers around the expression in KUNIT_EXPECT_KASAN_FAIL
> and use READ/WRITE_ONCE() for accessing fail_data fields.
>
> Link:
> https://linux-review.googlesource.com/id/I046079f48641a1d36fe627fc8827a9249102fd50
> Signed-off-by: Andrey Konovalov
Rev
On Wed, 13 Jan 2021 at 17:21, Andrey Konovalov wrote:
>
> Clarify and update comments in KASAN tests.
>
> Link:
> https://linux-review.googlesource.com/id/I6c816c51fa1e0eb7aa3dead6bda1f339d2af46c8
> Signed-off-by: Andrey Konovalov
Reviewed-by: Marco Elver
> --
On Wed, 13 Jan 2021 at 17:22, Andrey Konovalov wrote:
>
> Add a test for kmem_cache_alloc/free_bulk to make sure there are now
> false-positives when these functions are used.
s/now/no/ (but by itself doesn't necessarily demand a v3)
> Link:
>
> Note, that test #3 causes a significant number (255) of KASAN reports
> to be printed during execution for the SW_TAGS mode.
>
> Link:
> https://linux-review.googlesource.com/id/I78f1375efafa162b37f3abcb2c5bc2f3955dfd8e
> Signed-off-by: Andrey Konovalov
Reviewed-by: Marco
On Wed, 13 Jan 2021 at 17:22, Andrey Konovalov wrote:
>
> The currently existing kasan_check_read/write() annotations are intended
> to be used for kernel modules that have KASAN compiler instrumentation
> disabled. Thus, they are only relevant for the software KASAN modes that
> rely on compiler
On Thu, 14 Jan 2021 at 19:01, 'Andrey Konovalov' via kasan-dev
wrote:
> On Wed, Jan 13, 2021 at 5:54 PM Marco Elver wrote:
> >
> > > +/*
> > > + * Unlike kasan_check_read/write(), kasan_check_byte() is performed even
> > > for
> > > + * the hardware
On Thu, 14 Jan 2021 at 19:07, Nick Desaulniers wrote:
> On Thu, Jan 14, 2021 at 4:38 AM 'Dmitry Vyukov' via Clang Built Linux
> wrote:
> >
> > On Thu, Jan 14, 2021 at 12:32 PM Dmitry Vyukov wrote:
> > >
> > > On Tue, Jan 12, 2021 at 8:41 PM Nathan Chancellor
> > > wrote:
> > > >
> > > > Would
On Tue, 12 Jan 2021 at 21:32, Nathan Chancellor
wrote:
>
> On Tue, Jan 12, 2021 at 12:40:58PM -0700, Nathan Chancellor wrote:
> > On Tue, Jan 12, 2021 at 11:20:27AM -0800, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following issue on:
> > >
> > > HEAD commit:e609571b Merge tag
On Tue, 12 Jan 2021 at 22:16, Andrey Konovalov wrote:
>
> On Tue, Jan 12, 2021 at 3:32 PM Marco Elver wrote:
> >
> > > +/*
> > > + * Unlike kasan_check_read/write(), kasan_check_byte() is performed even
> > > for
> > > + * the hardw
for unreferenced
> undefined symbols so the module loader is reading too much. If we ever
> need to ignore more symbols, the code should be refactored to ignore
> unreferenced symbols.
>
> Reported-by: Marco Elver
> Link: https://github.com/ClangBuiltLinux/linux/issues/12
: Andrey Konovalov
Reviewed-by: Marco Elver
> ---
> lib/test_kasan.c | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index a96376aa7293..6238b56127f8 100644
> --- a/lib/test_kasan.c
> +++ b/lib/test_kasan.c
3d
> Signed-off-by: Andrey Konovalov
Reviewed-by: Marco Elver
> ---
> lib/test_kasan.c | 38 +-
> 1 file changed, 33 insertions(+), 5 deletions(-)
>
> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index ab22a653762e..a96376aa7293 100644
>
> Now that KASAN has inline wrappers for all of its annotations, move
> _RET_IP_ to those wrappers to simplify annotation call sites.
>
> Link:
> https://linux-review.googlesource.com/id/I8fb3c06d49671305ee184175a39591bc26647a67
> Signed-off-by: Andrey Konovalov
Much ni
nd via plain accesses that happen later.
>
> Link:
> https://linux-review.googlesource.com/id/Iaabf771881d0f9ce1b969f2a62938e99d3308ec5
> Signed-off-by: Andrey Konovalov
Reviewed-by: Marco Elver
> ---
> include/linux/kasan-checks.h | 6 ++
> include
Adds missing license and/or copyright headers for KCSAN source files.
Signed-off-by: Marco Elver
---
Documentation/dev-tools/kcsan.rst | 3 +++
include/linux/kcsan-checks.h | 6 ++
include/linux/kcsan.h | 7 +++
kernel/kcsan/atomic.h | 5 +
kernel/kcsan
Add missing copyright and description headers to KFENCE source files.
Signed-off-by: Marco Elver
---
If appropriate, to be squashed into:
mm: add Kernel Electric-Fence infrastructure
---
include/linux/kfence.h | 6 ++
mm/kfence/core.c | 5 +
mm/kfence/kfence.h | 6
Add missing copyright and description header to KFENCE source file.
Signed-off-by: Marco Elver
---
If appropriate, to be squashed into:
x86, kfence: enable KFENCE for x86
---
arch/x86/include/asm/kfence.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/include/asm
Add missing copyright header to KFENCE documentation.
Signed-off-by: Marco Elver
---
If appropriate, to be squashed into:
kfence, Documentation: add KFENCE documentation
---
Documentation/dev-tools/kfence.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/dev-tools
Add missing copyright and description header to KFENCE source file.
Signed-off-by: Marco Elver
---
If appropriate, to be squashed into:
arm64, kfence: enable KFENCE for ARM64
---
arch/arm64/include/asm/kfence.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/include
On Fri, 2 Oct 2020 at 20:28, Jann Horn wrote:
[...]
> > >
> > > Do you have performance numbers or a description of why you believe
> > > that this part of kfence is exceptionally performance-sensitive? If
> > > not, it might be a good idea to remove this optimization, at least for
> > > the
On Fri, 2 Oct 2020 at 07:45, Jann Horn wrote:
>
> On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote:
> > Add architecture specific implementation details for KFENCE and enable
> > KFENCE for the x86 architecture. In particular, this implements the
> > required inte
On Wed, 7 Oct 2020 at 16:15, Jann Horn wrote:
>
> On Wed, Oct 7, 2020 at 3:09 PM Marco Elver wrote:
> > On Fri, 2 Oct 2020 at 07:45, Jann Horn wrote:
> > > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote:
> > > > Add architecture specific implementat
On Wed, Aug 05, 2020 at 03:42PM +0200, pet...@infradead.org wrote:
> On Wed, Aug 05, 2020 at 03:26:29PM +0200, Marco Elver wrote:
> > Add missing noinstr to arch_local*() helpers, as they may be called from
> > noinstr code.
> >
> > On a KCSAN config with CONFIG_PARAVIR
On Wed, 5 Aug 2020 at 16:36, Marco Elver wrote:
>
> On Wed, 5 Aug 2020 at 16:17, wrote:
> >
> > On Wed, Aug 05, 2020 at 04:12:37PM +0200, pet...@infradead.org wrote:
> > > On Wed, Aug 05, 2020 at 03:59:40PM +0200, Marco Elver wrote:
> > > > On
save_flags() in paravirt.h, which is called from
noinstr functions in smp_processor_id.c, which in turn are called from
lockdep.
Link: https://lkml.kernel.org/r/7d3b2d05ac1c3...@google.com
Reported-by: syzbot+8db9e1ecde74e590a...@syzkaller.appspotmail.com
Signed-off-by: Marco Elver
---
arch/x86/i
On Wed, 5 Aug 2020 at 16:17, wrote:
>
> On Wed, Aug 05, 2020 at 04:12:37PM +0200, pet...@infradead.org wrote:
> > On Wed, Aug 05, 2020 at 03:59:40PM +0200, Marco Elver wrote:
> > > On Wed, Aug 05, 2020 at 03:42PM +0200, pet...@infradead.org wrote:
> >
> > >
On Fri, 2 Oct 2020 at 08:48, Jann Horn wrote:
>
> On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote:
> > Add architecture specific implementation details for KFENCE and enable
> > KFENCE for the arm64 architecture. In particular, this implements the
> > required
>
> > [1] http://lists.llvm.org/pipermail/llvm-dev/2012-May/049972.html
> > [2]
> > http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131021/091536.html
> >
> > Suggested-by: Marco Elver
> > Reviewed-by: David Brazdil
> > Reviewed-by: Ma
Hi Jann,
Thanks for your comments!!
On Fri, Oct 02, 2020 at 08:33AM +0200, Jann Horn wrote:
> On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote:
> > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a
> > low-overhead sampling-based memory safety error d
On Fri, Oct 02, 2020 at 09:31PM +0200, Jann Horn wrote:
[...]
> > >
> > > If !CONFIG_HAVE_ARCH_KFENCE_STATIC_POOL, this should probably always
> > > return false if __kfence_pool is NULL, right?
> >
> > That's another check; we don't want to make this more expensive.
>
> Ah, right, I missed that
On Fri, 2 Oct 2020 at 21:32, Jann Horn wrote:
> > That's another check; we don't want to make this more expensive.
>
> Ah, right, I missed that this is the one piece of KFENCE that is
> actually really hot code until Dmitry pointed that out.
>
> But actually, can't you reduce how hot this is for
usage sites at compile-time.
Signed-off-by: Marco Elver
---
kernel/kcsan/core.c| 22 +++---
kernel/kcsan/debugfs.c | 21 +
kernel/kcsan/kcsan.h | 12 ++--
kernel/kcsan/report.c | 2 +-
4 files changed, 23 insertions(+), 34 deletions(-)
diff
On Fri, 7 Aug 2020 at 19:06, Paul E. McKenney wrote:
> On Fri, Aug 07, 2020 at 11:00:31AM +0200, Marco Elver wrote:
> > Since KCSAN instrumentation is everywhere, we need to treat the hooks
> > NMI-like for interrupt tracing. In order to present an as 'normal' as
> > possibl
[+Cc XArray maintainer]
Hi Matthew,
On Mon, Aug 10, 2020 at 05:41AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:fc80c51f Merge tag 'kbuild-v5.9' of git://git.kernel.org/p..
> git tree: upstream
> console output:
On Mon, 10 Aug 2020 at 22:18, Thomas Gleixner wrote:
> Marco Elver writes:
> > Since KCSAN instrumentation is everywhere, we need to treat the hooks
> > NMI-like for interrupt tracing. In order to present an as 'normal' as
> > possible context to the code called by KCSAN
On Fri, 7 Aug 2020 at 17:19, Marco Elver wrote:
> On Fri, Aug 07, 2020 at 02:08PM +0200, Marco Elver wrote:
> > On Fri, 7 Aug 2020 at 14:04, Jürgen Groß wrote:
> > >
> > > On 07.08.20 13:38, Marco Elver wrote:
> > > > On Fri, Aug 07, 2020 at 12:35PM +0200,
On Tue, Sep 29, 2020 at 02:42PM +0200, Andrey Konovalov wrote:
[...]
> > +*/
> > + index = (addr - (unsigned long)__kfence_pool) / (PAGE_SIZE * 2) - 1;
>
> Why do we subtract 1 here? We do have the metadata entry reserved for
> something?
Above the declaration of __kfence_pool it
-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
v3:
* Rewrite patch description to clarify need for 'orig_size'
[reported by Christopher Lameter].
---
mm/slab.c| 46 ++
mm
is_kfence_address().
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/kfence.h | 39 +
arch/arm64/mm/fault.c | 4
m, kfence: insert KFENCE hooks for SLUB
kfence, kasan: make KFENCE compatible with KASAN
kfence, kmemleak: make KFENCE compatible with KMEMLEAK
Marco Elver (5):
arm64, kfence: enable KFENCE for ARM64
kfence, lockdep: make KFENCE compatible with lockdep
kfence, Documentation: add KFENCE do
-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
v4
* Make static memory pool's attrs entirely arch-dependent.
* Revert MAINTAINERS, and make separate patch.
* Fix report generation if __slab_free tail-called.
v3:
* Reports by SeongJae Park:
* Remove
KFENCE-allocated objects in static_obj().
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
kernel/locking/lockdep.c | 8
1 file changed, 8 insertions(+)
diff --git a/kernel/locking/lockdep.c b/kernel
Add entry for KFENCE maintainers.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v4:
* Split out from first patch.
---
MAINTAINERS | 11 +++
1 file changed, 11 insertions(+)
diff --git a/MAINTAINERS b
-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
v3:
* Rewrite patch description to clarify need for 'orig_size'
[reported by Christopher Lameter].
---
mm/slub.c | 72 ---
1 file
need to ensure that the pool uses 4K pages, which is done
using the set_memory_4k() helper function.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
v4:
* Define __kfence_pool_attrs.
---
arch/x86/Kconfig | 2
From: Alexander Potapenko
Add compatibility with KMEMLEAK, by making KMEMLEAK aware of the KFENCE
memory pool. This allows building debug kernels with both enabled, which
also helped in debugging KFENCE.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Add KFENCE documentation in dev-tools/kfence.rst, and add to index.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v3:
* Re-introduce reference to Documentation/dev-tools/kfence.rst.
v2:
* Many clarifications
-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v4:
* Clarify RCU test comment [reported by Paul E. McKenney].
v3:
* Lower line buffer size to avoid warnings of using more than 1024 bytes
stack usage [reported by kernel test robot ].
v2:
* Update
of the two is generally discouraged,
CONFIG_EXPERT=y should be set. It also gives us the nice property that
KFENCE will be build-tested by allyesconfig builds.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
lib
On Tue, 29 Sep 2020 at 15:48, Andrey Konovalov wrote:
> On Tue, Sep 29, 2020 at 3:11 PM Marco Elver wrote:
> >
> > On Tue, Sep 29, 2020 at 02:42PM +0200, Andrey Konovalov wrote:
> > [...]
> > > > +*/
> > > > + index = (addr - (
On Tue, 29 Sep 2020 at 16:24, Mark Rutland wrote:
[...]
>
> From other sub-threads it sounds like these addresses are not part of
> the linear/direct map. Having kmalloc return addresses outside of the
> linear map is going to break anything that relies on virt<->phys
> conversions, and is liable
On Thu, 8 Oct 2020 at 12:45, Mark Rutland wrote:
> On Thu, Oct 08, 2020 at 11:40:52AM +0200, Marco Elver wrote:
> > On Thu, 1 Oct 2020 at 19:58, Mark Rutland wrote:
> > [...]
> > > > > If you need virt_to_page() to work, the address has to be part of t
On Wed, 14 Oct 2020 at 22:44, Andrey Konovalov wrote:
>
> Similarly to kasan_init() mark kasan_init_tags() as __init.
>
> Signed-off-by: Andrey Konovalov
> Link:
> https://linux-review.googlesource.com/id/I8792e22f1ca5a703c5e979969147968a99312558
> ---
> include/linux/kasan.h | 4 ++--
>
On Wed, 14 Oct 2020 at 22:45, Andrey Konovalov wrote:
>
> TODO: no meaningful description here yet, please see the cover letter
> for this RFC series.
>
> Signed-off-by: Andrey Konovalov
> Link:
> https://linux-review.googlesource.com/id/If7d37003875b2ed3e0935702c8015c223d6416a4
> ---
>
On Thu, 15 Oct 2020 at 15:39, Mark Rutland wrote:
> On Wed, Oct 14, 2020 at 09:12:37PM +0200, Marco Elver wrote:
> > On Thu, 8 Oct 2020 at 12:45, Mark Rutland wrote:
> > > On Thu, Oct 08, 2020 at 11:40:52AM +0200, Marco Elver wrote:
> > > > On Thu, 1 Oct 2020
On Wed, 14 Oct 2020 at 22:44, Andrey Konovalov wrote:
> This patchset is not complete (see particular TODOs in the last patch),
> and I haven't performed any benchmarking yet, but I would like to start the
> discussion now and hear people's opinions regarding the questions mentioned
> below.
>
>
On Fri, 16 Oct 2020 at 15:17, 'Andrey Konovalov' via kasan-dev
wrote:
[...]
> > > The intention with this kind of a high level switch is to hide the
> > > implementation details. Arguably, we could add multiple switches that
> > > allow
> > > to separately control each KASAN or MTE feature, but
On Thu, 1 Oct 2020 at 19:58, Mark Rutland wrote:
[...]
> > > If you need virt_to_page() to work, the address has to be part of the
> > > linear/direct map.
[...]
>
> What's the underlying requirement here? Is this a performance concern,
> codegen/codesize, or something else?
It used to be
_): 00 00 00 00 00 00 00 00
>
> Adjust the offset to stay within s->object_size.
>
> (Note that there appear to be no such small-sized caches in the kernel
> currently.)
>
> Reported-by: Marco Elver
> Link:
> https://lore.kernel.org/linux-mm/2020080
On Wed, Oct 07, 2020 at 04:41PM +0200, Marco Elver wrote:
> On Wed, 7 Oct 2020 at 16:15, Jann Horn wrote:
[...]
> > > > > + return false;
> > > > > +
> > > > > + if (protect)
> > > > > + set_pte(pte,
On Sat, 10 Oct 2020 at 16:54, Arpitha Raghunandan <98.a...@gmail.com> wrote:
> Implementation of support for parameterized testing in KUnit.
>
> Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com>
> ---
> include/kunit/test.h | 29 +
> lib/kunit/test.c | 44
On Mon, 12 Oct 2020 at 12:54, 'SeongJae Park' via KUnit Development
wrote:
>
> From: SeongJae Park
>
> If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
> module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
> errors. This commit updates the document for
[ Sorry for delay, just noticed this one doesn't have a reply yet. ]
On Sat, 3 Oct 2020 at 00:27, Jann Horn wrote:
> On Fri, Oct 2, 2020 at 11:28 PM Marco Elver wrote:
> > On Fri, 2 Oct 2020 at 21:32, Jann Horn wrote:
> > > > That's another check; we don't want to mak
mote_start_context(u64 handle, unsigned int context);
> +void kcov_remote_stop_context(unsigned int context);
> u64 kcov_common_handle(void);
>
> +static inline void kcov_remote_start(u64 handle)
> +{
> + return kcov_remote_start_context(handle, KCOV_CONTEXT_MASK);
> +}
>
On Wed, 16 Sep 2020 at 20:22, 'Nick Desaulniers' via kasan-dev
wrote:
>
> On Wed, Sep 16, 2020 at 1:46 AM Marco Elver wrote:
> >
> > On Wed, 16 Sep 2020 at 10:30, wrote:
> > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote:
> > > > On Tue,
On Wed, Sep 16, 2020 at 12:14PM +, George Popescu wrote:
> On Wed, Sep 16, 2020 at 10:32:40AM +0200, Marco Elver wrote:
> > On Wed, 16 Sep 2020 at 09:40, George Popescu wrote:
> > > On Tue, Sep 15, 2020 at 07:32:28PM +0200, Marco Elver wrote:
> > > > On Tue
On Wed, 16 Sep 2020 at 15:40, Marco Elver wrote:
> On Wed, Sep 16, 2020 at 12:14PM +, George Popescu wrote:
> > On Wed, Sep 16, 2020 at 10:32:40AM +0200, Marco Elver wrote:
> > > On Wed, 16 Sep 2020 at 09:40, George Popescu
> > > wrote:
> > > > O
On Fri, 21 Aug 2020 at 14:31, Marco Elver wrote:
> In the core runtime, we must minimize any calls to external library
> functions to avoid any kind of recursion. This can happen even though
> instrumentation is disabled for called functions, but tracing is
> enabled.
>
On Wed, Jul 29, 2020 at 04:23PM -0300, Vitor Massaru Iha wrote:
> This adds the conversion of the runtime tests of test_list_sort,
> from `lib/test_list_sort.c` to KUnit tests.
>
> Please apply this commit first (linux-kselftest/kunit-fixes):
> 3f37d14b8a3152441f36b6bc74000996679f0998 kunit:
On Thu, Jul 02, 2020 at 12:14AM -0700, David Gow wrote:
> As discussed in [1], KUnit tests have hitherto not had a particularly
> consistent naming scheme. This adds documentation outlining how tests
> and test suites should be named, including how those names should be
> used in Kconfig entries
On Thu, 27 Aug 2020 at 18:17, David Gow wrote:
[...]
> > First of all, thanks for the talk yesterday! I only looked at this
> > because somebody pasted the LKML link. :-)
>
> No worries! Clearly this document needed linking -- even I was
> starting to suspect the reason no-one was complaining
re not going to clean up behind us, this
> should be a warning and not an error.
There are also some other documentation that would go stale. We probably
have to change KASAN docs to look something like the below.
I wish we could also remove the "but detection of out-of-bounds accesses
f
On Mon, 10 Aug 2020 at 10:06, Marco Elver wrote:
> Remove kcsan_counter_inc/dec() functions, as they perform no other
> logic, and are no longer needed.
>
> This avoids several calls in kcsan_setup_watchpoint() and
> kcsan_found_watchpoint(), as well as lets the compiler warn us ab
On Mon, 10 Aug 2020 at 09:23, Walter Wu wrote:
> This patch records the last two timer queueing stacks and prints
> up to 2 timer stacks in KASAN report. It is useful for programmers
> to solve use-after-free or double-free memory timer issues.
>
> When timer_setup() or timer_setup_on_stack() is
nse to introduce yet another special
case to KCSAN's runtime, only to cater to the case here.
Signed-off-by: Marco Elver
Cc: Dmitry Vyukov
Cc: Paul E. McKenney
Cc: Will Deacon
---
As discussed, partially reverting behaviour for non-atomic bitops when
KCSAN_ASSUME_PLAIN_WRITES_ATOMIC is selected.
I'
On Tue, Sep 08, 2020 at 07:52AM -0700, Dave Hansen wrote:
> On 9/7/20 6:40 AM, Marco Elver wrote:
> > KFENCE is designed to be enabled in production kernels, and has near
> > zero performance overhead. Compared to KASAN, KFENCE trades performance
> > for precision.
>
&
On Tue, Sep 08, 2020 at 04:40PM +0200, Vlastimil Babka wrote:
> On 9/8/20 2:16 PM, Alexander Potapenko wrote:
> >> Toggling a static branch is AFAIK quite disruptive (PeterZ will probably
> >> tell
> >> you better), and with the default 100ms sample interval, I'd think it's
> >> not good
> >> to
t; +The easiest way of achieving this is to name the file containing the test
> suite
> +``_test.c`` (or, as above, ``_kunit.c``). This file should be
> +placed next to the code under test.
> +
> +If the suite name contains some or all of the name of the test's parent
> +directory, it may make sense to modify the source filename to reduce
> redundancy.
> +For example, a ``foo_firmware`` suite could be in the ``foo/firmware_test.c``
> +file.
Reviewed-by: Marco Elver
Thank you!
Hello arm64 maintainers,
On Mon, 7 Sep 2020 at 15:41, Marco Elver wrote:
> Add architecture specific implementation details for KFENCE and enable
> KFENCE for the arm64 architecture. In particular, this implements the
> required interface in . Currently, the arm64 version does
>
On Mon, Aug 31, 2020 at 12:47PM +0200, SeongJae Park wrote:
[...]
> diff --git a/mm/damon.c b/mm/damon.c
> index 7e3c8c82a010..9815d22fc4de 100644
> --- a/mm/damon.c
> +++ b/mm/damon.c
> @@ -2001,6 +2001,147 @@ static ssize_t debugfs_record_write(struct file *file,
> return ret;
> }
>
>
On Tue, 1 Sep 2020 at 07:31, David Gow wrote:
> On Tue, Sep 1, 2020 at 7:47 AM Kees Cook wrote:
> > On Fri, Aug 28, 2020 at 12:17:05AM +0800, David Gow wrote:
> > > On Thu, Aug 27, 2020 at 9:14 PM Marco Elver wrote:
[...]
>
> I guess there are two audiences to cater for
On Mon, 3 Aug 2020 at 08:45, Wang Wenhu wrote:
>
> KCSAN is also supported in GCC version 7.3.0 or later.
> For Clang, the supported versions are 7.0.0 and later.
>
> Signed-off-by: Wang Wenhu
> ---
Nack.
Did you mean K-A-SAN?
In which case this is the wrong file (kasan.rst also has the right
On Mon, 24 Aug 2020 at 10:14, Walter Wu wrote:
>
> Generic KASAN support to record the last two timer and workqueue
> stacks and print them in KASAN report. So that need to update
> documentation.
>
> Signed-off-by: Walter Wu
> Cc: Andrey Ryabinin
> Cc: Dmitry Vyukov
> Cc: Alexander Potapenko
On Mon, 24 Aug 2020 at 10:14, Walter Wu wrote:
>
> Adds a test to verify workqueue stack recording and print it in
> KASAN report.
>
> The KASAN report was as follows(cleaned up slightly):
>
> BUG: KASAN: use-after-free in kasan_workqueue_uaf
>
> Freed by task 54:
> kasan_save_stack+0x24/0x50
kqueue stack.
> - change the aux stack title for common name.
Much cleaner.
In general,
Acked-by: Marco Elver
but I left some more comments. I'm a bit worried about the tests,
because of KASAN-test KUnit rework, but probably not much we can do
until these are added to -mm tree.
Thanks,
-- Marco
ption by default when UBSAN_TRAP is enabled.
>
> [1] http://lists.llvm.org/pipermail/llvm-dev/2012-May/049972.html
> [2]
> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131021/091536.html
>
> Suggested-by: Marco Elver
> Reviewed-by: David Brazdil
> Signed-off-by: Geo
for SLAB
mm, kfence: insert KFENCE hooks for SLUB
kfence, kasan: make KFENCE compatible with KASAN
kfence, kmemleak: make KFENCE compatible with KMEMLEAK
Marco Elver (4):
arm64, kfence: enable KFENCE for ARM64
kfence, lockdep: make KFENCE compatible with lockdep
kfence, Documentation: add
From: Alexander Potapenko
Add compatibility with KMEMLEAK, by making KMEMLEAK aware of the KFENCE
memory pool. This allows building debug kernels with both enabled, which
also helped in debugging KFENCE.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
is_kfence_address().
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
For ARM64, we would like to solicit feedback on what the best option is
to obtain a constant address for __kfence_pool. One option is to declare
a memory
need to ensure that the pool uses 4K pages, which is done
using the set_memory_4k() helper function.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
arch/x86/Kconfig | 2 ++
arch/x86/include/asm/kfence.h
Add KFENCE documentation in dev-tools/kfence.rst, and add to index.
Reviewed-by: Dmitry Vyukov
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v3:
* Re-introduce reference to Documentation/dev-tools/kfence.rst.
v2:
* Many clarifications
-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v3:
* Lower line buffer size to avoid warnings of using more than 1024 bytes
stack usage [reported by kernel test robot ].
v2:
* Update for shortened memory corruption report.
---
lib/Kconfig.kfence | 13
1 - 100 of 1015 matches
Mail list logo