On Thu, Feb 11, 2021 at 9:04 PM kernel test robot wrote:
>
> Hi Vincenzo,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on next-20210211]
> [cannot apply to arm64/for-next/core xlnx/master arm/for-next soc/for-next
> kvmarm/next linus/master hnaz-linux-mm/master v5.1
On Fri, Feb 12, 2021 at 12:21 PM Vincenzo Frascino
wrote:
>
> Hi Andrey,
>
> On 2/11/21 8:13 PM, Andrey Konovalov wrote:
> >>>> riscv64-linux-ld: report.c:(.text+0x5c4): undefined reference to
> >>>> `kasan_flag_async'
> > Let's do someth
Account for the following files:
- lib/Kconfig.kasan
- lib/test_kasan_module.c
- arch/arm64/include/asm/mte-kasan.h
Signed-off-by: Andrey Konovalov
---
MAINTAINERS | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 64c7169db617
Add my personal email address to KASAN reviewers list.
Signed-off-by: Andrey Konovalov
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7b3d374c858d..e9fccfb27e2d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9561,6 +9561,7 @@ F
Use my personal email address.
Signed-off-by: Andrey Konovalov
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index a58e56f91ed7..7b3d374c858d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9584,7 +9584,7 @@ F:scripts
e() and only defines and exports them when KASAN-KUnit
tests are enabled.
The wrappers aren't defined when tests aren't enabled to avoid misuse.
The mte_() functions aren't exported directly to avoid having low-level
KASAN ifdefs in the arch code.
Signed-off-by: Andrey Konovalov
On Fri, Feb 12, 2021 at 9:16 PM Andrew Morton wrote:
>
> On Fri, 12 Feb 2021 21:08:52 +0100 Andrey Konovalov
> wrote:
>
> > Currently, building KASAN-KUnit tests as a module fails with:
> >
> > ERROR: modpost: "mte_enable_kernel" [lib/test
On Fri, Feb 12, 2021 at 9:54 PM Andrew Morton wrote:
>
> On Fri, 12 Feb 2021 21:21:39 +0100 Andrey Konovalov
> wrote:
>
> > > > The wrappers aren't defined when tests aren't enabled to avoid misuse.
> > > > The mte_() functions aren't export
On Fri, Feb 12, 2021 at 10:08 PM Andrew Morton
wrote:
>
> On Fri, 12 Feb 2021 22:01:38 +0100 Andrey Konovalov
> wrote:
>
> > On Fri, Feb 12, 2021 at 9:54 PM Andrew Morton
> > wrote:
> > >
> > > On Fri, 12 Feb 2021 21:21:39 +0100 Andrey Konovalov
&g
status of TFSR_EL1 will be added with a
> future patch.
>
> Cc: Catalin Marinas
> Cc: Will Deacon
> Reviewed-by: Catalin Marinas
> Reviewed-by: Andrey Konovalov
> Signed-off-by: Vincenzo Frascino
> ---
> arch/arm64/include/asm/memory.h| 3 ++-
> arch/ar
On Fri, Feb 12, 2021 at 6:22 PM Catalin Marinas wrote:
>
> On Thu, Feb 11, 2021 at 03:33:53PM +, Vincenzo Frascino wrote:
> > From: Andrey Konovalov
> >
> > Asynchronous KASAN mode doesn't guarantee that a tag fault will be
> > detected immediately and c
On Wed, Feb 24, 2021 at 1:58 PM syzbot
wrote:
>
> syzbot has bisected this issue to:
>
> commit 97593cad003c668e2532cb2939a24a031f8de52d
> Author: Andrey Konovalov
> Date: Tue Dec 22 20:03:28 2020 +
>
> kasan: sanitize objects when metadata doesn't
strscpy(token, *frame_descr, tok_len + 1);
> > }
> >
> > /* Advance frame_descr past separator. */
> > --
> > 1.8.3.1
> >
Reviewed-by: Andrey Konovalov
Thanks!
Hi Robert,
Thank you for your patch!
In the patchset summary email you are saying that camss does not support
the PIX interface for this generation of ISPs. But this patch still
carries quite a lot of code handling the PIX interface. Like:
-8<-
#define REG_UPDATE_line_n(n)
Hi Robert,
On 05.02.2021 13:43, Robert Foss wrote:
This series implements support for the camera subsystem found in
the SDM845 SOCs and the Titan 170 ISP. The support is partial
in that it implements CSIPHY, CSID, and partial VFE support.
The Titan generation of the ISP diverges a fair amount f
Hi Robert,
Thank you for your patch!
On 05.02.2021 13:44, Robert Foss wrote:
In order to support Qualcomm ISP hardware architectures that diverge
from older architectures, the CSID subdevice drivers needs to be refactored
to better abstract the different ISP hardware architectures.
Signed-off-
that
was never allocated. This is taken as an acceptable trade-off.
All memory allocated normally when the boot is over keeps getting
poisoned as usual.
Signed-off-by: Andrey Konovalov
Change-Id: Iae6b1e4bb8216955ffc14af255a7eaaa6f35324d
---
mm/page_alloc.c
that
was never allocated. This is taken as an acceptable trade-off.
All memory allocated normally when the boot is over keeps getting
poisoned as usual.
Signed-off-by: Andrey Konovalov
---
Resending with Change-Id dropped.
---
mm/page_alloc.c | 43 ---
1
The first patch adds printing a warning in v4l2_get_link_freq() if
V4L2_CID_LINK_FREQ isn't implemented (this is a mandatory control for
CSI-2 transmitter drivers [1], but many sensor drivers don't have it
currently).
The second patch is the start of the work discussed in the "[RFC] Repurpose
V4L2
Print a warning if V4L2_CID_LINK_FREQ control is not implemented.
Signed-off-by: Andrey Konovalov
---
drivers/media/v4l2-core/v4l2-common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-common.c
b/drivers/media/v4l2-core/v4l2-common.c
index 133d20e40f82
mistake less likely to
be repeated in the future.
Signed-off-by: Vladimir Lypak
Acked-by: Robert Foss
Signed-off-by: Andrey Konovalov
---
drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++--
drivers/media/platform/qcom/camss/camss.c | 2 +-
drivers/media/platform/qcom/camss/camss.h | 2
[check,set]_clock_rates()
are left intact as it looks like this VFE clock does depend on the
rate the pixel samples comes out of the camera sensor, not on the
frequency at which the link between the sensor and the CSI receiver
operates.
Signed-off-by: Andrey Konovalov
Acked-by: Robert Foss
---
Hi Jacopo,
On 18.02.2021 11:07, Jacopo Mondi wrote:
Hi Andrey,
On Thu, Feb 18, 2021 at 01:11:33AM +0300, Andrey Konovalov wrote:
There are places in the camss driver where camss_get_pixel_clock() is
called to get the pixel rate (using V4L2_CID_PIXEL_RATE control) and to
calculate the link
Hi Jacopo,
On 18.02.2021 10:55, Jacopo Mondi wrote:
Hi Andrey,
On Thu, Feb 18, 2021 at 01:11:32AM +0300, Andrey Konovalov wrote:
Print a warning if V4L2_CID_LINK_FREQ control is not implemented.
Signed-off-by: Andrey Konovalov
---
drivers/media/v4l2-core/v4l2-common.c | 2 ++
1 file
Print a warning if V4L2_CID_LINK_FREQ control is not implemented.
Signed-off-by: Andrey Konovalov
Reviewed-by: Jacopo Mondi
---
drivers/media/v4l2-core/v4l2-common.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-common.c
b/drivers/media/v4l2-core/v4l2
t; #include
> #include "ieee80211_i.h"
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 972895e9f22dc..3527b17f235a8 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -17,6 +17,7 @@
> #include
> #include
> #include
> +#include
> #include
> #include
> #include
> --
> 2.30.0
Acked-by: Andrey Konovalov
On Thu, Feb 18, 2021 at 9:55 AM David Hildenbrand wrote:
>
> On 17.02.21 21:56, Andrey Konovalov wrote:
> > During boot, all non-reserved memblock memory is exposed to the buddy
> > allocator. Poisoning all that memory with KASAN lengthens boot time,
> > especially on syst
the CAMSS generation of
the architecture. In order to support the Titan generation, make the
ISPIF an optional subdevice.
Signed-off-by: Robert Foss
Reviewed-by: Andrey Konovalov
Thanks,
Andrey
---
Changes since v1:
- Björn: Improved commit message
- Björn: Use local 'dev' p
On Thu, Feb 18, 2021 at 11:46 AM Catalin Marinas
wrote:
>
> The approach looks fine to me. If you don't like the trade-off, I think
> you could still leave the kasan poisoning in if CONFIG_DEBUG_KERNEL.
This won't work, Android enables CONFIG_DEBUG_KERNEL in GKI as it turns out :)
> Reviewed-by:
On Thu, Feb 18, 2021 at 8:46 PM David Hildenbrand wrote:
>
> > 1. For KASAN_GENERIC: leave everything as is to be able to detect
> > these boot-time bugs.
> >
> > 2. For KASAN_SW_TAGS: remove boot-time poisoning via
> > kasan_free_pages(), but use the "invalid" tag as the default shadow
> > value.
On Fri, Feb 19, 2021 at 1:06 AM George Kennedy
wrote:
>
>
>
> On 2/18/2021 3:55 AM, David Hildenbrand wrote:
> > On 17.02.21 21:56, Andrey Konovalov wrote:
> >> During boot, all non-reserved memblock memory is exposed to the buddy
> >> allocator. Poisoning
alled.
All memory allocated normally when the boot is over keeps getting
poisoned as usual.
Reviewed-by: Catalin Marinas
Signed-off-by: Andrey Konovalov
---
Changes v1->v2:
- Only drop memblock poisoning for tag-based KASAN modes.
---
mm/page_alloc.c | 45 ++
ich changes the tag-based
KASAN modes to not poison the boot memory.
Signed-off-by: Andrey Konovalov
---
include/linux/kasan.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 14f72ec96492..44c147dae7e3 100644
--- a/include/li
On Tue, Feb 2, 2021 at 5:25 PM Marco Elver wrote:
>
> > +#ifdef CONFIG_KASAN_GENERIC
> > +
> > +/**
> > + * kasan_poison_last_granule - mark the last granule of the memory range as
> > + * unaccessible
> > + * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
> > + * @size - range
On Tue, Feb 2, 2021 at 5:06 PM Marco Elver wrote:
>
> On Mon, Feb 01, 2021 at 08:43PM +0100, Andrey Konovalov wrote:
> > Currently KASAN saves allocation stacks in both kasan_slab_alloc() and
> > kasan_kmalloc() annotations. This patch changes KASAN to save allocation
> >
On Tue, Feb 2, 2021 at 4:42 PM Catalin Marinas wrote:
>
> On Mon, Feb 01, 2021 at 08:43:34PM +0100, Andrey Konovalov wrote:
> > +/*
> > + * Assign allocation tags for a region of memory based on the pointer tag.
> > + * Note: The address must be non-NULL and MTE_
On Tue, Jan 26, 2021 at 2:46 PM Vincenzo Frascino
wrote:
>
> KASAN provides an asynchronous mode of execution.
>
> Add reporting functionality for this mode.
>
> Cc: Dmitry Vyukov
> Cc: Andrey Ryabinin
> Cc: Alexander Potapenko
> Cc: Andrey Konovalov
> Reviewed-
On Fri, Jan 29, 2021 at 6:44 PM Vincenzo Frascino
wrote:
>
>
>
> On 1/29/21 5:40 PM, Andrey Konovalov wrote:
> > On Tue, Jan 26, 2021 at 2:46 PM Vincenzo Frascino
> > wrote:
> >>
> >> KASAN provides an asynchronous mode of execution.
> >
On Fri, Jan 29, 2021 at 6:56 PM Vincenzo Frascino
wrote:
>
> Hi Andrey,
>
> On 1/29/21 5:40 PM, Andrey Konovalov wrote:
> > I suggest to call end_report(&flags, 0) here and check addr !=0 in
> > end_report() before calling trace_error_report_end().
> >
>
On Fri, Jan 29, 2021 at 6:57 PM Vincenzo Frascino
wrote:
> +#ifdef CONFIG_KASAN_HW_TAGS
> +void kasan_report_async(void)
> +{
> + unsigned long flags;
> +
> + start_report(&flags);
> + pr_err("BUG: KASAN: invalid-access\n");
> + pr_er
On Fri, Jan 29, 2021 at 7:42 PM Vincenzo Frascino
wrote:
>
> Hi Andrey,
>
> On 1/29/21 6:16 PM, Vincenzo Frascino wrote:
> > What I meant is instead of:
> >
> > if (addr) trace_error_report_end(...);
> >
> > you might want to do:
> >
> > if (!IS_ENABLED(CONFIG_KASAN_HW_TAGS)) trace_error_report_en
KFENCE annotations operate on untagged addresses.
Untag addresses in KASAN runtime where they might be tagged.
Signed-off-by: Andrey Konovalov
---
This can be squashed into:
revert kasan-remove-kfence-leftovers
kfence, kasan: make KFENCE compatible with KASA
---
mm/kasan/common.c | 2
On Fri, Jan 29, 2021 at 7:49 PM Vincenzo Frascino
wrote:
>
> This patchset implements the asynchronous mode support for ARMv8.5-A
> Memory Tagging Extension (MTE), which is a debugging feature that allows
> to detect with the help of the architecture the C and C++ programmatic
> memory errors like
kasan_kmalloc() knowing whether the object
belongs to a kmalloc cache. This is implemented by adding a flag field
to the kasan_info structure. That flag is only set for kmalloc caches
via a new kasan_cache_create_kmalloc() annotation.
Signed-off-by: Andrey Konovalov
---
include/linux/kasan.h
Similarly to kasan_kmalloc(), kasan_kmalloc_large() doesn't need
to unpoison the object as it as already unpoisoned by alloc_pages()
(or by ksize() for krealloc()).
This patch changes kasan_kmalloc_large() to only poison the redzone.
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c
outweights saving
a few instructions.
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index a7eb553c8e91..086bb77292b6 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -350,13
Unify checks in kasan_kfree_large() and in kasan_slab_free_mempool()
for large allocations as it's done for small kfree() allocations.
With this change, kasan_slab_free_mempool() starts checking that the
first byte of the memory that's being freed is accessible.
Signed-off-by: Andrey
ds an accessibility check into __do_krealloc(). If the check
fails, krealloc() returns NULL. This check duplicates the one in ksize();
this is fixed in the following patch.
This patch also adds a KASAN-KUnit test to check krealloc() behaviour
when it's called on a freed object.
Signed-off-by: Andrey
This patch reworks KASAN-KUnit tests for krealloc() to:
1. Check both slab and page_alloc based krealloc() implementations.
2. Allow at least one full granule to fit between old and new sizes for
each KASAN mode, and check accesses to that granule accordingly.
Signed-off-by: Andrey Konovalov
s patch removes round_up() of size from kasan_poison() and ensures
that all callers round_up() the size explicitly. This patch also adds
WARN_ON() alignment checks for address and size to kasan_poison() and
kasan_unpoison().
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 9 ++---
mm/kasa
Frascino
Signed-off-by: Andrey Konovalov
---
arch/arm64/include/asm/cache.h | 1 -
arch/arm64/include/asm/kasan.h | 1 +
arch/arm64/include/asm/mte-def.h | 2 +
arch/arm64/include/asm/mte-kasan.h | 64 ++
arch/arm64/include/asm/mte.h | 2 -
arch/arm64
Mark all static functions in common.c and kasan.h that are used for
hardware tag-based KASAN as __always_inline to avoid unnecessary
function calls.
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 13 +++--
mm/kasan/kasan.h | 6 +++---
2 files changed, 10 insertions(+), 9
x27;t unpoison the memory. Instead, kasan_kreallos()
is changed to unpoison the memory excluding the redzone.
For objects that don't fit into the old allocation, this patch disables
KASAN accessibility checks when copying memory into a new object instead
of unpoisoning it.
Signed-off-
Export mte_enable_kernel() and mte_set_report_once() to fix:
ERROR: modpost: "mte_enable_kernel" [lib/test_kasan.ko] undefined!
ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!
Signed-off-by: Andrey Konovalov
---
arch/arm64/kernel/mte.c | 2 ++
1 file c
s the same, as
kmem_cache_node->object_size is equal to sizeof(struct kmem_cache_node).
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 93 +++
mm/kasan/kasan.h | 43 +-
mm/kasan/shadow.c | 28 +++---
m
the overhead of HW_TAGS annotations excluding setting
and checking memory tags is ~3%. The performance impact caused by tags
will be unknown until we have hardware that supports MTE.
As a side-effect, this patchset speeds up generic KASAN by ~15%.
Andrey Konovalov (12):
kasan, mm: don't sav
On Sat, Jan 30, 2021 at 5:52 PM Vincenzo Frascino
wrote:
>
> @@ -45,6 +52,9 @@ static enum kasan_arg_fault kasan_arg_fault __ro_after_init;
> DEFINE_STATIC_KEY_FALSE(kasan_flag_enabled);
> EXPORT_SYMBOL(kasan_flag_enabled);
>
> +/* Whether the asynchronous mode is enabled. */
> +bool kasan_flag_
On Tue, Feb 2, 2021 at 11:46 AM Will Deacon wrote:
>
> On Mon, Feb 01, 2021 at 08:43:36PM +0100, Andrey Konovalov wrote:
> > Export mte_enable_kernel() and mte_set_report_once() to fix:
> >
> > ERROR: modpost: "mte_enable_kernel" [lib/test_kasan
Export mte_enable_kernel_sync() and mte_set_report_once() to fix:
ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan.ko] undefined!
ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!
Reviewed-by: Catalin Marinas
Signed-off-by: Andrey Konovalov
--
x27;t unpoison the memory. Instead, kasan_kreallos()
is changed to unpoison the memory excluding the redzone.
For objects that don't fit into the old allocation, this patch disables
KASAN accessibility checks when copying memory into a new object instead
of unpoisoning it.
Signed-off-
On Fri, Feb 5, 2021 at 6:19 PM Will Deacon wrote:
>
> On Fri, Feb 05, 2021 at 12:37:21AM +0800, Lecopzer Chen wrote:
> >
> > > On Thu, Feb 04, 2021 at 10:46:12PM +0800, Lecopzer Chen wrote:
> > > > > On Sat, Jan 09, 2021 at 06:32:49PM +0800, Lecopzer Chen wrote:
> > > > > > Linux support KAsan for
kasan_kmalloc() knowing whether the object
belongs to a kmalloc cache. This is implemented by adding a flag field
to the kasan_info structure. That flag is only set for kmalloc caches
via a new kasan_cache_create_kmalloc() annotation.
Reviewed-by: Marco Elver
Signed-off-by: Andrey Konovalov
er
Signed-off-by: Andrey Konovalov
---
lib/test_kasan.c | 20
mm/slab_common.c | 3 +++
2 files changed, 23 insertions(+)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index ffebad2f0e6e..1328c468fdb5 100644
--- a/lib/test_kasan.c
+++ b/lib/test_kasan.c
@@ -353,6 +353,25
-off-by: Andrey Konovalov
---
lib/test_kasan.c | 91 ++--
1 file changed, 81 insertions(+), 10 deletions(-)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index d16ec9e66806..ffebad2f0e6e 100644
--- a/lib/test_kasan.c
+++ b/lib/test_kasan.c
@@ -252,11
er
Signed-off-by: Andrey Konovalov
---
include/linux/kasan.h | 16
mm/kasan/common.c | 36 ++--
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index e6ed969e74b3..14f72ec96492 10
outweights saving
a few instructions.
Reviewed-by: Marco Elver
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index f2a6bae13053..da24b144d46c 100644
--- a/mm/kasan/common.c
+++ b/mm
s the same, as
kmem_cache_node->object_size is equal to sizeof(struct kmem_cache_node).
Reviewed-by: Marco Elver
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 93 +++
mm/kasan/kasan.h | 43 +-
mm/kasan/shado
Similarly to kasan_kmalloc(), kasan_kmalloc_large() doesn't need
to unpoison the object as it as already unpoisoned by alloc_pages()
(or by ksize() for krealloc()).
This patch changes kasan_kmalloc_large() to only poison the redzone.
Reviewed-by: Marco Elver
Signed-off-by: Andrey Kono
Hwardware tag-based KASAN only reports the first found bug. After that MTE
tag checking gets disabled. Clarify this in comments and documentation.
Signed-off-by: Andrey Konovalov
---
Documentation/dev-tools/kasan.rst | 8 ++--
mm/kasan/hw_tags.c| 2 +-
2 files changed, 7
Export mte_enable_kernel() and mte_set_report_once() to fix:
ERROR: modpost: "mte_enable_kernel" [lib/test_kasan.ko] undefined!
ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!
Reviewed-by: Catalin Marinas
Signed-off-by: Andrey Konovalov
---
arch/ar
Mark all static functions in common.c and kasan.h that are used for
hardware tag-based KASAN as inline to avoid unnecessary function calls.
Signed-off-by: Andrey Konovalov
---
mm/kasan/common.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mm/kasan/common.c b
s patch removes round_up() of size from kasan_poison() and ensures
that all callers round_up() the size explicitly. This patch also adds
WARN_ON() alignment checks for address and size to kasan_poison() and
kasan_unpoison().
Reviewed-by: Marco Elver
Signed-off-by: Andrey Konovalov
---
mm/kasa
Co-developed-by: Vincenzo Frascino
Signed-off-by: Vincenzo Frascino
Signed-off-by: Andrey Konovalov
---
arch/arm64/include/asm/cache.h | 1 -
arch/arm64/include/asm/kasan.h | 1 +
arch/arm64/include/asm/mte-def.h | 2 +
arch/arm64/include/asm/mte-kasan.h | 65
x27;t unpoison the memory. Instead, kasan_kreallos()
is changed to unpoison the memory excluding the redzone.
For objects that don't fit into the old allocation, this patch disables
KASAN accessibility checks when copying memory into a new object instead
of unpoisoning it.
Signed-off-
ead of __always_inline.
Andrey Konovalov (13):
kasan, mm: don't save alloc stacks twice
kasan, mm: optimize kmalloc poisoning
kasan: optimize large kmalloc poisoning
kasan: clean up setting free info in kasan_slab_free
kasan: unify large kfree checks
kasan: rework krealloc tests
kasa
On Fri, Feb 5, 2021 at 4:39 PM Andrey Konovalov wrote:
>
> This patchset goes on top of:
>
> 1. Vincenzo's async support patches [1], and
Nevermind this, Vincenzo is planning to do more work on the async
patches, so I'll post v3 of this patchset based on the mm tree
On Fri, Feb 5, 2021 at 6:43 PM Will Deacon wrote:
>
> On Fri, Feb 05, 2021 at 06:30:44PM +0100, Andrey Konovalov wrote:
> > On Fri, Feb 5, 2021 at 6:19 PM Will Deacon wrote:
> > >
> > > On Fri, Feb 05, 2021 at 12:37:21AM +0800, Lecopzer Chen wrote:
> > > &g
Hi Robert,
Thank you for your patchset!
On 05.02.2021 13:44, Robert Foss wrote:
Add register definitions for version 170 of the Titan architecture
and implement support for the CSIPHY subdevice.
Signed-off-by: Robert Foss
---
.../qcom/camss/camss-csiphy-3ph-1-0.c | 182 +
: Andrey Konovalov
---
Documentation/dev-tools/kasan.rst | 3 +--
mm/kasan/hw_tags.c| 8 ++--
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/Documentation/dev-tools/kasan.rst
b/Documentation/dev-tools/kasan.rst
index 1651d961f06a..a248ac3941be 100644
--- a
On Mon, Feb 8, 2021 at 11:48 AM Marco Elver wrote:
>
> On Fri, Feb 05, 2021 at 06:34PM +0100, Andrey Konovalov wrote:
> > Currently, krealloc() always calls ksize(), which unpoisons the whole
> > object including the redzone. This is inefficient, as kasan_krealloc()
> > r
On Tue, Feb 9, 2021 at 1:16 PM Vincenzo Frascino
wrote:
>
>
>
> On 2/9/21 12:02 PM, Catalin Marinas wrote:
> > On Mon, Feb 08, 2021 at 04:56:17PM +, Vincenzo Frascino wrote:
> >> From: Andrey Konovalov
> >>
> >> Asynchronous KASAN mode doesn'
On Mon, Feb 8, 2021 at 6:42 PM Christoph Hellwig wrote:
>
> On Fri, Feb 05, 2021 at 04:39:13PM +0100, Andrey Konovalov wrote:
> > Export mte_enable_kernel_sync() and mte_set_report_once() to fix:
> >
> > ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan
Only export MTE symbols when KASAN-KUnit tests are enabled.
Signed-off-by: Andrey Konovalov
---
Andrew, please squash this into:
"arm64: kasan: export MTE symbols for KASAN tests"
---
arch/arm64/kernel/mte.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kern
On Tue, Feb 9, 2021 at 6:07 PM Catalin Marinas wrote:
>
> On Tue, Feb 09, 2021 at 04:02:25PM +0100, Andrey Konovalov wrote:
> > On Tue, Feb 9, 2021 at 1:16 PM Vincenzo Frascino
> > wrote:
> > > On 2/9/21 12:02 PM, Catalin Marinas wrote:
> > > > On Mon, Feb
Hi Robert,
Thank you for your patch!
On 05.02.2021 13:43, Robert Foss wrote:
This driver supports multiple architecture versions of the Qualcomm ISP.
The CAMSS architecure which this driver is name after, and with the
introduction of this series, the Titan architecture.
The ISPIF is an IP-bloc
ap_pages().
Besides fixing the crash, this also makes the annotation order consistent
with debug_pagealloc_map_pages() preceding kasan_alloc_pages().
Signed-off-by: Andrey Konovalov
---
mm/page_alloc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/page_allo
On Mon, Jun 1, 2020 at 10:43 AM Greg KH wrote:
>
> On Mon, Jun 01, 2020 at 12:24:03AM -0700, syzbot wrote:
> > syzbot has bisected this bug to:
> >
> > commit f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10
> > Author: Andrey Konovalov
> > Date: Mon Feb 24 16:13:0
On Tue, May 19, 2020 at 4:24 AM Walter Wu wrote:
>
> This feature will record the last two call_rcu() call stacks and
> prints up to 2 call_rcu() call stacks in KASAN report.
>
> When call_rcu() is called, we store the call_rcu() call stack into
> slub alloc meta-data, so that the KASAN report can
$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
> diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c
> index 56ff8885fe2e..098a7dbaced6 100644
> --- a/mm/kasan/generic.c
> +++ b/mm/kasan/generic.c
> @@ -15,7 +15,6 @@
> */
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> -#define DISABLE_BRANCH_PROFILING
>
> #include
> #include
> --
> 2.26.2.761.g0e0b3e54be-goog
>
Reviewed-by: Andrey Konovalov
Thanks!
y: Dmitry Vyukov
> Acked-by: Paul E. McKenney
> Cc: Andrey Ryabinin
> Cc: Dmitry Vyukov
> Cc: Alexander Potapenko
> Cc: Andrew Morton
> Cc: Josh Triplett
> Cc: Mathieu Desnoyers
> Cc: Lai Jiangshan
> Cc: Joel Fernandes
> Cc: Andrey Konovalov
> ---
> in
On Thu, May 21, 2020 at 4:48 PM Jeff Layton wrote:
>
> On Thu, 2020-05-21 at 23:09 +0900, Tetsuo Handa wrote:
> > On 2020/05/21 5:53, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following crash on:
> > >
> > > HEAD commit:806d8acc USB: dummy-hcd: use configurable endpoint naming
>
On Tue, Aug 11, 2020 at 7:39 AM David Gow wrote:
>
> This patchset contains everything needed to integrate KASAN and KUnit.
>
> KUnit will be able to:
> (1) Fail tests when an unexpected KASAN error occurs
> (2) Pass tests when an expected KASAN error occurs
>
> Convert KASAN tests to KUnit with t
This goes on top of Walter's patch titled "kasan: fix KASAN unit tests
for tag-based KASAN" (already in mm tree).
Bugzilla link: https://bugzilla.kernel.org/show_bug.cgi?id=203497
Thanks to Walter Wu for debugging and testing.
Andrey Konovalov (4):
kasan: don't tag s
e it for
arm64's setup_arch() as a precaution (it doesn't have any stack variables
right now).
Signed-off-by: Andrey Konovalov
---
arch/arm64/kernel/setup.c | 2 +-
init/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/se
ds to false-positive reports.
Fix by resetting the tag of kernel stack pointers after allocation.
Signed-off-by: Andrey Konovalov
---
kernel/fork.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index d03c9586d342..9cea2265e677 100644
--- a/k
Use CONFIG_KASAN_STACK to enable stack tagging.
Note, that HWASAN short granules [1] are disabled. Supporting those will
require more kernel changes.
[1] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
Signed-off-by: Andrey Konovalov
---
scripts/Makefile.kasan | 3
Use OOB_TAG_OFF as access offset to land the access into the next granule.
Suggested-by: Walter Wu
Signed-off-by: Andrey Konovalov
---
lib/test_kasan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index f362f2662938..53e953bb1d1d
On Fri, Jul 31, 2020 at 6:43 AM David Gow wrote:
>
> This patchset contains everything needed to integrate KASAN and KUnit.
>
> KUnit will be able to:
> (1) Fail tests when an unexpected KASAN error occurs
> (2) Pass tests when an expected KASAN error occurs
>
> Convert KASAN tests to KUnit with t
On Sat, Aug 1, 2020 at 9:09 AM David Gow wrote:
>
> This patchset contains everything needed to integrate KASAN and KUnit.
>
> KUnit will be able to:
> (1) Fail tests when an unexpected KASAN error occurs
> (2) Pass tests when an expected KASAN error occurs
>
> Convert KASAN tests to KUnit with th
ere is a
> separate test file for those tests, which can be run as before as a
> module.
>
> Signed-off-by: Patricia Alfonso
> Signed-off-by: David Gow
> Reviewed-by: Brendan Higgins
> Reviewed-by: Andrey Konovalov
> Reviewed-by: Dmitry Vyukov
> ---
201 - 300 of 2085 matches
Mail list logo