mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
kasan: rename print_shadow_for_address to print_memory_metadata
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. Link: https://lkml.kernel.org/r/dd955c5aadaee16aef451a6189d19172166a23f5.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Marco Elver <elver@google.com> Reviewed-by: Alexander Potapenko <glider@google.com> Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Branislav Rankov <Branislav.Rankov@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6882464faf
commit
db3de8f759
1 changed files with 3 additions and 3 deletions
|
@ -252,7 +252,7 @@ static int shadow_pointer_offset(const void *row, const void *shadow)
|
||||||
(shadow - row) / SHADOW_BYTES_PER_BLOCK + 1;
|
(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;
|
int i;
|
||||||
const void *shadow = kasan_mem_to_shadow(addr);
|
const void *shadow = kasan_mem_to_shadow(addr);
|
||||||
|
@ -338,7 +338,7 @@ void kasan_report_invalid_free(void *object, unsigned long ip)
|
||||||
pr_err("\n");
|
pr_err("\n");
|
||||||
print_address_description(object, tag);
|
print_address_description(object, tag);
|
||||||
pr_err("\n");
|
pr_err("\n");
|
||||||
print_shadow_for_address(object);
|
print_memory_metadata(object);
|
||||||
end_report(&flags);
|
end_report(&flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ static void __kasan_report(unsigned long addr, size_t size, bool is_write,
|
||||||
if (addr_has_metadata(untagged_addr)) {
|
if (addr_has_metadata(untagged_addr)) {
|
||||||
print_address_description(untagged_addr, get_tag(tagged_addr));
|
print_address_description(untagged_addr, get_tag(tagged_addr));
|
||||||
pr_err("\n");
|
pr_err("\n");
|
||||||
print_shadow_for_address(info.first_bad_addr);
|
print_memory_metadata(info.first_bad_addr);
|
||||||
} else {
|
} else {
|
||||||
dump_stack();
|
dump_stack();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue