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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEVVKH8n5ntPVOP=X9bPGoK4xdE-Z-XHKSFsoGOaLpke+uZoqg@mail.gmail.com>
Date:   Thu, 17 Jun 2021 10:22:30 +0800
From:   Xiongwei Song <sxwjean@...il.com>
To:     Xiongwei Song <sxwjean@...com>
Cc:     peterz@...radead.org, mingo@...hat.com, will@...nel.org,
        longman@...hat.com, Boqun Feng <boqun.feng@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] locking/lockdep: print possible warning after counting deps

Please ignore this patch. I will resend as  Longman's suggestions.
Please see https://lkml.org/lkml/2021/6/16/949.

Regards,
Xiongwei


On Wed, Jun 16, 2021 at 10:42 PM Xiongwei Song <sxwjean@...com> wrote:
>
> From: Xiongwei Song <sxwjean@...il.com>
>
> The graph walk might hit error when counting dependencies. Once the
> return value is negative, print a warning to reminder users.
>
> Signed-off-by: Xiongwei Song <sxwjean@...il.com>
> ---
>  kernel/locking/lockdep.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 7641bd407239..074fd6418c20 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -2028,8 +2028,12 @@ static unsigned long __lockdep_count_forward_deps(struct lock_list *this)
>  {
>         unsigned long  count = 0;
>         struct lock_list *target_entry;
> +       enum bfs_result ret;
> +
> +       ret = __bfs_forwards(this, (void *)&count, noop_count, NULL, &target_entry);
>
> -       __bfs_forwards(this, (void *)&count, noop_count, NULL, &target_entry);
> +       if (unlikely(bfs_error(ret)))
> +               print_bfs_bug(ret);
>
>         return count;
>  }
> @@ -2053,8 +2057,12 @@ static unsigned long __lockdep_count_backward_deps(struct lock_list *this)
>  {
>         unsigned long  count = 0;
>         struct lock_list *target_entry;
> +       enum bfs_result ret;
> +
> +       ret = __bfs_backwards(this, (void *)&count, noop_count, NULL, &target_entry);
>
> -       __bfs_backwards(this, (void *)&count, noop_count, NULL, &target_entry);
> +       if (unlikely(bfs_error(ret)))
> +               print_bfs_bug(ret);
>
>         return count;
>  }
> --
> 2.30.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ