lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 12 Feb 2022 22:26:21 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Lecopzer Chen <lecopzer.chen@...iatek.com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        andreyknvl@...il.com, anshuman.khandual@....com, ardb@...nel.org,
        arnd@...db.de, dvyukov@...gle.com, geert+renesas@...der.be,
        glider@...gle.com, kasan-dev@...glegroups.com,
        linux@...linux.org.uk, lukas.bulwahn@...il.com,
        mark.rutland@....com, masahiroy@...nel.org, matthias.bgg@...il.com,
        rmk+kernel@...linux.org.uk, ryabinin.a.a@...il.com,
        yj.chiang@...iatek.com
Subject: Re: [PATCH v2 1/2] arm: kasan: support CONFIG_KASAN_VMALLOC

Hi Lecopzer,

thanks for working on this! I need this support too.

On Sat, Feb 12, 2022 at 8:47 AM Lecopzer Chen
<lecopzer.chen@...iatek.com> wrote:

> Simply make shadow of vmalloc area mapped on demand.
>
> This can fix ARM_MODULE_PLTS with KASAN and provide first step
> to support CONFIG_VMAP_STACK in ARM.
>
> Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>

(...)

> -       kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START),
> +       if (!IS_ENABLED(CONFIG_KASAN_VMALLOC))
> +               kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START),
> +                                           kasan_mem_to_shadow((void *)VMALLOC_END));
> +
> +       kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_END),
>                                     kasan_mem_to_shadow((void *)-1UL) + 1);

Where is this actually mapped?

Can you print out where
kasan_mem_to_shadow((void *)VMALLOC_START)
kasan_mem_to_shadow((void *)VMALLOC_END)
as well as KASAN_SHADOW_START and KASAN_SHADOW_END
points?

When I looked into this getting the shadow memory between
KASAN_SHADOW_START and KASAN_SHADOW_END
seemed like the big problem since this is static, so how is Kasan
solving this now?

Please patch the picture in
include/asm/kasan_def.h
and the info in
Documentation/arm/memory.rst
so it clearly reflects where VMALLOC is shadowed.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ