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]
Message-ID: <20201001174554.GM4162920@elver.google.com>
Date:   Thu, 1 Oct 2020 19:45:54 +0200
From:   elver@...gle.com
To:     Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        kasan-dev@...glegroups.com,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Evgenii Stepanov <eugenis@...gle.com>,
        Elena Petrova <lenaptr@...gle.com>,
        Branislav Rankov <Branislav.Rankov@....com>,
        Kevin Brodsky <kevin.brodsky@....com>,
        Will Deacon <will.deacon@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 17/39] kasan: rename print_shadow_for_address to
 print_memory_metadata

On Fri, Sep 25, 2020 at 12:50AM +0200, Andrey Konovalov wrote:
> This is a preparatory commit for the upcoming addition of a new hardware
> tag-based (MTE-based) KASAN mode.
> 
> Hardware tag-based KASAN won't be using shadow memory, but will reuse
> this function. Rename "shadow" to implementation-neutral "metadata".
> 
> No functional changes.
> 
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>

Reviewed-by: Marco Elver <elver@...gle.com>

> ---
> Change-Id: I18397dddbed6bc6d365ddcaf063a83948e1150a5
> ---
>  mm/kasan/report.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> index 145b966f8f4d..9e4d539d62f4 100644
> --- a/mm/kasan/report.c
> +++ b/mm/kasan/report.c
> @@ -250,7 +250,7 @@ static int shadow_pointer_offset(const void *row, const void *shadow)
>  		(shadow - row) / SHADOW_BYTES_PER_BLOCK + 1;
>  }
>  
> -static void print_shadow_for_address(const void *addr)
> +static void print_memory_metadata(const void *addr)
>  {
>  	int i;
>  	const void *shadow = kasan_mem_to_shadow(addr);
> @@ -311,7 +311,7 @@ void kasan_report_invalid_free(void *object, unsigned long ip)
>  	pr_err("\n");
>  	print_address_description(object, tag);
>  	pr_err("\n");
> -	print_shadow_for_address(object);
> +	print_memory_metadata(object);
>  	end_report(&flags);
>  }
>  
> @@ -347,7 +347,7 @@ static void __kasan_report(unsigned long addr, size_t size, bool is_write,
>  	if (addr_has_metadata(untagged_addr)) {
>  		print_address_description(untagged_addr, get_tag(tagged_addr));
>  		pr_err("\n");
> -		print_shadow_for_address(info.first_bad_addr);
> +		print_memory_metadata(info.first_bad_addr);
>  	} else {
>  		dump_stack();
>  	}
> -- 
> 2.28.0.681.g6f77f65b4e-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ