Re: [PATCH v6 07/22] media: camss: Add support for VFE hardware version Titan 170

2021-03-09 Thread Andrey Konovalov
-off-by: Robert Foss --- Reviewed-by: Andrey Konovalov Thanks, Andrey Changes since v1: - Andrey: Remove commented out chunk - Remove left over WIP comments Changes since v4: - Andrey: Remove traces of PIX support - Andrey: Fix vfe_global_reset() overwriting reset command - Remove

Re: [PATCH v6 08/22] media: camss: Add missing format identifiers

2021-03-09 Thread Andrey Konovalov
the used Decode Format is the appropriate one to use. As the vendor specific identifiers differ between hardware generations, split them out into separate headers. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Thanks, Andrey --- Changes since v5 - Andrey: Gen 1 & Gen2 devi

Re: [PATCH v6 11/22] media: camss: Add support for CSIPHY hardware version Titan 170

2021-03-09 Thread Andrey Konovalov
Hi Robert, Thank you for your patch! On 04.03.2021 15:03, 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 Reviewed-by: Andrey Konovalov Thanks, Andrey --- Changes since v3

Re: [PATCH v6 06/22] media: camss: Refactor VFE HW version support

2021-03-09 Thread Andrey Konovalov
CAMSS ISP architecture. The ISP architecture developed after CAMSS, Titan, will be referred to as Gen2. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Thanks, Andrey --- Changes since v1 - kernel test robot: Re-add chunk missing from vfe_output_update_pong_addr - Andrey: Fix

Re: [PATCH v5 3/7] init_on_alloc: Unpessimize default-on builds

2021-03-10 Thread Andrey Konovalov
On Tue, Mar 9, 2021 at 10:43 PM Kees Cook wrote: > > Right now, the state of CONFIG_INIT_ON_ALLOC_DEFAULT_ON (and > ...ON_FREE...) did not change the assembly ordering of the static branch > tests. Use the new jump_label macro to check CONFIG settings to default > to the "expected" state, unpessim

Re: [PATCH v2 00/12] kasan: optimizations and fixes for HW_TAGS

2021-02-05 Thread Andrey Konovalov
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 > 2. "kasan: untag addresses for KFENCE" fix [2] (already in mm). > > [1] > https://lore.kernel.org/linux-arm-kerne

[PATCH v2 04/12] kasan: clean up setting free info in kasan_slab_free

2021-02-05 Thread Andrey Konovalov
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

[PATCH v2 06/12] kasan: rework krealloc tests

2021-02-05 Thread Andrey Konovalov
-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 5699e43ca01b..6e63ba62db09 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -258,11

[PATCH v2 02/12] kasan, mm: optimize kmalloc poisoning

2021-02-05 Thread Andrey Konovalov
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

[PATCH v2 11/12] kasan: inline HW_TAGS helper functions

2021-02-05 Thread Andrey Konovalov
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

Re: [PATCH v11 2/5] kasan: Add KASAN mode kernel parameter

2021-02-05 Thread Andrey Konovalov
On Mon, Feb 1, 2021 at 9:04 PM Andrey Konovalov wrote: > > 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_

[PATCH v2 01/12] kasan, mm: don't save alloc stacks twice

2021-02-05 Thread Andrey Konovalov
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

[PATCH v2 07/12] kasan, mm: fail krealloc on freed objects

2021-02-05 Thread 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 6e63ba62db09..791164ef191b 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -359,6 +359,25

[PATCH v2 03/12] kasan: optimize large kmalloc poisoning

2021-02-05 Thread Andrey Konovalov
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

[PATCH v2 05/12] kasan: unify large kfree checks

2021-02-05 Thread Andrey Konovalov
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 2d5de4092185..d53ea3c047bc 10

[PATCH v2 00/12] kasan: optimizations and fixes for HW_TAGS

2021-02-05 Thread Andrey Konovalov
etting 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 save alloc stacks twice kasan, mm: optimize k

[PATCH v2 09/12] kasan: ensure poisoning size alignment

2021-02-05 Thread 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(). Reviewed-by: Marco Elver Signed-off-by: Andrey Konovalov --- mm/kasa

[PATCH v2 10/12] arm64: kasan: simplify and inline MTE functions

2021-02-05 Thread Andrey Konovalov
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

Re: [PATCH] media: i2c: imx219: Implement V4L2_CID_LINK_FREQ control

2021-01-26 Thread Andrey Konovalov
Hi Dave, On 26.01.2021 16:01, Dave Stevenson wrote: Hi Andrey On Tue, 26 Jan 2021 at 07:50, Andrey Konovalov wrote: This control is needed for imx219 driver, as the link frequency is independent from the pixel rate in this case, and can't be calculated from the pixel rate. Signed-o

[PATCH] media: i2c: imx219: Implement V4L2_CID_LINK_FREQ control

2021-01-26 Thread Andrey Konovalov
This control is needed for imx219 driver, as the link frequency is independent from the pixel rate in this case, and can't be calculated from the pixel rate. Signed-off-by: Andrey Konovalov --- drivers/media/i2c/imx219.c | 15 ++- 1 file changed, 14 insertions(+), 1 del

Re: [PATCH 05/11] kasan, arm64: allow using KUnit tests with HW_TAGS mode

2021-01-15 Thread Andrey Konovalov
On Tue, Jan 12, 2021 at 8:01 PM Catalin Marinas wrote: > > On Tue, Jan 05, 2021 at 07:27:49PM +0100, Andrey Konovalov wrote: > > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > > index 3c40da479899..57d3f165d907 100644 > > --- a/arch/arm64/mm/fault.c > &g

Re: [PATCH 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Wed, Jan 13, 2021 at 5:54 PM Catalin Marinas wrote: > > On Wed, Jan 13, 2021 at 05:03:30PM +0100, Andrey Konovalov wrote: > > As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address > > that is passed to report_tag_fault has pointer tags in the for

Re: [PATCH 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Fri, Jan 15, 2021 at 4:07 PM Catalin Marinas wrote: > > On Fri, Jan 15, 2021 at 02:12:24PM +0100, Andrey Konovalov wrote: > > On Wed, Jan 13, 2021 at 5:54 PM Catalin Marinas > > wrote: > > > > > > On Wed, Jan 13, 2021 at 05:03:30PM +0100, Andrey Konov

Re: [PATCH 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Wed, Jan 13, 2021 at 5:54 PM Catalin Marinas wrote: > > On Wed, Jan 13, 2021 at 05:03:30PM +0100, Andrey Konovalov wrote: > > As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address > > that is passed to report_tag_fault has pointer tags in the for

Re: [PATCH 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Fri, Jan 15, 2021 at 5:56 PM Catalin Marinas wrote: > > On Fri, Jan 15, 2021 at 05:30:40PM +0100, Andrey Konovalov wrote: > > On Wed, Jan 13, 2021 at 5:54 PM Catalin Marinas > > wrote: > > > On Wed, Jan 13, 2021 at 05:03:30PM +0100, Andrey Konovalov wrote: >

Re: [PATCH v3 14/15] kasan: add a test for kmem_cache_alloc/free_bulk

2021-01-15 Thread Andrey Konovalov
On Fri, Jan 15, 2021 at 2:49 PM Alexander Potapenko wrote: > > On Fri, Jan 15, 2021 at 2:16 PM Marco Elver wrote: > > > > On Thu, Jan 14, 2021 at 08:36PM +0100, Andrey Konovalov wrote: > > > Add a test for kmem_cache_alloc/free_bulk to make sure there are no >

Re: [PATCH 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Fri, Jan 15, 2021 at 6:06 PM Catalin Marinas wrote: > > On Fri, Jan 15, 2021 at 06:00:36PM +0100, Andrey Konovalov wrote: > > On Fri, Jan 15, 2021 at 5:56 PM Catalin Marinas > > wrote: > > > > > > On Fri, Jan 15, 2021 at 05:30:40PM +0100, Andrey Konovalov

[PATCH v3 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
s in siginfo") Fixes: 4291e9ee6189 ("kasan, arm64: print report from tag fault handler") Signed-off-by: Andrey Konovalov --- arch/arm64/mm/fault.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 3c40da479

[PATCH v3 0/2] kasan: fixes for 5.11-rc

2021-01-15 Thread Andrey Konovalov
Changes v2->v3: - Fix up kernel pointer tag in do_tag_check_fault() instead of report_tag_fault(). Andrey Konovalov (2): kasan, mm: fix conflicts with init_on_alloc/free kasan, arm64: fix pointer tags in KASAN reports arch/arm64/mm/fault.c | 7 --- mm/slub.c | 7 ---

[PATCH v3 1/2] kasan, mm: fix conflicts with init_on_alloc/free

2021-01-15 Thread Andrey Konovalov
Acked-by: Vlastimil Babka Signed-off-by: Andrey Konovalov --- mm/slub.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index dc5b42e700b8..75fb097d990d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2791,7 +2791,8 @@ static __always_inline void ma

[PATCH v4 00/15] kasan: HW_TAGS tests support and fixes

2021-01-15 Thread Andrey Konovalov
ult(). Andrey Konovalov (15): kasan: prefix global functions with kasan_ kasan: clarify HW_TAGS impact on TBI kasan: clean up comments in tests kasan: add macros to simplify checking test constraints kasan: add match-all tag tests kasan, arm64: allow using KUnit tests with HW_TAGS mode ka

[PATCH v4 01/15] kasan: prefix global functions with kasan_

2021-01-15 Thread Andrey Konovalov
lesource.com/id/I719cc93483d4ba288a634dba80ee6b7f2809cd26 Suggested-by: Marco Elver Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- mm/kasan/common.c | 47 +++--- mm/kasan/generic.c| 36 ++--- mm/kasan/kasan.

[PATCH v4 02/15] kasan: clarify HW_TAGS impact on TBI

2021-01-15 Thread Andrey Konovalov
Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- Documentation/dev-tools/kasan.rst | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst index 0fc3fb1860c4..26c99852a852 100644

[PATCH v4 03/15] kasan: clean up comments in tests

2021-01-15 Thread Andrey Konovalov
Clarify and update comments in KASAN tests. Link: https://linux-review.googlesource.com/id/I6c816c51fa1e0eb7aa3dead6bda1f339d2af46c8 Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c| 59

[PATCH v4 05/15] kasan: add match-all tag tests

2021-01-15 Thread Andrey Konovalov
during execution for the SW_TAGS mode. Link: https://linux-review.googlesource.com/id/I78f1375efafa162b37f3abcb2c5bc2f3955dfd8e Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 92 mm

[PATCH v4 07/15] kasan: rename CONFIG_TEST_KASAN_MODULE

2021-01-15 Thread Andrey Konovalov
-by: Andrey Konovalov --- Documentation/dev-tools/kasan.rst | 8 lib/Kconfig.kasan | 2 +- lib/Makefile | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst index

[PATCH v4 11/15] kasan: move _RET_IP_ to inline wrappers

2021-01-15 Thread Andrey Konovalov
P_ to those wrappers to simplify annotation call sites. Link: https://linux-review.googlesource.com/id/I8fb3c06d49671305ee184175a39591bc26647a67 Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- include/linux/kasan.h | 20 +--- mm/memp

[PATCH v4 10/15] kasan: fix memory corruption in kasan_bitops_tags test

2021-01-15 Thread Andrey Konovalov
object's boundaries. Link: https://linux-review.googlesource.com/id/I67f51d1ee48f0a8d0fe2658c2a39e4879fe0832a Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH v4 13/15] kasan: add proper page allocator tests

2021-01-15 Thread Andrey Konovalov
: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 51 +++- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 566d894ba20b..ab22a653762e 100644 --- a/lib/test_kasan.c +++ b/lib

[PATCH v4 12/15] kasan: fix bug detection via ksize for HW_TAGS mode

2021-01-15 Thread Andrey Konovalov
eviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- include/linux/kasan-checks.h | 6 ++ include/linux/kasan.h| 17 + lib/test_kasan.c | 20 mm/kasan/common.c| 11 ++- mm/kasan/generic.c |

[PATCH v4 14/15] kasan: add a test for kmem_cache_alloc/free_bulk

2021-01-15 Thread Andrey Konovalov
Add a test for kmem_cache_alloc/free_bulk to make sure there are no false-positives when these functions are used. Link: https://linux-review.googlesource.com/id/I2a8bf797aecf81baeac61380c567308f319e263d Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov

[PATCH v4 09/15] kasan: adapt kmalloc_uaf2 test to HW_TAGS mode

2021-01-15 Thread Andrey Konovalov
is 1/14, which is quite noticable. Allow up to 16 attempts at generating different tags for the tag-based modes. Link: https://linux-review.googlesource.com/id/Ibfa458ef2804ff465d8eb07434a300bf36388d55 Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Kono

[PATCH v4 08/15] kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL

2021-01-15 Thread Andrey Konovalov
and use READ/WRITE_ONCE() for accessing fail_data fields. Link: https://linux-review.googlesource.com/id/I046079f48641a1d36fe627fc8827a9249102fd50 Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 17 - mm/kasan

[PATCH v4 06/15] kasan, arm64: allow using KUnit tests with HW_TAGS mode

2021-01-15 Thread Andrey Konovalov
report_tag_fault. With this patch KASAN tests are still failing for the hardware tag-based mode; fixes come in the next few patches. Link: https://linux-review.googlesource.com/id/Id94dc9eccd33b23cda4950be408c27f879e474c8 Reviewed-by: Catalin Marinas Reviewed-by: Vincenzo Frascino Signed-off-by: Andrey

[PATCH v4 15/15] kasan: don't run tests when KASAN is not enabled

2021-01-15 Thread Andrey Konovalov
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 Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov

[PATCH v4 04/15] kasan: add macros to simplify checking test constraints

2021-01-15 Thread Andrey Konovalov
: Marco Elver Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 101 +++ 1 file changed, 31 insertions(+), 70 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 6f46e27c2af7..714ea27fcc3e 100644 --- a

Re: [PATCH v3 2/2] kasan, arm64: fix pointer tags in KASAN reports

2021-01-15 Thread Andrey Konovalov
On Fri, Jan 15, 2021 at 6:59 PM Catalin Marinas wrote: > > On Fri, Jan 15, 2021 at 06:41:53PM +0100, Andrey Konovalov wrote: > > As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address > > that is passed to report_tag_fault has pointer tags in the for

[PATCH] kasan: fix HW_TAGS boot parameters

2021-01-15 Thread Andrey Konovalov
n kasan.fault=report kasan.stacktrace=on (if CONFIG_DEBUG_KERNEL=y) kasan.stacktrace=off (otherwise) Link: https://linux-review.googlesource.com/id/Ib3694ed90b1e8ccac6cf77dfd301847af4aba7b8 Signed-off-by: Andrey Konovalov --- Documentation/dev-tools/kasan.rst | 27 +++ mm/kasan/hw_tags.c

Re: [PATCH v3 1/4] kasan, arm64: Add KASAN light mode

2021-01-15 Thread Andrey Konovalov
DE_LIGHT config option and the > "light" kernel command line option to enable the described feature. > This patch introduces the kasan_def.h header to make easier to propagate > the relevant enumerations to the architectural code. > > Cc: Dmitry Vyukov > Cc: Andrey Ryabinin

Re: [PATCH v3 1/4] kasan, arm64: Add KASAN light mode

2021-01-16 Thread Andrey Konovalov
On Sat, Jan 16, 2021 at 2:37 PM Vincenzo Frascino wrote: > > > [1] https://lkml.org/lkml/2021/1/15/1242 > > > > Thanks for this. I will have a look into it today. In the meantime, could you > please elaborate a bit more on kasan.trap? That's what I call the boot parameter that allows switching be

Re: [PATCH v3 1/4] kasan, arm64: Add KASAN light mode

2021-01-16 Thread Andrey Konovalov
On Sat, Jan 16, 2021 at 2:43 PM Vincenzo Frascino wrote: > On 1/15/21 3:08 PM, Mark Rutland wrote: > > On Fri, Jan 15, 2021 at 12:00:40PM +, Vincenzo Frascino wrote: > >> Architectures supported by KASAN HW can provide a light mode of > >> execution. On an MTE enabled arm64 hw for example this

[PATCH 1/2] usb: raw-gadget: add copyright

2021-01-23 Thread Andrey Konovalov
Add copyright to drivers/usb/gadget/legacy/raw_gadget.c. Signed-off-by: Andrey Konovalov --- drivers/usb/gadget/legacy/raw_gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/raw_gadget.c b/drivers/usb/gadget/legacy/raw_gadget.c index

[PATCH 2/2] usb: raw-gadget: update documentation and Kconfig

2021-01-23 Thread Andrey Konovalov
Update Raw Gadget documentation and Kconfig. Make the description more precise and clear, fix typos and grammar mistakes, and do other cleanups. Signed-off-by: Andrey Konovalov --- Documentation/usb/raw-gadget.rst | 102 -- drivers/usb/gadget/legacy/Kconfig | 13

Re: [PATCH] media: i2c: imx219: Implement V4L2_CID_LINK_FREQ control

2021-01-27 Thread Andrey Konovalov
Hi David, On 27.01.2021 18:25, Dave Stevenson wrote: Hi Andrey On Tue, 26 Jan 2021 at 15:55, Andrey Konovalov wrote: Hi Dave, On 26.01.2021 16:01, Dave Stevenson wrote: Hi Andrey On Tue, 26 Jan 2021 at 07:50, Andrey Konovalov wrote: This control is needed for imx219 driver, as the

Re: WARNING in __do_kernel_fault

2021-01-27 Thread Andrey Konovalov
On Wed, Jan 27, 2021 at 6:24 PM Dmitry Vyukov wrote: > > On Wed, Jan 27, 2021 at 6:15 PM Will Deacon wrote: > > > > On Wed, Jan 27, 2021 at 06:00:30PM +0100, Dmitry Vyukov wrote: > > > On Wed, Jan 27, 2021 at 5:56 PM syzbot > > > wrote: > > > > > > > > Hello, > > > > > > > > syzbot found the fol

Re: WARNING in __do_kernel_fault

2021-01-27 Thread Andrey Konovalov
On Wed, Jan 27, 2021 at 7:57 PM Dmitry Vyukov wrote: > > On Wed, Jan 27, 2021 at 7:46 PM 'Andrey Konovalov' via syzkaller-bugs > wrote: > > > > On Wed, Jan 27, 2021 at 6:24 PM Dmitry Vyukov wrote: > > > > > > On Wed, Jan 27, 2021 at 6:15 PM W

Re: KASAN: invalid-access Read in kmem_cache_destroy

2021-01-27 Thread Andrey Konovalov
On Wed, Jan 27, 2021 at 6:44 PM Mark Brown wrote: > > On Wed, Jan 27, 2021 at 06:14:13PM +0100, Dmitry Vyukov wrote: > > On Wed, Jan 27, 2021 at 5:58 PM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:2ab38c17 mailmap: remove the "

Re: WARNING in __do_kernel_fault

2021-01-27 Thread Andrey Konovalov
On Wed, Jan 27, 2021 at 8:43 PM Dmitry Vyukov wrote: > > > > > > > This happens on arm64 instance with mte enabled. > > > > > > > There is a GPF in reiserfs_xattr_init on x86_64 reported: > > > > > > > https://syzkaller.appspot.com/bug?id=8abaedbdeb32c861dc5340544284167dd0e46cde > > > > > > > so I

Re: [PATCH v9 0/4] arm64: ARMv8.5-A: MTE: Add async mode support

2021-01-27 Thread Andrey Konovalov
t mte/v10.async.akpm > > Cc: Andrew Morton > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Dmitry Vyukov > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Marco Elver > Cc: Evgenii Stepanov > Cc: Branislav Rankov > Cc: Andrey Konovalov > Signed-off-by:

Re: [PATCH] kasan: export kasan_poison

2021-01-27 Thread Andrey Konovalov
On Mon, Jan 25, 2021 at 12:28 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > The unit test module fails to build after adding a reference > to kasan_poison: > > ERROR: modpost: "kasan_poison" [lib/test_kasan.ko] undefined! > > Export this symbol to make it available to loadable modules. Cou

Re: [PATCH] kasan: export kasan_poison

2021-01-27 Thread Andrey Konovalov
On Wed, Jan 27, 2021 at 10:25 PM Andrey Konovalov wrote: > > On Mon, Jan 25, 2021 at 12:28 PM Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > The unit test module fails to build after adding a reference > > to kasan_poison: > > > > E

[PATCH 00/11] kasan: HW_TAGS tests support and fixes

2021-01-05 Thread Andrey Konovalov
This patchset adds support for running KASAN-KUnit tests with the hardware tag-based mode and also contains a few fixes. Andrey Konovalov (11): kasan: prefix exported functions with kasan_ kasan: clarify HW_TAGS impact on TBI kasan: clean up comments in tests kasan: add match-all tag

[PATCH 03/11] kasan: clean up comments in tests

2021-01-05 Thread Andrey Konovalov
Clarify and update comments and info messages in KASAN tests. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I6c816c51fa1e0eb7aa3dead6bda1f339d2af46c8 --- lib/test_kasan.c| 94 +++-- lib/test_kasan_module.c | 5 ++- 2

[PATCH 01/11] kasan: prefix exported functions with kasan_

2021-01-05 Thread Andrey Konovalov
- Rename internal (un)poison_range() to kasan_(un)poison() (no _range) to avoid name collision with a public kasan_unpoison_range(). - Rename check_memory_region() to kasan_check_range(), as it seems to be a more fitting name. Suggested-by: Marco Elver Signed-off-by: Andrey Konovalov Li

[PATCH 04/11] kasan: add match-all tag tests

2021-01-05 Thread Andrey Konovalov
during execution for the SW_TAGS mode. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I78f1375efafa162b37f3abcb2c5bc2f3955dfd8e --- lib/test_kasan.c | 93 mm/kasan/kasan.h | 6 2 files changed, 99 insertions

[PATCH 11/11] kasan: add proper page allocator tests

2021-01-05 Thread Andrey Konovalov
The currently existing page allocator tests rely on kmalloc fallback with large sizes that is only present for SLUB. Add proper tests that use alloc/free_pages(). Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Ia173d5a1b215fe6b2548d814ef0f4433cf983570 --- lib

[PATCH 09/11] kasan: fix memory corruption in kasan_bitops_tags test

2021-01-05 Thread Andrey Konovalov
object's boundaries. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I67f51d1ee48f0a8d0fe2658c2a39e4879fe0832a --- lib/test_kasan.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index b67da7f

[PATCH 05/11] kasan, arm64: allow using KUnit tests with HW_TAGS mode

2021-01-05 Thread Andrey Konovalov
the hardware tag-based mode; fixes come in the next few patches. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Id94dc9eccd33b23cda4950be408c27f879e474c8 --- arch/arm64/include/asm/memory.h| 1 + arch/arm64/include/asm/mte-kasan.h | 12 + arch/arm64

[PATCH 08/11] kasan: adopt kmalloc_uaf2 test to HW_TAGS mode

2021-01-05 Thread Andrey Konovalov
is 1/14, which is quite noticable. Allow up to 4 attempts at generating different tags for the tag-based modes. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Ibfa458ef2804ff465d8eb07434a300bf36388d55 --- lib/test_kasan.c | 9 + 1 file changed, 9 inser

[PATCH 10/11] kasan: fix bug detection via ksize for HW_TAGS mode

2021-01-05 Thread Andrey Konovalov
s detected via ksize() itself, and via plain accesses that happen later. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Iaabf771881d0f9ce1b969f2a62938e99d3308ec5 --- include/linux/kasan-checks.h | 6 ++ include/linux/kasan.h| 13 + lib/te

[PATCH 06/11] kasan: rename CONFIG_TEST_KASAN_MODULE

2021-01-05 Thread Andrey Konovalov
Rename CONFIG_TEST_KASAN_MODULE to CONFIG_KASAN_MODULE_TEST. This naming is more consistent with the existing CONFIG_KASAN_KUNIT_TEST. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Id347dfa5fe8788b7a1a189863e039f409da0ae5f --- Documentation/dev-tools/kasan.rst

[PATCH 07/11] kasan: add compiler barriers to KUNIT_EXPECT_KASAN_FAIL

2021-01-05 Thread Andrey Konovalov
. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I046079f48641a1d36fe627fc8827a9249102fd50 --- lib/test_kasan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index dd3d2f95c24e..b5077a47b95a 100644 --- a/lib/test_kasan.c

[PATCH 02/11] kasan: clarify HW_TAGS impact on TBI

2021-01-05 Thread Andrey Konovalov
Mention in the documentation that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI (Top Byte Ignore) being enabled. Also do a few minor documentation cleanups. Signed-off-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/Iba2a6697e3c6304cb53f89ec61dedc77fa29e3ae

Re: [PATCH v5] kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq

2021-01-05 Thread Andrey Konovalov
On Mon, Dec 28, 2020 at 3:51 PM Greg Kroah-Hartman wrote: > > On Tue, Nov 24, 2020 at 12:47:25AM +0100, Andrey Konovalov wrote: > > Currently there's a kcov remote coverage collection section in > > __usb_hcd_giveback_urb(). Initially that section was added based on

[PATCH] kcov, usb: hide in_serving_softirq checks in __usb_hcd_giveback_urb

2021-01-05 Thread Andrey Konovalov
Done opencode in_serving_softirq() checks in in_serving_softirq() to avoid cluttering the code, hide them in kcov helpers instead. Fixes: aee9ddb1d371 ("kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq") Signed-off-by: Andrey Konovalov --- drivers/usb/core/

Re: [PATCH] lkdtm: disable KASAN for rodata.o

2020-12-15 Thread Andrey Konovalov
AN_SANITIZE_stackleak.o := n > KCOV_INSTRUMENT_rodata.o := n > > > base-commit: 2c85ebc57b3e1817b6ce1a6b703928e113a90442 > -- > 2.29.2.684.gfbc64c5ab5-goog > Reviewed-by: Andrey Konovalov Thanks for taking care of this!

Re: WARNING in yurex_write/usb_submit_urb

2020-12-15 Thread Andrey Konovalov
On Mon, Dec 14, 2020 at 4:16 PM Johan Hovold wrote: > > On Mon, Dec 14, 2020 at 04:06:49PM +0100, Andrey Konovalov wrote: > > On Mon, Dec 14, 2020 at 4:02 PM Johan Hovold wrote: > > > > > > On Mon, Dec 14, 2020 at 06:48:03AM -0800, syzbot wrote: > > > >

Re: WARNING in yurex_write/usb_submit_urb

2020-12-14 Thread Andrey Konovalov
On Mon, Dec 14, 2020 at 4:02 PM Johan Hovold wrote: > > On Mon, Dec 14, 2020 at 06:48:03AM -0800, syzbot wrote: > > Hello, > > > > syzbot has tested the proposed patch but the reproducer is still triggering > > an issue: > > WARNING in yurex_write/usb_submit_urb > > It appears syzbot never tested

Re: [PATCH v2 2/2] media: dt-bindings: media: i2c: Add IMX300 CMOS sensor binding

2020-11-27 Thread Andrey Konovalov
Hi AngeloGioacchino, On 29.10.2020 20:29, khol...@gmail.com wrote: From: AngeloGioacchino Del Regno Add YAML device tree binding for IMX300 CMOS image sensor, and the relevant MAINTAINERS entries. Signed-off-by: AngeloGioacchino Del Regno --- .../bindings/media/i2c/sony,imx300.yaml |

Re: Potential out-of-bounds in ftrace_regex_release

2013-10-14 Thread Andrey Konovalov
Testing now with your patch. I've seen this report only twice, so it will be difficult to say if it's not happening any more or just not triggered. On Thu, Oct 10, 2013 at 6:23 AM, Steven Rostedt wrote: > On Wed, 9 Oct 2013 14:05:26 +0400 > Andrey Konovalov wrote: > >>

Re: Potential out-of-bounds in ftrace_regex_release

2013-10-21 Thread Andrey Konovalov
On Fri, Oct 18, 2013 at 11:09 PM, Steven Rostedt wrote: > Can I assume that this is fixed? I'll put it in for 3.12 and mark it > for stable too. I think yes. OK. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Fwd: Potential data race in psmouse_interrupt

2015-07-22 Thread Andrey Konovalov
Hi! We are working on a dynamic data race detector for Linux kernel called KernelThreadSanitizer (ktsan) (https://github.com/google/ktsan/wiki). Here is a report we got while running ktsan (upstream revision 21bdb584af8cca7c6df3c44cba268be050a234eb). =

Re: Potential data race in psmouse_interrupt

2015-07-23 Thread Andrey Konovalov
DBG: first offset: 0, second offset: 0 DBG: T397 clock: {T397: 175738, T6: 2266233} DBG: T6 clock: {T6: 2266336} ====== On Thu, Jul 23, 2015 at 3:08 PM, Pali Rohár wrote: > On Wednesday 22 July 2015 15:14:42 Andrey Konovalov wrote: >>

Potential data race in uart_ioctl

2015-08-25 Thread Andrey Konovalov
Hi! We are working on a dynamic data race detector for the Linux kernel called KernelThreadSanitizer (ktsan) (https://github.com/google/ktsan/wiki). While booting the kernel (upstream revision 21bdb584af8c) we got a report: == Threa

Potential data race in SyS_swapon

2015-08-07 Thread Andrey Konovalov
Hi! We are working on a dynamic data race detector for the Linux kernel called KernelThreadSanitizer (ktsan) (https://github.com/google/ktsan/wiki). While running ktsan on the upstream revision 21bdb584af8c with trinity we got a few reports from SyS_swapon, here is one of them: =

Re: Multiple potential races on vma->vm_flags

2015-09-10 Thread Andrey Konovalov
Can a vma be shared among a few mm's? If yes, then taking current->mm->mmap_sem to protect vma is not enough. In the first report below both T378 and T398 take current->mm->mmap_sem at mm/mlock.c:650, but they turn out to be different locks (the addresses are different). In the second report T309

Use-after-free in kobject_put (scsi_host_dev_release)

2015-09-11 Thread Andrey Konovalov
Hi! While fuzzing the kernel (b8889c4fc6) with KASAN and Trinity I got the following report: (There are a few similar reports after this one, look here: https://gist.github.com/xairy/82746e5a5876d398a88c) == BUG: KASAN: use-after-fre

Out-of-bounds in crc16 (ext4_group_desc_csum)

2015-09-11 Thread Andrey Konovalov
Hi! While fuzzing the kernel (b8889c4fc6) with KASAN and Trinity I got the following report: (There are many similar reports after this one with accessed addressed being increased) == BUG: KASan: out of bounds access in crc16+0x24/0x

Potential data race in dput and __d_lookup

2014-11-20 Thread Andrey Konovalov
Hi We are working on a dynamic data race detector for Linux kernel called KernelThreadSanitizer (ktsan) (https://code.google.com/p/thread-sanitizer/wiki/ThreadSanitizerForKernel). Here is a report we got while running ktsan (upstream revision fc14f9c1272f62c3e8d01300f52467c0d9af50f9, Linux 3.18-r

Re: [PATCH v11 02/19] Add kernel address sanitizer infrastructure.

2015-02-03 Thread Andrey Konovalov
Sorry I didn't reply earlier. Signed-off-by: Andrey Konovalov (Repeating in plain text.) On Wed, Feb 4, 2015 at 2:04 AM, Andrew Morton wrote: > On Tue, 03 Feb 2015 20:42:55 +0300 Andrey Ryabinin > wrote: > >> >> ... >> >> Based on work by Andrey Konova

[PATCH v2 7/7] kasan: update reference to kasan prototype repo

2015-09-14 Thread Andrey Konovalov
Update the reference to the kasan prototype repository on github, since it was renamed. Signed-off-by: Andrey Konovalov --- mm/kasan/kasan.c | 2 +- mm/kasan/report.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 61c9620

[PATCH v2 0/7] kasan: various fixes

2015-09-14 Thread Andrey Konovalov
Andrey Konovalov (7): kasan: update reported bug types for not user nor kernel memory accesses kasan: update reported bug types for kernel memory accesses kasan: accurately determine the type of the bad access kasan: update log messages kasan: various fixes in documentation kasan: move

[PATCH v2 2/7] kasan: update reported bug types for kernel memory accesses

2015-09-14 Thread Andrey Konovalov
Update the names of the bad access types to better reflect the type of the access that happended and make these error types "literals" that can be used for classification and deduplication in scripts. Signed-off-by: Andrey Konovalov --- mm/kasan/report.c | 18 +++--- 1 fi

[PATCH v2 6/7] kasan: move KASAN_SANITIZE in arch/x86/boot/Makefile

2015-09-14 Thread Andrey Konovalov
Move KASAN_SANITIZE in arch/x86/boot/Makefile above the comment related to SVGA_MODE, since the comment refers to 'the next line'. Signed-off-by: Andrey Konovalov --- arch/x86/boot/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/boot/Makefile

[PATCH v2 1/7] kasan: update reported bug types for not user nor kernel memory accesses

2015-09-14 Thread Andrey Konovalov
this change. For userspace ASan we have a bunch of systems that analyze error types for the purpose of classification and deduplication. Sooner of later we will write them to KASAN as well. Then clearly and explicitly stated error types will bring value. Signed-off-by: Andrey Konovalov --- mm/

[PATCH v2 5/7] kasan: various fixes in documentation

2015-09-14 Thread Andrey Konovalov
Signed-off-by: Andrey Konovalov --- Documentation/kasan.txt | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt index 0d32355..d2f4c8f 100644 --- a/Documentation/kasan.txt +++ b

[PATCH v2 4/7] kasan: update log messages

2015-09-14 Thread Andrey Konovalov
We decided to use KASAN as the short name of the tool and KernelAddressSanitizer as the full one. Update log messages according to that. Signed-off-by: Andrey Konovalov --- arch/x86/mm/kasan_init_64.c | 2 +- mm/kasan/kasan.c| 2 +- mm/kasan/report.c | 4 ++-- 3 files

[PATCH v2 3/7] kasan: accurately determine the type of the bad access

2015-09-14 Thread Andrey Konovalov
Makes KASAN accurately determine the type of the bad access. If the shadow byte value is in the [0, KASAN_SHADOW_SCALE_SIZE) range we can look at the next shadow byte to determine the type of the access. Signed-off-by: Andrey Konovalov --- mm/kasan/report.c | 17 ++--- 1 file

Re: [PATCH v4 3/3] powerpc/32: Add KASAN support

2019-02-11 Thread Andrey Konovalov
On Sat, Feb 9, 2019 at 12:55 PM christophe leroy wrote: > > Hi Andrey, > > Le 08/02/2019 à 18:40, Andrey Konovalov a écrit : > > On Fri, Feb 8, 2019 at 6:17 PM Christophe Leroy > > wrote: > >> > >> Hi Daniel, > >> > >> Le 08/

Re: [PATCH] slub: fix SLAB_CONSISTENCY_CHECKS + KASAN_SW_TAGS

2019-02-11 Thread Andrey Konovalov
[0.00] idr_alloc_u32+0x11c/0x2a4 > [0.00] idr_alloc+0x74/0xe0 > [0.00] worker_pool_assign_id+0x5c/0xbc > [0.00] workqueue_init_early+0x49c/0xd50 > [0.00] start_kernel+0x52c/0xac4 > [0.00] FIX radix_tree_node: Marking all objects used

<    2   3   4   5   6   7   8   9   10   11   >