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: <CAG_fn=WaiTn9J6wS=1XsJWuorbRCg18Oe0PMAiHx9heb04v=ig@mail.gmail.com>
Date:   Wed, 10 Apr 2019 15:47:26 +0200
From:   Alexander Potapenko <glider@...gle.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org,
        Andy Lutomirski <luto@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Alexander Potapenko <glider@...gle.com>,
        David Sterba <dsterba@...e.com>, Chris Mason <clm@...com>,
        Josef Bacik <josef@...icpanda.com>, linux-btrfs@...r.kernel.org
Subject: Re: [RFC patch 29/41] btrfs: ref-verify: Simplify stack trace retrieval

On Wed, Apr 10, 2019 at 1:06 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Replace the indirection through struct stack_trace with an invocation of
> the storage array based interface.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: David Sterba <dsterba@...e.com>
> Cc: Chris Mason <clm@...com>
> Cc: Josef Bacik <josef@...icpanda.com>
> Cc: linux-btrfs@...r.kernel.org
> ---
>  fs/btrfs/ref-verify.c |   15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
>
> --- a/fs/btrfs/ref-verify.c
> +++ b/fs/btrfs/ref-verify.c
> @@ -205,28 +205,17 @@ static struct root_entry *lookup_root_en
>  #ifdef CONFIG_STACKTRACE
>  static void __save_stack_trace(struct ref_action *ra)
>  {
> -       struct stack_trace stack_trace;
> -
> -       stack_trace.max_entries = MAX_TRACE;
> -       stack_trace.nr_entries = 0;
> -       stack_trace.entries = ra->trace;
> -       stack_trace.skip = 2;
> -       save_stack_trace(&stack_trace);
> -       ra->trace_len = stack_trace.nr_entries;
> +       ra->trace_len = stack_trace_save(ra->trace, MAX_TRACE, 2);
Now that stack_trace.skip is gone, it's unclear what this "2" stands for.
Maybe add an inline comment saying it's skipnr?
(This is probably valid for all other stack_trace_save() callsites)
>  }
>
>  static void __print_stack_trace(struct btrfs_fs_info *fs_info,
>                                 struct ref_action *ra)
>  {
> -       struct stack_trace trace;
> -
>         if (ra->trace_len == 0) {
>                 btrfs_err(fs_info, "  ref-verify: no stacktrace");
>                 return;
>         }
> -       trace.nr_entries = ra->trace_len;
> -       trace.entries = ra->trace;
> -       print_stack_trace(&trace, 2);
> +       stack_trace_print(ra->trace, ra->trace_len, 2);
>  }
>  #else
>  static void inline __save_stack_trace(struct ref_action *ra)
>
>


-- 
Alexander Potapenko
Software Engineer

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

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ