by: Arpitha Raghunandan <98.a...@gmail.com>
> > Co-developed-by: Marco Elver
> > Signed-off-by: Marco Elver
> > ---
>
> This looks good to me! A couple of minor thoughts about the output
> format below, but I'm quite happy to have this as-is regardless.
>
[+Peter]
On Sat, 25 Jul 2020 at 16:56, Paul E. McKenney wrote:
>
> On Thu, Feb 20, 2020 at 10:33:17PM +0100, Marco Elver wrote:
> > On Thu, 20 Feb 2020, Paul E. McKenney wrote:
>
> I am clearly not keeping up... :-/
Not to worry, I think the local_t idea was discarded based o
tion, existing
explicit instrumentation via instrumented.h was updated to use explicit
read-write instrumentation where appropriate, so we can also benefit
from the better report generation.
Marco Elver (8):
kcsan: Support compounded read-write instrumentation
objtool, kcsan: Add __tsan_read_wr
Changes kcsan-test module to support checking reports that include
compound instrumentation. Since we should not fail the test if this
support is unavailable, we have to add a config variable that the test
can use to decide what to check for.
Signed-off-by: Marco Elver
---
kernel/kcsan/kcsan
rnel_rmw_array+0x45/0xa0
access_thread+0x71/0xb0
kthread+0x21e/0x240
ret_from_fork+0x22/0x30
Signed-off-by: Marco Elver
---
include/linux/kcsan-checks.h | 45
kernel/kcsan/core.c | 23 ++
kernel/kcsan/report.c
Use instrument_atomic_read_write() for atomic RMW ops.
Signed-off-by: Marco Elver
---
include/asm-generic/atomic-instrumented.h | 330 +++---
scripts/atomic/gen-atomic-instrumented.sh | 20 +-
2 files changed, 179 insertions(+), 171 deletions(-)
diff --git a/include/asm
For compound instrumentation and assert accesses, skew the watchpoint
delay to be longer. We still shouldn't exceed the maximum delays, but it
is safe to skew the delay for these accesses.
Signed-off-by: Marco Elver
---
kernel/kcsan/core.c | 10 +++---
1 file changed, 7 insertions(
Use the new instrument_read_write() where appropriate.
Signed-off-by: Marco Elver
---
include/asm-generic/bitops/instrumented-atomic.h | 6 +++---
include/asm-generic/bitops/instrumented-lock.h | 2 +-
include/asm-generic/bitops/instrumented-non-atomic.h | 6 +++---
3 files changed, 7
Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks for the builtin atomics
instrumentation.
Signed-off-by: Marco Elver
---
Added to this series, as it would otherwise cause patch conflicts.
---
kernel/kcsan/core.c | 25 +
1 file changed, 17 insertions(+), 8 deletions
ly be
treated as atomic, if they aren't actually atomic.
Signed-off-by: Marco Elver
---
include/linux/instrumented.h | 30 ++
1 file changed, 30 insertions(+)
diff --git a/include/linux/instrumented.h b/include/linux/instrumented.h
index 43e6ea591975..42faebbaa
Adds the new __tsan_read_write compound instrumentation to objtool's
uaccess whitelist.
Signed-off-by: Marco Elver
---
tools/objtool/check.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 63d8b630c67a..38d82e705c93 100644
--- a/
On Tue, Jul 21, 2020 at 12:30PM +0200, Marco Elver wrote:
[...]
> diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
> index 3d282d51849b..cde5b62b0a01 100644
> --- a/lib/Kconfig.kcsan
> +++ b/lib/Kconfig.kcsan
> @@ -40,6 +40,11 @@ menuconfig KCSAN
>
> if KCSAN
>
&g
On Tue, 21 Jul 2020 at 13:34, Andrey Konovalov wrote:
>
> To link KCOV to the kasan-dev@ mailing list.
>
> Signed-off-by: Andrey Konovalov
> ---
> MAINTAINERS | 9 +
> 1 file changed, 9 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d53db30d1365..eec0b687eb08 100644
> -
On Tue, 21 Jul 2020 at 16:09, Peter Zijlstra wrote:
>
> On Tue, Jul 21, 2020 at 12:30:12PM +0200, Marco Elver wrote:
> > Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks for the builtin atomics
> > instrumentation.
> >
> > Signed-off-by: Marco Elver
> > ---
&
On Tue, Jul 21, 2020 at 04:05PM +0200, Peter Zijlstra wrote:
> On Tue, Jul 21, 2020 at 12:30:11PM +0200, Marco Elver wrote:
> > For compound instrumentation and assert accesses, skew the watchpoint
> > delay to be longer. We still shouldn't exceed the maximum delays, but it
>
On Wed, Jul 15, 2020 at 08:16AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:e9919e11 Merge branch 'for-linus' of git://git.kernel.org/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1217a83b10
> kernel co
On Wed, 15 Jul 2020 at 18:33, Eric Biggers wrote:
>
> [+Cc linux-fsdevel]
>
> On Wed, Jul 15, 2020 at 05:29:12PM +0200, 'Marco Elver' via syzkaller-bugs
> wrote:
> > On Wed, Jul 15, 2020 at 08:16AM -0700, syzbot wrote:
> > > Hello,
> &g
On Thu, Jul 09, 2020 at 03:29PM +0206, John Ogness wrote:
> Replace the existing ringbuffer usage and implementation with
> lockless ringbuffer usage. Even though the new ringbuffer does not
> require locking, all existing locking is left in place. Therefore,
> this change is purely replacing the u
On Sun, Jul 19, 2020 at 12:43PM +0900, Sergey Senozhatsky wrote:
> Hi Marco,
>
> On (20/07/18 14:10), Marco Elver wrote:
> >
> > It seems this causes a regression observed at least with newline-only
> > printks. I noticed this during -next testing because various
On Mon, 20 Jul 2020 at 10:41, Sergey Senozhatsky
wrote:
>
> On (20/07/20 08:43), Marco Elver wrote:
> > On Sun, Jul 19, 2020 at 12:43PM +0900, Sergey Senozhatsky wrote:
> >
> > As I said, a number of debugging tools use them to format reports to be
> > more readabl
On Mon, 20 Jul 2020 at 12:20, John Ogness wrote:
>
> On 2020-07-18, Marco Elver wrote:
> > It seems this causes a regression observed at least with newline-only
> > printks.
> > [...]
> > -- >8 --
> >
> > --- a/init/main.c
> > +++
report).
Before "lockdep: Prepare for NMI IRQ state tracking", KCSAN avoided
touching the IRQ state trace via raw_local_irq_save/restore() and
lockdep_off/on().
Fixes: 248591f5d257 ("kcsan: Make KCSAN compatible with new IRQ state tracking")
Signed-off-by: Marco Elver
---
Hi
58 ++-
> kernel/printk/printk_ringbuffer.h | 15
> 2 files changed, 35 insertions(+), 38 deletions(-)
Thanks! Ran a couple tests and sanitizer report blank lines are back
where they're expected.
Tested-by: Marco Elver
On Mon, 20 Jul 2020 at 14:03, Marco Elver wrote:
>
> To improve the general usefulness of the IRQ state trace information
> with KCSAN enabled, save and restore the trace information when entering
> and exiting the KCSAN runtime as well as when generating a KCSAN report.
>
On Tue, 28 Jul 2020 at 13:30, Ingo Molnar wrote:
>
>
> * Marco Elver wrote:
>
> > To improve the general usefulness of the IRQ state trace information
> > with KCSAN enabled, save and restore the trace information when entering
> > and exiting the KCSAN runtime as w
On Mon, 6 Jul 2020 at 20:35, Will Deacon wrote:
> On Mon, Jul 06, 2020 at 05:00:23PM +0100, Dave Martin wrote:
> > On Thu, Jul 02, 2020 at 08:23:02AM +0100, Will Deacon wrote:
> > > On Wed, Jul 01, 2020 at 06:07:25PM +0100, Dave P Martin wrote:
> > > > Also, can you illustrate code that can only b
ed between [delay/2, delay].
Signed-off-by: Marco Elver
---
v2:
* Commit message rewording.
---
kernel/kcsan/core.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/kernel/kcsan/core.c b/kernel/kcsan/core.c
index fb52de2facf3..4633baebf84e 100644
--- a/kernel/kcsan/co
Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks for the builtin atomics
instrumentation.
Signed-off-by: Marco Elver
---
v2:
* Add {} for readability.
Added to this series, as it would otherwise cause patch conflicts.
---
kernel/kcsan/core.c | 30 ++
1 file changed
rnel_rmw_array+0x45/0xa0
access_thread+0x71/0xb0
kthread+0x21e/0x240
ret_from_fork+0x22/0x30
Signed-off-by: Marco Elver
---
include/linux/kcsan-checks.h | 45
kernel/kcsan/core.c | 23 ++
kernel/kcsan/report.c
ity.
* Rewrite commit message of 'kcsan: Skew delay to be longer for certain
access types'.
* Update comment for gen-atomic-instrumented.sh.
Marco Elver (8):
kcsan: Support compounded read-write instrumentation
objtool, kcsan: Add __tsan_read_write to uaccess whitelist
kcsan: Ske
ly be
treated as atomic, if they aren't actually atomic.
Signed-off-by: Marco Elver
---
include/linux/instrumented.h | 30 ++
1 file changed, 30 insertions(+)
diff --git a/include/linux/instrumented.h b/include/linux/instrumented.h
index 43e6ea591975..42faebbaa
Use the new instrument_read_write() where appropriate.
Signed-off-by: Marco Elver
---
include/asm-generic/bitops/instrumented-atomic.h | 6 +++---
include/asm-generic/bitops/instrumented-lock.h | 2 +-
include/asm-generic/bitops/instrumented-non-atomic.h | 6 +++---
3 files changed, 7
Adds the new __tsan_read_write compound instrumentation to objtool's
uaccess whitelist.
Signed-off-by: Marco Elver
Acked-by: Peter Zijlstra (Intel)
---
tools/objtool/check.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
Use instrument_atomic_read_write() for atomic RMW ops.
Signed-off-by: Marco Elver
---
v2:
* Update inline comment.
---
include/asm-generic/atomic-instrumented.h | 330 +++---
scripts/atomic/gen-atomic-instrumented.sh | 21 +-
2 files changed, 180 insertions(+), 171 deletions
Changes kcsan-test module to support checking reports that include
compound instrumentation. Since we should not fail the test if this
support is unavailable, we have to add a config variable that the test
can use to decide what to check for.
Signed-off-by: Marco Elver
---
v2:
* Fix
On Tue, 21 Jul 2020 at 16:19, Peter Zijlstra wrote:
>
> On Tue, Jul 21, 2020 at 12:30:16PM +0200, Marco Elver wrote:
>
> > diff --git a/scripts/atomic/gen-atomic-instrumented.sh
> > b/scripts/atomic/gen-atomic-instrumented.sh
> > index 6afadf73da17..5cdcce703660 1007
On Thu, 16 Jul 2020 at 09:52, Nicholas Piggin wrote:
>
> Excerpts from Eric Biggers's message of July 16, 2020 4:54 pm:
> > On Thu, Jul 16, 2020 at 04:24:01PM +1000, Nicholas Piggin wrote:
> >> Excerpts from Eric Biggers's message of July 16, 2020 1:03 pm:
> >> > On Thu, Jul 16, 2020 at 09:42:03AM
fic/suffix/
> +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
> n
On Thu, 10 Sep 2020 at 17:48, Dmitry Vyukov wrote:
>
> On Thu, Sep 10, 2020 at 5:06 PM Marco Elver wrote:
> > > On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote:
> > > > +config KFENCE_NUM_OBJECTS
> > > > + int "Number of guarded ob
On Thu, 10 Sep 2020 at 16:58, Dmitry Vyukov wrote:
>
> On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote:
> > +config KFENCE_NUM_OBJECTS
> > + int "Number of guarded objects available"
> > + default 255
> > + range 1 65535
> > +
On Thu, 10 Sep 2020 at 19:11, Dmitry Vyukov wrote:
>
> On Thu, Sep 10, 2020 at 6:19 PM Alexander Potapenko wrote:
> >
> > On Thu, Sep 10, 2020 at 5:43 PM Dmitry Vyukov wrote:
> >
> >
> > > > + /* Calculate address for this allocation. */
> > > > + if (right)
> > > > + m
to enable the
> 'local-bounds' option 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-
insert KFENCE hooks 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
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
ed-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
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
ways_inline.
Reviewed-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 +++
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
ways_inline.
Reviewed-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
have verified by running synthetic
benchmarks (sysbench I/O workloads) that a kernel compiled with KFENCE
is performance-neutral compared to the non-KFENCE baseline.
For more details, see Documentation/dev-tools/kfence.rst (added later in
the series).
Reviewed-by: Dmitry Vyukov
Co-developed-by: Marco El
On Mon, 21 Sep 2020 at 19:13, Paul E. McKenney wrote:
>
> On Mon, Sep 21, 2020 at 03:26:11PM +0200, Marco Elver wrote:
> > Add KFENCE test suite, testing various error detection scenarios. Makes
> > use of KUnit for test organization. Since KFENCE's interface to obtain
&
t; -fno-optimize-sibling-calls) \
> $(call cc-option,$(call
> cc-param,tsan-instrument-read-before-write=1)) \
> $(call cc-param,tsan-distinguish-volatile=1)
This doesn't apply to -next, which has some KCSAN changes for the next
merge window. Although it seems git-merge f
On Fri, 11 Sep 2020 at 09:14, Dmitry Vyukov wrote:
>
> On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote:
> >
> > Add KFENCE documentation in dev-tools/kfence.rst, and add to index.
> >
> > Co-developed-by: Alexander Potapenko
> > Signed-off-by: Alexander
On Fri, 11 Sep 2020 at 09:36, Dmitry Vyukov wrote:
> On Tue, Sep 8, 2020 at 5:56 PM Marco Elver wrote:
> > On Tue, Sep 08, 2020 at 05:36PM +0200, Vlastimil Babka wrote:
[...]
> > > Hmm did you observe that with this limit, a long-running system would
> > > eventual
On Fri, 11 Sep 2020 at 09:17, Dmitry Vyukov wrote:
>
> On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote:
> >
> > From: Alexander Potapenko
> >
> > Inserts KFENCE hooks into the SLAB allocator.
> >
> > We note the addition of the 'orig_size' ar
On Fri, 11 Sep 2020 at 15:10, Dmitry Vyukov wrote:
> On Fri, Sep 11, 2020 at 2:03 PM Marco Elver wrote:
> > On Fri, 11 Sep 2020 at 09:36, Dmitry Vyukov wrote:
[...]
> > > By "reasonable" I mean if the pool will last long enough to still
> > > sample somet
On Fri, 11 Sep 2020 at 15:33, Marco Elver wrote:
> On Fri, 11 Sep 2020 at 15:10, Dmitry Vyukov wrote:
> > On Fri, Sep 11, 2020 at 2:03 PM Marco Elver wrote:
> > > On Fri, 11 Sep 2020 at 09:36, Dmitry Vyukov wrote:
> [...]
> > > > By "reasonable"
On Fri, 11 Sep 2020 at 09:05, Dmitry Vyukov wrote:
>
> On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote:
> >
> > From: Alexander Potapenko
> >
> > We make KFENCE compatible with KASAN for testing KFENCE itself. In
> > particular, KASAN helps to catch
On Tue, 15 Sep 2020 at 06:03, 'David Gow' via kasan-dev
wrote:
>
> [+kasan-dev, +kunit-dev]
>
> On Mon, Sep 14, 2020 at 3:01 PM Stephen Rothwell
> wrote:
> >
> > Hi all,
> >
> > After merging the akpm-current tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> >
On Tue, 15 Sep 2020 at 12:25, George Popescu wrote:
> On Mon, Sep 14, 2020 at 03:13:14PM -0700, Kees Cook wrote:
> > On Mon, Sep 14, 2020 at 05:27:42PM +, George-Aurelian Popescu wrote:
> > > From: George Popescu
> > >
> > > When the kernel is compiled with Clang, UBSAN_BOUNDS inserts a brk a
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.
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander
d-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v2:
* Update for shortened memory corruption report.
---
lib/Kconfig.kfence | 13 +
mm/kfence/Makefile | 3 +
mm/kfence/kfence_test.c | 777
3 files changed, 793 insertions(+)
create
add Kernel Electric-Fence infrastructure
x86, kfence: enable KFENCE for x86
mm, kfence: insert KFENCE hooks 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,
On Tue, Sep 15, 2020 at 03:57PM +0200, SeongJae Park wrote:
[...]
>
> So interesting feature! I left some tirvial comments below.
Thank you!
> [...]
> > diff --git a/lib/Kconfig.kfence b/lib/Kconfig.kfence
> > new file mode 100644
> > index ..7ac91162edb0
> > --- /dev/null
> > +++ b
ange the auxiliary stack title for common title,
> > print them in KASAN report.
> >
> > Signed-off-by: Walter Wu
> > Suggested-by: Marco Elver
> > Acked-by: Marco Elver
> > Reviewed-by: Dmitry Vyukov
> > Reviewed-by: Andrey Konovalov
> > Cc: Andr
On Thu, 24 Sep 2020 at 14:11, Alexander Potapenko wrote:
>
> On Thu, Sep 24, 2020 at 1:55 PM Marco Elver wrote:
> >
> > On Thu, 24 Sep 2020 at 13:47, Alexander Potapenko wrote:
> > >
> > > On Thu, Sep 24, 2020 at 6:05 AM Walter Wu
> > > wrote:
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
[...]
> arch/arm64/include/asm/memory.h | 4 +-
> arch/arm64/kernel/setup.c | 1 -
> include/linux/kasan.h | 6 +--
> include/linux/mm.h| 2 +-
> include/linux/page-flags-layout.h | 2 +-
> mm
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
[...]
> arch/s390/boot/string.c | 1 +
> arch/x86/boot/compressed/misc.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/s390/boot/string.c b/arch/s390/boot/string.c
> index b11e8108773a..faccb33b462c 100644
>
On Fri, 18 Sep 2020 at 13:17, Qian Cai wrote:
>
> On Tue, 2020-09-15 at 15:20 +0200, Marco Elver wrote:
> > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a
> > low-overhead sampling-based memory safety error detector of heap
> > use-after-free,
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
> This patch adds a configuration option for a new KASAN mode called
> hardware tag-based KASAN. This mode uses the memory tagging approach
> like the software tag-based mode, but relies on arm64 Memory Tagging
> Extension feature for t
[ Sorry for the additional email on this patch; trying to consolidate
comments now. ]
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
> Provide implementation of KASAN functions required for the hardware
> tag-based mode. Those include core functions for memory and pointer
> taggi
On Tue, Sep 15, 2020 at 11:16PM +0200, 'Andrey Konovalov' via kasan-dev wrote:
> This patch add a set of arch_*() memory tagging helpers currently only
> defined for arm64 when hardware tag-based KASAN is enabled. These helpers
> will be used by KASAN runtime to implement the hardware tag-based mod
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
[...]
> static void set_track(struct kmem_cache *s, void *object,
> @@ -583,7 +585,8 @@ static void set_track(struct kmem_cache *s, void *object,
> unsigned int nr_entries;
>
> metadata_access_enable();
>
On Fri, Aug 14, 2020 at 07:26PM +0200, Andrey Konovalov wrote:
> This is a preparatory commit for the upcoming addition of a new hardware
> tag-based (MTE-based) KASAN mode.
>
> Group shadow-related KASAN function declarations and only define them
> for the two existing software modes.
>
> No fun
On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
> diff --git a/include/linux/kasan.h b/include/linux/kasan.h
> index 875bbcedd994..613c9d38eee5 100644
> --- a/include/linux/kasan.h
> +++ b/include/linux/kasan.h
> @@ -184,7 +184,7 @@ static inline void kasan_record_aux_stack(void *pt
On Fri, 18 Sep 2020 at 17:06, 'Andrey Konovalov' via kasan-dev
wrote:
>
> On Fri, Sep 18, 2020 at 2:32 PM Marco Elver wrote:
> >
> > On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote:
> > > This patch adds a configuration option for a new KASAN
On Fri, 18 Sep 2020 at 15:36, George-Aurelian Popescu
wrote:
>
> From: George Popescu
>
[...]
> Suggested-by: Marco Elver
> Reviewed-by: David Brazdil
> Signed-off-by: George Popescu
There's a mismatch between From/Author and Signed-off-by email address.
> ---
>
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 Mon, 21 Sep 2020 at 19:44, Will Deacon wrote:
[...]
> > > > > 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 range in the memory layout to be dedi
I was asked for input on this, and after a few days digging through some
history, thought I'd comment. Hope you don't mind.
On Thu, Jun 25, 2020 at 10:57AM +0200, Peter Zijlstra wrote:
> On Thu, Jun 25, 2020 at 10:24:33AM +0200, Peter Zijlstra wrote:
> > On Thu, Jun 25, 2020 at 10:03:13AM +0200, P
On Tue, 30 Jun 2020 at 19:39, Will Deacon wrote:
>
> When building with LTO, there is an increased risk of the compiler
> converting an address dependency headed by a READ_ONCE() invocation
> into a control dependency and consequently allowing for harmful
> reordering by the CPU.
>
> Ensure that s
On Wed, 1 Jul 2020 at 03:34, Stephen Rothwell wrote:
>
> Hi all,
>
> Today's linux-next merge of the rcu tree got a conflict in:
>
> kernel/kcsan/Makefile
>
> between commit:
>
> f7c28e224da6 ("kbuild: remove cc-option test of -fno-stack-protector")
Is it possible that this patch drops the KC
On Sat, Jun 27, 2020 at 03:59AM +0900, Masahiro Yamada wrote:
> Some Makefiles already pass -fno-stack-protector unconditionally.
> For example, arch/arm64/kernel/vdso/Makefile, arch/x86/xen/Makefile.
> No problem report so far about hard-coding this option. So, we can
> assume all supported compil
On Tue, 30 Jun 2020 at 22:30, Paul E. McKenney wrote:
> On Tue, Jun 30, 2020 at 10:12:43PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 30, 2020 at 09:19:31PM +0200, Marco Elver wrote:
> > > First of all, I agree with the concerns, but not because of LTO.
> > >
> &g
ctions are __always_inline.
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
mm/slab.c| 46 ++
mm/slab_common.c | 6 +-
2 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/mm/s
On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers wrote:
>
> On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote:
> >
> > On Tue, Sep 15, 2020 at 12:02:48PM -0500, Josh Poimboeuf wrote:
> > > If somebody can share the .o file, I can take a look.
> >
> > If only I could reproduce...
> >
> > So I b
On Tue, 15 Sep 2020 at 14:01, George Popescu wrote:
>
> On Tue, Sep 15, 2020 at 01:18:11PM +0200, Marco Elver wrote:
> > On Tue, 15 Sep 2020 at 12:25, George Popescu wrote:
> > > On Mon, Sep 14, 2020 at 03:13:14PM -0700, Kees Cook wrote:
> > > > On Mon, Sep 14,
need to ensure that the pool uses 4K pages, which is done
using the set_memory_4k() helper function.
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 | 60
On Tue, 15 Sep 2020 at 23:28, Josh Poimboeuf wrote:
> On Tue, Sep 15, 2020 at 02:13:01PM -0700, Nick Desaulniers wrote:
> > Triple checking what I wrote above; it looks like the randconfig had
> > BOTH CONFIG_KASAN=y and CONFIG_UBSAN=y enabled. Aren't the sanitizers
> > supposed to be mutually ex
ctions are __always_inline.
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
mm/slub.c | 72 ---
1 file changed, 53 insertions(+), 19 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index d4
is_kfence_address().
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 range in the memory layout to
-neutral compared to the non-KFENCE baseline.
For more details, see Documentation/dev-tools/kfence.rst (added later in
the series).
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
v2:
* Add missing __printf attribute to seq_con_printf, and fix new
KFENCE-allocated objects in static_obj().
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/locking/lockdep.c
index
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.
Co-developed-by: Marco Elver
Signed-off-by: Marco Elver
Signed-off-by: Alexander Potapenko
---
lib/Kconfig.kfence | 2 +-
mm/kasan
Add KFENCE documentation in dev-tools/kfence.rst, and add to index.
Co-developed-by: Alexander Potapenko
Signed-off-by: Alexander Potapenko
Signed-off-by: Marco Elver
---
v2:
* Many clarifications based on comments from Andrey Konovalov.
* Document CONFIG_KFENCE_SAMPLE_INTERVAL=0 usage.
* Make
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, 15 Sep 2020 at 14:01, George Popescu wrote:
> > >
> > > On Tue, Sep 15, 2020 at 01:18:11PM +0200, Marco Elver wrote:
> > >
801 - 900 of 1022 matches
Mail list logo