On Wed, Jun 1, 2016 at 6:31 PM, Alexander Potapenko <gli...@google.com> wrote:
> On Wed, Jun 1, 2016 at 5:23 PM, Andrey Ryabinin <aryabi...@virtuozzo.com>
> wrote:
>> On 05/31/2016 08:49 PM, Alexander Potapenko wrote:
>>> On Tue, May 31, 2016 at 1:5
On Wed, Jun 1, 2016 at 6:31 PM, Alexander Potapenko wrote:
> On Wed, Jun 1, 2016 at 5:23 PM, Andrey Ryabinin
> wrote:
>> On 05/31/2016 08:49 PM, Alexander Potapenko wrote:
>>> On Tue, May 31, 2016 at 1:52 PM, Andrey Ryabinin
>>> wrote:
>>>>
>>>
On Wed, Jun 1, 2016 at 5:23 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> wrote:
> On 05/31/2016 08:49 PM, Alexander Potapenko wrote:
>> On Tue, May 31, 2016 at 1:52 PM, Andrey Ryabinin
>> <aryabi...@virtuozzo.com> wrote:
>>>
>>>
>>> On 05
On Wed, Jun 1, 2016 at 5:23 PM, Andrey Ryabinin wrote:
> On 05/31/2016 08:49 PM, Alexander Potapenko wrote:
>> On Tue, May 31, 2016 at 1:52 PM, Andrey Ryabinin
>> wrote:
>>>
>>>
>>> On 05/31/2016 01:44 PM, Alexander Potapenko wrote:
>>>&
s/ryabinin/aryabinin/
On Wed, Jun 1, 2016 at 5:22 PM, Alexander Potapenko <gli...@google.com> wrote:
> On Wed, Jun 1, 2016 at 5:20 PM, Shuah Khan <shua...@osg.samsung.com> wrote:
>> Change the following memory hot-add error messages to info messages. There
>> is no
s/ryabinin/aryabinin/
On Wed, Jun 1, 2016 at 5:22 PM, Alexander Potapenko wrote:
> On Wed, Jun 1, 2016 at 5:20 PM, Shuah Khan wrote:
>> Change the following memory hot-add error messages to info messages. There
>> is no need for these to be errors.
>>
>> [8.22
WARNING: KASAN doesn't support memory hot-add\n");
> - pr_err("Memory hot-add will be disabled\n");
> + pr_info("WARNING: KASAN doesn't support memory hot-add\n");
> + pr_info("Memory hot-add will be disabled\n");
No objections, but let's wait for
"Memory hot-add will be disabled\n");
> + pr_info("WARNING: KASAN doesn't support memory hot-add\n");
> + pr_info("Memory hot-add will be disabled\n");
No objections, but let's wait for Andrey.
> hotplug_memory_notifier(kasan_mem_notifi
.
Signed-off-by: Alexander Potapenko <gli...@google.com>
Reported-by: Kuthonuzo Luruo <kuthonuzo.lu...@hpe.com>
---
include/linux/kasan.h | 8 ++--
mm/kasan/kasan.c | 48 +---
mm/mempool.c | 5 +++--
mm/slab.c |
.
Signed-off-by: Alexander Potapenko
Reported-by: Kuthonuzo Luruo
---
include/linux/kasan.h | 8 ++--
mm/kasan/kasan.c | 48 +---
mm/mempool.c | 5 +++--
mm/slab.c | 4 ++--
mm/slab.h | 2 +-
5 files changed
On Tue, May 31, 2016 at 1:52 PM, Andrey Ryabinin
<aryabi...@virtuozzo.com> wrote:
>
>
> On 05/31/2016 01:44 PM, Alexander Potapenko wrote:
>> Add a special shadow value to distinguish accesses to KASAN-specific
>> allocator metadata.
>>
>> Unlike Addres
On Tue, May 31, 2016 at 1:52 PM, Andrey Ryabinin
wrote:
>
>
> On 05/31/2016 01:44 PM, Alexander Potapenko wrote:
>> Add a special shadow value to distinguish accesses to KASAN-specific
>> allocator metadata.
>>
>> Unlike AddressSanitizer in the userspace, KASAN
and induce
crashes later on. Warning about such corruptions will ease the
debugging.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
mm/kasan/kasan.c | 15 +++
mm/kasan/kasan.h | 1 +
mm/kasan/report.c | 3 +++
3 files changed, 19 insertions(+)
diff --git a/mm
and induce
crashes later on. Warning about such corruptions will ease the
debugging.
Signed-off-by: Alexander Potapenko
---
mm/kasan/kasan.c | 15 +++
mm/kasan/kasan.h | 1 +
mm/kasan/report.c | 3 +++
3 files changed, 19 insertions(+)
diff --git a/mm/kasan/kasan.c b/mm/kasan
On Fri, May 27, 2016 at 7:30 PM, Christoph Lameter <c...@linux.com> wrote:
> On Fri, 27 May 2016, Alexander Potapenko wrote:
>
>> It's reasonable to rely on the fact that for every page allocated for a
>> kmem_cache the |slab_cache| field points to that cache. Without tha
On Fri, May 27, 2016 at 7:30 PM, Christoph Lameter wrote:
> On Fri, 27 May 2016, Alexander Potapenko wrote:
>
>> It's reasonable to rely on the fact that for every page allocated for a
>> kmem_cache the |slab_cache| field points to that cache. Without that it's
>> hard t
ntine
implementation")
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
mm/slab.c | 7 ++-
mm/slub.c | 8 +---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index cc8bbc1..ac6c251 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2703,8 +2703,1
ntine
implementation")
Signed-off-by: Alexander Potapenko
---
mm/slab.c | 7 ++-
mm/slub.c | 8 +---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index cc8bbc1..ac6c251 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2703,8 +2703,13 @@ static void slab_put_
Hello Alexey,
On Tue, May 17, 2016 at 12:03 AM, Alexey Klimov <klimov.li...@gmail.com> wrote:
> Hi Alexander,
>
> On Wed, May 11, 2016 at 6:18 PM, Alexander Potapenko <gli...@google.com>
> wrote:
>> Quarantine isolates freed objects in a separate queu
Hello Alexey,
On Tue, May 17, 2016 at 12:03 AM, Alexey Klimov wrote:
> Hi Alexander,
>
> On Wed, May 11, 2016 at 6:18 PM, Alexander Potapenko
> wrote:
>> Quarantine isolates freed objects in a separate queue. The objects are
>> returned to the allocator later, which h
>
> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com>
> Cc: Alexander Potapenko <gli...@google.com>
> Cc: Dmitry Vyukov <dvyu...@google.com>
> ---
> MAINTAINERS | 2 +-
> include/linux/kasan-checks.h | 12
> mm/kasan/kas
Ryabinin
> Cc: Alexander Potapenko
> Cc: Dmitry Vyukov
> ---
> MAINTAINERS | 2 +-
> include/linux/kasan-checks.h | 12
> mm/kasan/kasan.c | 12
> 3 files changed, 25 insertions(+), 1 deletion(-)
> create mode 10064
UG: KASAN: out-of-bounds access in memset+0x23/0x40 at
> After:
> BUG: KASAN: out-of-bounds access in at
>
> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com>
> Cc: Alexander Potapenko <gli...@google.com>
> Cc: Dmitry Vyuk
n memset+0x23/0x40 at
> After:
> BUG: KASAN: out-of-bounds access in at
>
> Signed-off-by: Andrey Ryabinin
> Cc: Alexander Potapenko
> Cc: Dmitry Vyukov
> ---
> mm/kasan/kasan.c | 64
> ++--
> 1 file cha
uarantine.c b/mm/kasan/quarantine.c
new file mode 100644
index 000..4973505
--- /dev/null
+++ b/mm/kasan/quarantine.c
@@ -0,0 +1,291 @@
+/*
+ * KASAN quarantine.
+ *
+ * Author: Alexander Potapenko <gli...@google.com>
+ * Copyright (C) 2016 Google, Inc.
+ *
+ * Based on code by Dmitry Ch
n/quarantine.c
new file mode 100644
index 000..4973505
--- /dev/null
+++ b/mm/kasan/quarantine.c
@@ -0,0 +1,291 @@
+/*
+ * KASAN quarantine.
+ *
+ * Author: Alexander Potapenko
+ * Copyright (C) 2016 Google, Inc.
+ *
+ * Based on code by Dmitry Chernenkov.
+ *
+ * This program is free software;
On Wed, May 11, 2016 at 4:30 PM, Alexander Potapenko <gli...@google.com> wrote:
> On Wed, May 11, 2016 at 1:11 PM, Andrey Ryabinin
> <aryabi...@virtuozzo.com> wrote:
>> On 05/11/2016 01:18 PM, Alexander Potapenko wrote:
>>> On Tue, May 10, 2016 at 3:3
On Wed, May 11, 2016 at 4:30 PM, Alexander Potapenko wrote:
> On Wed, May 11, 2016 at 1:11 PM, Andrey Ryabinin
> wrote:
>> On 05/11/2016 01:18 PM, Alexander Potapenko wrote:
>>> On Tue, May 10, 2016 at 3:38 PM, Andrey Ryabinin
>>> wrote:
>>>>
On Wed, May 11, 2016 at 1:11 PM, Andrey Ryabinin
<aryabi...@virtuozzo.com> wrote:
> On 05/11/2016 01:18 PM, Alexander Potapenko wrote:
>> On Tue, May 10, 2016 at 3:38 PM, Andrey Ryabinin
>> <aryabi...@virtuozzo.com> wrote:
>>> * Fix comment styles,
>>
On Wed, May 11, 2016 at 1:11 PM, Andrey Ryabinin
wrote:
> On 05/11/2016 01:18 PM, Alexander Potapenko wrote:
>> On Tue, May 10, 2016 at 3:38 PM, Andrey Ryabinin
>> wrote:
>>> * Fix comment styles,
>> yDid you remove the comments from include/linux/ka
page_alloc.c
> index 497befe..477d938 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -993,7 +993,7 @@ static __always_inline bool free_pages_prepare(struct
> page *page,
>
> trace_mm_page_free(page, order);
> kmemcheck_free_shadow(page, order);
> - kasan_poison_free_pages(page, order);
> + kasan_free_pages(page, order);
>
> /*
> * Check tail pages before head page information is cleared to
> diff --git a/mm/slab.c b/mm/slab.c
> index 3f20800..cc8bbc1 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3547,13 +3547,10 @@ free_done:
> static inline void __cache_free(struct kmem_cache *cachep, void *objp,
> unsigned long caller)
> {
> -#ifdef CONFIG_KASAN
> + /* Put the object into the quarantine, don't touch it for now. */
> if (kasan_slab_free(cachep, objp))
> - /* The object has been put into the quarantine, don't touch it
> -* for now.
> -*/
> return;
> -#endif
> +
> ___cache_free(cachep, objp, caller);
> }
>
> diff --git a/mm/slub.c b/mm/slub.c
> index f41360e..538c858 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1319,7 +1319,7 @@ static inline void kmalloc_large_node_hook(void *ptr,
> size_t size, gfp_t flags)
> static inline void kfree_hook(const void *x)
> {
> kmemleak_free(x);
> - kasan_poison_kfree_large(x);
> + kasan_kfree_large(x);
> }
>
> static inline void slab_free_hook(struct kmem_cache *s, void *x)
> @@ -1344,7 +1344,7 @@ static inline void slab_free_hook(struct kmem_cache *s,
> void *x)
> if (!(s->flags & SLAB_DEBUG_OBJECTS))
> debug_check_no_obj_freed(x, s->object_size);
>
> - kasan_poison_slab_free(s, x);
> + kasan_slab_free(s, x);
> }
>
> static inline void slab_free_freelist_hook(struct kmem_cache *s,
> --
> 2.7.3
>
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
ee_pages(element, (unsigned long)pool->pool_data);
> }
>
> static void kasan_unpoison_element(mempool_t *pool, void *element, gfp_t
> flags)
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 497befe..477d938 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_al
On Tue, May 10, 2016 at 9:57 PM, Andrey Ryabinin <ryabinin@gmail.com> wrote:
> 2016-05-10 20:17 GMT+03:00 Alexander Potapenko <gli...@google.com>:
>> On Tue, May 10, 2016 at 5:39 PM, Andrey Ryabinin <ryabinin@gmail.com>
>> wrote:
>>> 2016-03-1
On Tue, May 10, 2016 at 9:57 PM, Andrey Ryabinin wrote:
> 2016-05-10 20:17 GMT+03:00 Alexander Potapenko :
>> On Tue, May 10, 2016 at 5:39 PM, Andrey Ryabinin
>> wrote:
>>> 2016-03-15 13:10 GMT+03:00 Alexander Potapenko :
>>>
>>>>
>>>>
On Tue, May 10, 2016 at 5:39 PM, Andrey Ryabinin <ryabinin@gmail.com> wrote:
> 2016-03-15 13:10 GMT+03:00 Alexander Potapenko <gli...@google.com>:
>
>>
>> static inline int kasan_module_alloc(void *addr, size_t size) { return 0; }
>> static inline
On Tue, May 10, 2016 at 5:39 PM, Andrey Ryabinin wrote:
> 2016-03-15 13:10 GMT+03:00 Alexander Potapenko :
>
>>
>> static inline int kasan_module_alloc(void *addr, size_t size) { return 0; }
>> static inline void kasan_free_shadow(const struct vm_struct *vm) {}
>>
ndle.offset = depot_offset >> STACK_ALLOC_ALIGN;
> + stack->handle.valid = 1;
> memcpy(stack->entries, entries, size * sizeof(unsigned long));
> depot_offset += required_size;
>
> --
> 1.9.1
>
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
+139,7 @@ static struct stack_record *depot_alloc_stack(unsigned
> long *entries, int size,
> stack->size = size;
> stack->handle.slabindex = depot_index;
> stack->handle.offset = depot_offset >> STACK_ALLOC_ALIGN;
> + stack->handle.valid = 1;
&
On Mon, May 2, 2016 at 5:13 PM, Chen Gang <cheng...@emindsoft.com.cn> wrote:
> On 5/2/16 22:23, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 3:51 PM, Chen Gang <cheng...@emindsoft.com.cn> wrote:
>>>
>>> OK, thanks.
>>>
>>> An
On Mon, May 2, 2016 at 5:13 PM, Chen Gang wrote:
> On 5/2/16 22:23, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 3:51 PM, Chen Gang wrote:
>>>
>>> OK, thanks.
>>>
>>> And for "kasan_depth == 1", I guess, its meaning is related wi
On Mon, May 2, 2016 at 3:51 PM, Chen Gang <cheng...@emindsoft.com.cn> wrote:
> On 5/2/16 20:42, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 2:27 PM, Chen Gang <cheng...@emindsoft.com.cn> wrote:
>>> On 5/2/16 19:21, Dmitry Vyukov wrote:
>>>>
>&g
On Mon, May 2, 2016 at 3:51 PM, Chen Gang wrote:
> On 5/2/16 20:42, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 2:27 PM, Chen Gang wrote:
>>> On 5/2/16 19:21, Dmitry Vyukov wrote:
>>>>
>>>> Signed counter looks good to me.
>>>
>&g
to bark loudly, so that the unmatched annotations are noticed and
>> fixed.
>>
>
> How about BUG_ON()?
As noted by Dmitry in an offline discussion, we shouldn't bail out as
long as it's possible to proceed, otherwise the kernel may become very
hard to debug.
A mismatching annotation isn't a case in which we can't proceed with
the execution.
>
> Thanks.
> --
> Chen Gang (陈刚)
>
> Managing Natural Environments is the Duty of Human Beings.
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
excessive disable, then we can end up with ignores enabled
>> permanently. If we ignore an excessive enable, then we can end up with
>> ignores enabled when they should not be enabled. The main point here
>> is to bark loudly, so that the unmatched annotations are noticed and
&
ke:
>>
>> /* Sets status to KASAN_STATE_LOCKED if the current status is equal to
>> old_state, returns current state. Waits while current state equals
>> KASAN_STATE_LOCKED. */
>> u32 kasan_lock_if_state_equals(struct kasan_alloc_meta *meta, u32 old_state);
>>
>> /* Changes state from KASAN_STATE_LOCKED to new_state */
>> void kasan_unlock_and_set_status(struct kasan_alloc_meta *meta, u32
>> new_state);
>>
>> Then free can be expressed as:
>>
>> if (kasan_lock_if_state_equals(meta, KASAN_STATE_ALLOC) ==
>> KASAN_STATE_ALLOC) {
>>free_info = get_free_info(cache, object);
>>quarantine_put(free_info, cache);
>>set_track(_info->track, GFP_NOWAIT);
>>kasan_poison_slab_free(cache, object);
>>kasan_unlock_and_set_status(meta, KASAN_STATE_QUARANTINE);
>>return true;
>> }
>>
>> And on the reporting path we would need to lock the header, read all
>> state, unlock the header.
>>
>> Does it make sense?
>>
>> Please add the test as well. We need to start collecting tests for all
>> these tricky corner cases.
>>
>> Thanks!
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
The same is true for all other state transitions (e.g.
>> use-after-free racing with the object being pushed out of the
>> quarantine). We could introduce 2 helper functions like:
>>
>> /* Sets status to KASAN_STATE_LOCKED if the current status is equal to
>> old_state,
>
> static inline bool kasan_report_enabled(void)
> {
> - return !current->kasan_depth;
> + return !!current->kasan_depth;
> }
>
> void kasan_report(unsigned long addr, size_t size,
> --
> 1.9.3
>
--
Alexander Potapenko
Software Engineer
Googl
an_depth;
> + return !!current->kasan_depth;
> }
>
> void kasan_report(unsigned long addr, size_t size,
> --
> 1.9.3
>
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
On Mon, May 2, 2016 at 1:20 PM, Chen Gang <cheng...@emindsoft.com.cn> wrote:
> On 5/2/16 18:49, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 7:35 AM, <cheng...@emindsoft.com.cn> wrote:
>>>
>>> According to their comments and the kasan_depth's ini
On Mon, May 2, 2016 at 1:20 PM, Chen Gang wrote:
> On 5/2/16 18:49, Alexander Potapenko wrote:
>> On Mon, May 2, 2016 at 7:35 AM, wrote:
>>>
>>> According to their comments and the kasan_depth's initialization, if
>>> kasan_depth is zero, it means disable. So
> size_t new_size,
>
> static inline void kasan_slab_alloc(struct kmem_cache *s, void *object,
>gfp_t flags) {}
> -/* kasan_slab_free() returns true if the object has been put into quarantine.
> - */
> static inline bool kasan_slab_free(struct kmem_cache *s, vo
gfp_t flags) {}
> -/* kasan_slab_free() returns true if the object has been put into quarantine.
> - */
> static inline bool kasan_slab_free(struct kmem_cache *s, void *object)
> {
> return false;
> --
> 1.9.3
>
Acked-by: Alexander Pota
On Fri, Apr 22, 2016 at 11:32 PM, Andrew Morton
<a...@linux-foundation.org> wrote:
> On Wed, 13 Apr 2016 13:20:09 +0200 Alexander Potapenko <gli...@google.com>
> wrote:
>
>> Instead of calling kasan_krealloc(), which replaces the memory allocation
>> stack
On Fri, Apr 22, 2016 at 11:32 PM, Andrew Morton
wrote:
> On Wed, 13 Apr 2016 13:20:09 +0200 Alexander Potapenko
> wrote:
>
>> Instead of calling kasan_krealloc(), which replaces the memory allocation
>> stack ID (if stack depot is used), just unpoison the whole memo
Hi James,
On Wed, Apr 13, 2016 at 6:12 PM, James Morse <james.mo...@arm.com> wrote:
> Hi Alex,
>
> On 12/04/16 12:17, Alexander Potapenko wrote:
>> I also wonder if we can, say, land the change to arch/arm64/Kconfig
>> separately from makefile changes that improve the
Hi James,
On Wed, Apr 13, 2016 at 6:12 PM, James Morse wrote:
> Hi Alex,
>
> On 12/04/16 12:17, Alexander Potapenko wrote:
>> I also wonder if we can, say, land the change to arch/arm64/Kconfig
>> separately from makefile changes that improve the precision or fix
>> c
Do not bail out from depot_save_stack() if the stack trace has zero hash.
Initially depot_save_stack() silently dropped stack traces with zero
hashes, however there's actually no point in reserving this zero value.
Reported-by: Joonsoo Kim <iamjoonsoo@lge.com>
Signed-off-by: Ale
Do not bail out from depot_save_stack() if the stack trace has zero hash.
Initially depot_save_stack() silently dropped stack traces with zero
hashes, however there's actually no point in reserving this zero value.
Reported-by: Joonsoo Kim
Signed-off-by: Alexander Potapenko
---
lib
Add a test that makes sure ksize() unpoisons the whole chunk.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
v2: - splitted v1 into two patches
---
lib/test_kasan.c | 20
1 file changed, 20 insertions(+)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
Add a test that makes sure ksize() unpoisons the whole chunk.
Signed-off-by: Alexander Potapenko
---
v2: - splitted v1 into two patches
---
lib/test_kasan.c | 20
1 file changed, 20 insertions(+)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index 82169fb..48e5a0b
Instead of calling kasan_krealloc(), which replaces the memory allocation
stack ID (if stack depot is used), just unpoison the whole memory chunk.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
v2: - splitted v1 into two patches
---
mm/slab.c | 2 +-
mm/slub.c | 5 +++--
2
Instead of calling kasan_krealloc(), which replaces the memory allocation
stack ID (if stack depot is used), just unpoison the whole memory chunk.
Signed-off-by: Alexander Potapenko
---
v2: - splitted v1 into two patches
---
mm/slab.c | 2 +-
mm/slub.c | 5 +++--
2 files changed, 4 insertions
On Mon, Apr 4, 2016 at 7:30 PM, Dmitry Vyukov <dvyu...@google.com> wrote:
> On Thu, Mar 31, 2016 at 7:18 PM, Alexander Potapenko <gli...@google.com>
> wrote:
>> On Thu, Mar 31, 2016 at 7:14 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
>>> On Thu, Mar
On Mon, Apr 4, 2016 at 7:30 PM, Dmitry Vyukov wrote:
> On Thu, Mar 31, 2016 at 7:18 PM, Alexander Potapenko
> wrote:
>> On Thu, Mar 31, 2016 at 7:14 PM, Mark Rutland wrote:
>>> On Thu, Mar 31, 2016 at 06:33:24PM +0200, Alexander Potapenko wrote:
>>>> On T
There's actually no point in reserving the zero hash value.
Reported-by: Joonsoo Kim
---
lib/stackdepot.c | 4
1 file changed, 4 deletions(-)
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 654c9d8..9e0b031 100644
--- a/lib/stackdepot.c
+++
There's actually no point in reserving the zero hash value.
Reported-by: Joonsoo Kim
---
lib/stackdepot.c | 4
1 file changed, 4 deletions(-)
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 654c9d8..9e0b031 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -210,10 +210,6 @@
Instead of calling kasan_krealloc(), which replaces the memory allocation
stack ID (if stack depot is used), just unpoison the whole memory chunk.
Add a test that makes sure ksize() unpoisons the whole chunk.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
lib/test_kasan.
Instead of calling kasan_krealloc(), which replaces the memory allocation
stack ID (if stack depot is used), just unpoison the whole memory chunk.
Add a test that makes sure ksize() unpoisons the whole chunk.
Signed-off-by: Alexander Potapenko
---
lib/test_kasan.c | 20
mm
On Mon, Apr 11, 2016 at 4:39 PM, Alexander Potapenko <gli...@google.com> wrote:
> On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim <iamjoonsoo@lge.com> wrote:
>> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote:
>>> +depot_stack_handle_t depot
On Mon, Apr 11, 2016 at 4:39 PM, Alexander Potapenko wrote:
> On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim wrote:
>> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote:
>>> +depot_stack_handle_t depot_save_stack(struct
On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim <iamjoonsoo@lge.com> wrote:
> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote:
>> +depot_stack_handle_t depot_save_stack(struct stack_trace *trace,
>> + gfp_t alloc_flags)
&g
On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim wrote:
> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote:
>> +depot_stack_handle_t depot_save_stack(struct stack_trace *trace,
>> + gfp_t alloc_flags)
>>
On Thu, Mar 31, 2016 at 7:14 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
> On Thu, Mar 31, 2016 at 06:33:24PM +0200, Alexander Potapenko wrote:
>> On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
>> > On Thu, Mar 31, 2016 at 05:09:29PM +0
On Thu, Mar 31, 2016 at 7:14 PM, Mark Rutland wrote:
> On Thu, Mar 31, 2016 at 06:33:24PM +0200, Alexander Potapenko wrote:
>> On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland wrote:
>> > On Thu, Mar 31, 2016 at 05:09:29PM +0200, Alexander Potapenko wrote:
>> >>
On Thu, Mar 31, 2016 at 6:33 PM, Alexander Potapenko <gli...@google.com> wrote:
> On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
>> On Thu, Mar 31, 2016 at 05:09:29PM +0200, Alexander Potapenko wrote:
>>> On Thu, Mar 31, 2016 at 4:
On Thu, Mar 31, 2016 at 6:33 PM, Alexander Potapenko wrote:
> On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland wrote:
>> On Thu, Mar 31, 2016 at 05:09:29PM +0200, Alexander Potapenko wrote:
>>> On Thu, Mar 31, 2016 at 4:29 PM, Mark Rutland wrote:
>>> > Hi,
>>>
On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
> On Thu, Mar 31, 2016 at 05:09:29PM +0200, Alexander Potapenko wrote:
>> On Thu, Mar 31, 2016 at 4:29 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
>> > Hi,
>> >
>> > On
On Thu, Mar 31, 2016 at 6:00 PM, Mark Rutland wrote:
> On Thu, Mar 31, 2016 at 05:09:29PM +0200, Alexander Potapenko wrote:
>> On Thu, Mar 31, 2016 at 4:29 PM, Mark Rutland wrote:
>> > Hi,
>> >
>> > On Thu, Mar 31, 2016 at 03:54:45PM +0200, Alexander Pota
On Thu, Mar 31, 2016 at 4:29 PM, Mark Rutland <mark.rutl...@arm.com> wrote:
> Hi,
>
> On Thu, Mar 31, 2016 at 03:54:45PM +0200, Alexander Potapenko wrote:
>> Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
>> arch/arm64/lib/delay.c
>
> Why do we d
On Thu, Mar 31, 2016 at 4:29 PM, Mark Rutland wrote:
> Hi,
>
> On Thu, Mar 31, 2016 at 03:54:45PM +0200, Alexander Potapenko wrote:
>> Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
>> arch/arm64/lib/delay.c
>
> Why do we disable instrumentation of delay.
On Thu, Mar 31, 2016 at 3:54 PM, Alexander Potapenko <gli...@google.com> wrote:
> Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
> arch/arm64/lib/delay.c
>
> Signed-off-by: Alexander Potapenko <gli...@google.com>
> ---
> arch/arm64/Kconfig | 1 +
On Thu, Mar 31, 2016 at 3:54 PM, Alexander Potapenko wrote:
> Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
> arch/arm64/lib/delay.c
>
> Signed-off-by: Alexander Potapenko
> ---
> arch/arm64/Kconfig | 1 +
> arch/arm64/lib/Makefile | 3 +++
> 2 fil
Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
arch/arm64/lib/delay.c
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
arch/arm64/Kconfig | 1 +
arch/arm64/lib/Makefile | 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/K
Add ARCH_HAS_KCOV to ARM64 config. Disable instrumentation of
arch/arm64/lib/delay.c
Signed-off-by: Alexander Potapenko
---
arch/arm64/Kconfig | 1 +
arch/arm64/lib/Makefile | 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4f43622
Add the missing argument to set_track().
Fixes: cd11016e5f5212c13c0cec7384a525edc93b4921
("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB")
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
mm/kasan/kasan.c | 2 +-
1 file changed, 1 insertion(+), 1 d
Add the missing argument to set_track().
Fixes: cd11016e5f5212c13c0cec7384a525edc93b4921
("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB")
Signed-off-by: Alexander Potapenko
---
mm/kasan/kasan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
On Sun, Mar 20, 2016 at 2:14 AM, <valdis.kletni...@vt.edu> wrote:
> On Sat, 19 Mar 2016 13:13:59 +0100, Alexander Potapenko said:
>
>> Which GCC version were you using? Are you sure it didn't accidentally
>> enable the outline instrumentation (e.g. if the compiler is too
On Sun, Mar 20, 2016 at 2:14 AM, wrote:
> On Sat, 19 Mar 2016 13:13:59 +0100, Alexander Potapenko said:
>
>> Which GCC version were you using? Are you sure it didn't accidentally
>> enable the outline instrumentation (e.g. if the compiler is too old)?
>
> gcc --v
On Tue, Mar 15, 2016 at 1:22 PM, Andrey Ryabinin <ryabinin@gmail.com> wrote:
> 2016-03-15 12:27 GMT+03:00 Alexander Potapenko <gli...@google.com>:
>> On Mon, Mar 14, 2016 at 5:56 PM, Andrey Ryabinin <ryabinin@gmail.com>
>> wrote:
>>> 2016-03-1
On Tue, Mar 15, 2016 at 1:22 PM, Andrey Ryabinin wrote:
> 2016-03-15 12:27 GMT+03:00 Alexander Potapenko :
>> On Mon, Mar 14, 2016 at 5:56 PM, Andrey Ryabinin
>> wrote:
>>> 2016-03-14 13:43 GMT+03:00 Alexander Potapenko :
>>>
>>>>
On Tue, Mar 15, 2016 at 2:46 PM, David Laight <david.lai...@aculab.com> wrote:
> From: Alexander Potapenko
>> Sent: 15 March 2016 09:04
>> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET
>> socketpair with MSG_NOSIGNAL flag set must result in
On Tue, Mar 15, 2016 at 2:46 PM, David Laight wrote:
> From: Alexander Potapenko
>> Sent: 15 March 2016 09:04
>> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET
>> socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the
>> so
On Tue, Mar 15, 2016 at 2:20 PM, Eric Dumazet <eric.duma...@gmail.com> wrote:
> On Tue, 2016-03-15 at 10:03 +0100, Alexander Potapenko wrote:
>> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET
>> socketpair with MSG_NOSIGNAL flag set must result in a SIG
On Tue, Mar 15, 2016 at 2:20 PM, Eric Dumazet wrote:
> On Tue, 2016-03-15 at 10:03 +0100, Alexander Potapenko wrote:
>> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET
>> socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the
>> socket i
the
__softirq_entry macro which is similar to __irq_entry, but puts the
corresponding functions to the .softirqentry.text section.
Signed-off-by: Alexander Potapenko <gli...@google.com>
Acked-by: Steven Rostedt <rost...@goodmis.org>
---
v2: - per request from Steven Rostedt, moved the
the
__softirq_entry macro which is similar to __irq_entry, but puts the
corresponding functions to the .softirqentry.text section.
Signed-off-by: Alexander Potapenko
Acked-by: Steven Rostedt
---
v2: - per request from Steven Rostedt, moved the declarations of __softirq_entry
and __irq_entry to
v3
support is only enabled in SLAB allocator.
Unification of KASAN features in SLAB and SLUB will be done later.
This patch is based on the "mm: kasan: quarantine" patch originally
prepared by Dmitry Chernenkov.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
v2: - added co
Add KASAN hooks to SLAB allocator.
This patch is based on the "mm: kasan: unified support for SLUB and
SLAB allocators" patch originally prepared by Dmitry Chernenkov.
Signed-off-by: Alexander Potapenko <gli...@google.com>
---
v3: - minor description changes
- store d
support is only enabled in SLAB allocator.
Unification of KASAN features in SLAB and SLUB will be done later.
This patch is based on the "mm: kasan: quarantine" patch originally
prepared by Dmitry Chernenkov.
Signed-off-by: Alexander Potapenko
---
v2: - added copyright comments
- p
Add KASAN hooks to SLAB allocator.
This patch is based on the "mm: kasan: unified support for SLUB and
SLAB allocators" patch originally prepared by Dmitry Chernenkov.
Signed-off-by: Alexander Potapenko
---
v3: - minor description changes
- store deallocation info in kasan_slab_
701 - 800 of 1004 matches
Mail list logo