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:   Thu, 13 Jun 2019 15:50:06 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Marco Elver <elver@...gle.com>, peterz@...radead.org,
        dvyukov@...gle.com, glider@...gle.com, andreyknvl@...gle.com,
        mark.rutland@....com, hpa@...or.com
Cc:     corbet@....net, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        x86@...nel.org, arnd@...db.de, jpoimboe@...hat.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org, kasan-dev@...glegroups.com
Subject: Re: [PATCH v4 1/3] lib/test_kasan: Add bitops tests



On 6/13/19 3:30 PM, Marco Elver wrote:
> This adds bitops tests to the test_kasan module. In a follow-up patch,
> support for bitops instrumentation will be added.
> 
> Signed-off-by: Marco Elver <elver@...gle.com>
> Acked-by: Mark Rutland <mark.rutland@....com>
> ---

Reviewed-by: Andrey Ryabinin <aryabinin@...tuozzo.com>




> +static noinline void __init kasan_bitops(void)
> +{
> +	/*
> +	 * Allocate 1 more byte, which causes kzalloc to round up to 16-bytes;
> +	 * this way we do not actually corrupt other memory, in case
> +	 * instrumentation is not working as intended.

This sound like working instrumentation somehow save us from corrupting memory. In fact it doesn't,
it only reports corruption.

> +	 */
> +	long *bits = kzalloc(sizeof(*bits) + 1, GFP_KERNEL);
> +	if (!bits)
> +		return;
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ