All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] KASan for Arm, v12
@ 2020-07-20  9:40 Linus Walleij
  2020-07-20 18:01 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2020-07-20  9:40 UTC (permalink / raw)
  To: Russell King; +Cc: kasan-dev, Linux ARM

Hi Russell,

please consider pulling in these changes to bring KASan
support to Arm.

Certainly there will be bugs like with all new code, but I
think we are in such good shape that in-tree development
is the best way to go from now so that interested people
can test this out.

I have tested it extensively on classic MMUs from ARMv4
to ARMv7 and also on LPAE. But now I need the help of
linux-next and the broader community to iron out any
remaining corner cases.

I will of course respect a "no" but then some direction would
be sweet. I could for example ask linux-next to include
this branch separately from v5.9-rc1 or so to get some
coverage.

Thanks!
Linus Walleij

The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407:

  Linux 5.8-rc1 (2020-06-14 12:45:04 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
tags/kasan-for-rmk

for you to fetch changes up to 5ebcc6d74e3b7791e3b1c3411a62d216fc5c5230:

  ARM: Enable KASan for ARM (2020-07-20 11:29:31 +0200)

----------------------------------------------------------------
KASan support for ARM, the v12 patch series.

----------------------------------------------------------------
Abbott Liu (1):
      ARM: Define the virtual space of KASan's shadow region

Andrey Ryabinin (3):
      ARM: Disable KASan instrumentation for some code
      ARM: Replace string mem* functions for KASan
      ARM: Enable KASan for ARM

Linus Walleij (1):
      ARM: Initialize the mapping of KASan shadow memory

 Documentation/arm/memory.rst                       |   5 +
 Documentation/dev-tools/kasan.rst                  |   4 +-
 .../features/debug/KASAN/arch-support.txt          |   2 +-
 arch/arm/Kconfig                                   |  10 +
 arch/arm/boot/compressed/Makefile                  |   1 +
 arch/arm/boot/compressed/string.c                  |  19 ++
 arch/arm/include/asm/kasan.h                       |  32 +++
 arch/arm/include/asm/kasan_def.h                   |  81 +++++++
 arch/arm/include/asm/memory.h                      |   5 +
 arch/arm/include/asm/pgalloc.h                     |   8 +-
 arch/arm/include/asm/string.h                      |  21 ++
 arch/arm/include/asm/thread_info.h                 |   8 +
 arch/arm/include/asm/uaccess-asm.h                 |   2 +-
 arch/arm/kernel/entry-armv.S                       |   3 +-
 arch/arm/kernel/entry-common.S                     |   9 +-
 arch/arm/kernel/head-common.S                      |   7 +-
 arch/arm/kernel/setup.c                            |   2 +
 arch/arm/kernel/unwind.c                           |   6 +-
 arch/arm/lib/memcpy.S                              |   3 +
 arch/arm/lib/memmove.S                             |   5 +-
 arch/arm/lib/memset.S                              |   3 +
 arch/arm/mm/Makefile                               |   5 +
 arch/arm/mm/kasan_init.c                           | 264 +++++++++++++++++++++
 arch/arm/mm/mmu.c                                  |  18 ++
 arch/arm/mm/pgd.c                                  |  16 +-
 arch/arm/vdso/Makefile                             |   2 +
 26 files changed, 527 insertions(+), 14 deletions(-)
 create mode 100644 arch/arm/include/asm/kasan.h
 create mode 100644 arch/arm/include/asm/kasan_def.h
 create mode 100644 arch/arm/mm/kasan_init.c

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] KASan for Arm, v12
  2020-07-20  9:40 [GIT PULL] KASan for Arm, v12 Linus Walleij
@ 2020-07-20 18:01 ` Florian Fainelli
  2020-07-21  7:36   ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2020-07-20 18:01 UTC (permalink / raw)
  To: Linus Walleij, Russell King; +Cc: Linux ARM, kasan-dev

Hi Linus,

On 7/20/20 2:40 AM, Linus Walleij wrote:
> Hi Russell,
> 
> please consider pulling in these changes to bring KASan
> support to Arm.
> 
> Certainly there will be bugs like with all new code, but I
> think we are in such good shape that in-tree development
> is the best way to go from now so that interested people
> can test this out.
> 
> I have tested it extensively on classic MMUs from ARMv4
> to ARMv7 and also on LPAE. But now I need the help of
> linux-next and the broader community to iron out any
> remaining corner cases.
> 
> I will of course respect a "no" but then some direction would
> be sweet. I could for example ask linux-next to include
> this branch separately from v5.9-rc1 or so to get some
> coverage.

I am still seeing crashes similar to the ones reported before with this
pull request, but maybe we can get it merged and address it later on
since this has been waiting forever to be merged.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] KASan for Arm, v12
  2020-07-20 18:01 ` Florian Fainelli
@ 2020-07-21  7:36   ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-07-21  7:36 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: Linux ARM, Russell King, kasan-dev

On Mon, Jul 20, 2020 at 8:01 PM Florian Fainelli <f.fainelli@gmail.com> wrote:

> I am still seeing crashes similar to the ones reported before with this
> pull request, but maybe we can get it merged and address it later on
> since this has been waiting forever to be merged.

We definitely need it fixed, my current working assumption is that at
least some of it is a result of the kernel growing big as a result of
enabling KASan.

Can you try to inspect the early memblock.memory.regions[0]
mapping debug prints as I pointed out here:
https://lore.kernel.org/linux-arm-kernel/CACRpkdYoMiVtnQEUiXy3Ezf3Z0dEQSVyA-9emDeewRKwonoUHQ@mail.gmail.com/#t

On the APQ8060 it seems the first memblock does not fit the
kernel+attached devicetree and the devicetree ends up in the
unmapped memory that is cleared by prepare_page_table()
but the Broadcom problem may be another one altogether.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-21  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  9:40 [GIT PULL] KASan for Arm, v12 Linus Walleij
2020-07-20 18:01 ` Florian Fainelli
2020-07-21  7:36   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.