summaryrefslogtreecommitdiff
authorTobin C. Harding <me@tobin.cc>2017-11-01 04:32:22 (GMT)
committer Alistair Strachan <astrachan@google.com>2019-03-29 04:13:04 (GMT)
commit6f4a372476b14c8acbbbf96abc387e18f3a51d97 (patch)
tree10adb209a5bcb2fa2c1a30be3346ae07221984e9
parent5c145bd658c5e6277cf80fd8d7bda1806743453a (diff)
downloadcommon-6f4a372476b14c8acbbbf96abc387e18f3a51d97.zip
common-6f4a372476b14c8acbbbf96abc387e18f3a51d97.tar.gz
common-6f4a372476b14c8acbbbf96abc387e18f3a51d97.tar.bz2
UPSTREAM: kasan: use %px to print addresses instead of %p
Pointers printed with %p are now hashed by default. Kasan needs the actual address. We can use the new printk specifier %px for this purpose. Use %px instead of %p to print addresses. Signed-off-by: Tobin C. Harding <me@tobin.cc> (cherry picked from commit 6424f6bb432752c7eb90cbeeb1c31d6125bba39a) Signed-off-by: Sandeep Patil <sspatil@android.com> Bug: 78533979 Test: Build & boot cuttlefish Change-Id: I6f242e5a3fcddbf8e6af4f601d7bb05f29340949
Diffstat
-rw-r--r--mm/kasan/report.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index a324797..2ed4c47 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -138,7 +138,7 @@ static void print_error_description(struct kasan_access_info *info)
pr_err("BUG: KASAN: %s in %pS\n",
bug_type, (void *)info->ip);
- pr_err("%s of size %zu at addr %p by task %s/%d\n",
+ pr_err("%s of size %zu at addr %px by task %s/%d\n",
info->is_write ? "Write" : "Read", info->access_size,
info->access_addr, current->comm, task_pid_nr(current));
}
@@ -210,7 +210,7 @@ static void describe_object_addr(struct kmem_cache *cache, void *object,
const char *rel_type;
int rel_bytes;
- pr_err("The buggy address belongs to the object at %p\n"
+ pr_err("The buggy address belongs to the object at %px\n"
" which belongs to the cache %s of size %d\n",
object, cache->name, cache->object_size);
@@ -229,7 +229,7 @@ static void describe_object_addr(struct kmem_cache *cache, void *object,
}
pr_err("The buggy address is located %d bytes %s of\n"
- " %d-byte region [%p, %p)\n",
+ " %d-byte region [%px, %px)\n",
rel_bytes, rel_type, cache->object_size, (void *)object_addr,
(void *)(object_addr + cache->object_size));
}
@@ -306,7 +306,7 @@ static void print_shadow_for_address(const void *addr)
char shadow_buf[SHADOW_BYTES_PER_ROW];
snprintf(buffer, sizeof(buffer),
- (i == 0) ? ">%p: " : " %p: ", kaddr);
+ (i == 0) ? ">%px: " : " %px: ", kaddr);
/*
* We should not pass a shadow pointer to generic
* function, because generic functions may try to