All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Potapenko <glider@google.com>
To: andrey.konovalov@linux.dev
Cc: Marco Elver <elver@google.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	 Dmitry Vyukov <dvyukov@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	 kasan-dev <kasan-dev@googlegroups.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Andrey Konovalov <andreyknvl@google.com>
Subject: Re: [PATCH mm 02/22] kasan: more line breaks in reports
Date: Wed, 2 Mar 2022 18:28:12 +0100	[thread overview]
Message-ID: <CAG_fn=XJU=GU-1fxbLbJj-tGEo41kJ0HvLRX0EZd3TwNJisrGg@mail.gmail.com> (raw)
In-Reply-To: <8682c4558e533cd0f99bdb964ce2fe741f2a9212.1646237226.git.andreyknvl@google.com>

[-- Attachment #1: Type: text/plain, Size: 3919 bytes --]

On Wed, Mar 2, 2022 at 5:36 PM <andrey.konovalov@linux.dev> wrote:

> From: Andrey Konovalov <andreyknvl@google.com>
>
> Add a line break after each part that describes the buggy address.
> Improves readability of reports.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>
Reviewed-by: Alexander Potapenko <glider@google.com>

> ---
>  mm/kasan/report.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> index 607a8c2e4674..ded648c0a0e4 100644
> --- a/mm/kasan/report.c
> +++ b/mm/kasan/report.c
> @@ -250,11 +250,13 @@ static void print_address_description(void *addr, u8
> tag)
>                 void *object = nearest_obj(cache, slab, addr);
>
>                 describe_object(cache, object, addr, tag);
> +               pr_err("\n");
>         }
>
>         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);
> +               pr_err("\n");
>         }
>
>         if (is_vmalloc_addr(addr)) {
> @@ -265,6 +267,7 @@ static void print_address_description(void *addr, u8
> tag)
>                                " [%px, %px) created by:\n"
>                                " %pS\n",
>                                va->addr, va->addr + va->size, va->caller);
> +                       pr_err("\n");
>
>                         page = vmalloc_to_page(page);
>                 }
> @@ -273,9 +276,11 @@ static void print_address_description(void *addr, u8
> tag)
>         if (page) {
>                 pr_err("The buggy address belongs to the physical
> page:\n");
>                 dump_page(page, "kasan: bad access detected");
> +               pr_err("\n");
>         }
>
>         kasan_print_address_stack_frame(addr);
> +       pr_err("\n");
>  }
>
>  static bool meta_row_is_guilty(const void *row, const void *addr)
> @@ -382,7 +387,6 @@ void kasan_report_invalid_free(void *object, unsigned
> long ip)
>         kasan_print_tags(tag, object);
>         pr_err("\n");
>         print_address_description(object, tag);
> -       pr_err("\n");
>         print_memory_metadata(object);
>         end_report(&flags, (unsigned long)object);
>  }
> @@ -443,7 +447,6 @@ 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_memory_metadata(info.first_bad_addr);
>         } else {
>                 dump_stack_lvl(KERN_ERR);
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups
> "kasan-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kasan-dev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kasan-dev/8682c4558e533cd0f99bdb964ce2fe741f2a9212.1646237226.git.andreyknvl%40google.com
> .
>


-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.



This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.

[-- Attachment #2: Type: text/html, Size: 5470 bytes --]

  reply	other threads:[~2022-03-02 17:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 16:36 [PATCH mm 00/22] kasan: report clean-ups and improvements andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 01/22] kasan: drop addr check from describe_object_addr andrey.konovalov
2022-03-02 17:27   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 02/22] kasan: more line breaks in reports andrey.konovalov
2022-03-02 17:28   ` Alexander Potapenko [this message]
2022-03-02 16:36 ` [PATCH mm 03/22] kasan: rearrange stack frame info " andrey.konovalov
2022-03-02 17:29   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 04/22] kasan: improve " andrey.konovalov
2022-03-02 17:31   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 05/22] kasan: print basic stack frame info for SW_TAGS andrey.konovalov
2022-03-02 17:34   ` Alexander Potapenko
2022-03-08 14:09     ` Andrey Konovalov
2022-03-02 16:36 ` [PATCH mm 06/22] kasan: simplify async check in end_report andrey.konovalov
2022-03-02 17:37   ` Alexander Potapenko
2022-03-08 14:09     ` Andrey Konovalov
2022-03-02 16:36 ` [PATCH mm 07/22] kasan: simplify kasan_update_kunit_status and call sites andrey.konovalov
2022-03-02 17:46   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 08/22] kasan: check CONFIG_KASAN_KUNIT_TEST instead of CONFIG_KUNIT andrey.konovalov
2022-03-02 17:57   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 09/22] kasan: move update_kunit_status to start_report andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 10/22] kasan: move disable_trace_on_warning " andrey.konovalov
2022-03-02 18:00   ` Alexander Potapenko
2022-03-02 16:36 ` [PATCH mm 11/22] kasan: split out print_report from __kasan_report andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 12/22] kasan: simplify kasan_find_first_bad_addr call sites andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 13/22] kasan: restructure kasan_report andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 14/22] kasan: merge __kasan_report into kasan_report andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 15/22] kasan: call print_report from kasan_report_invalid_free andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 16/22] kasan: move and simplify kasan_report_async andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 17/22] kasan: rename kasan_access_info to kasan_report_info andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 18/22] kasan: add comment about UACCESS regions to kasan_report andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 19/22] kasan: respect KASAN_BIT_REPORTED in all reporting routines andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 20/22] kasan: reorder reporting functions andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 21/22] kasan: move and hide kasan_save_enable/restore_multi_shot andrey.konovalov
2022-03-02 16:36 ` [PATCH mm 22/22] kasan: disable LOCKDEP when printing reports andrey.konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG_fn=XJU=GU-1fxbLbJj-tGEo41kJ0HvLRX0EZd3TwNJisrGg@mail.gmail.com' \
    --to=glider@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrey.konovalov@linux.dev \
    --cc=andreyknvl@gmail.com \
    --cc=andreyknvl@google.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.