Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608926 > unrolled thread

[PATCH v4 7/9] kasan: print page description after stacks

Started byAndrey Konovalov <andreyknvl@google.com>
First post2017-03-24 20:40 +0100
Last post2017-03-24 20:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 7/9] kasan: print page description after stacks Andrey Konovalov <andreyknvl@google.com> - 2017-03-24 20:40 +0100

#1608926 — [PATCH v4 7/9] kasan: print page description after stacks

FromAndrey Konovalov <andreyknvl@google.com>
Date2017-03-24 20:40 +0100
Subject[PATCH v4 7/9] kasan: print page description after stacks
Message-ID<toDe2-6aU-13@gated-at.bofh.it>
Moves page description after the stacks since it's less important.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 mm/kasan/report.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 06e27a342d1d..e0f7dbf9e883 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -242,9 +242,6 @@ static void print_address_description(struct kasan_access_info *info)
 	void *addr = (void *)info->access_addr;
 	struct page *page = addr_to_page(addr);
 
-	if (page)
-		dump_page(page, "kasan: bad access detected");
-
 	dump_stack();
 
 	if (page && PageSlab(page)) {
@@ -254,9 +251,14 @@ static void print_address_description(struct kasan_access_info *info)
 		describe_object(cache, object, addr);
 	}
 
-	if (kernel_or_module_addr(addr)) {
-		if (!init_task_stack_addr(addr))
-			pr_err("Address belongs to variable %pS\n", addr);
+	if (kernel_or_module_addr(addr) && !init_task_stack_addr(addr)) {
+		pr_err("The buggy address belongs to the variable:\n");
+		pr_err(" %pS\n", addr);
+	}
+
+	if (page) {
+		pr_err("The buggy address belongs to the page:\n");
+		dump_page(page, "kasan: bad access detected");
 	}
 }
 
-- 
2.12.1.578.ge9c3154ca4-goog

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web