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: <576077B1.5040704@oracle.com>
Date:	Tue, 14 Jun 2016 17:31:29 -0400
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32

On 06/14/2016 04:47 PM, Ben Hutchings wrote:
> __lock_pin_lock() now calls prandom_u32() which is not defined in
> liblockdep.  __lock_pin_lock() and its caller lock_pin_lock() are dead
> code in liblockdep, but we still need to provide a definition of
> prandom_u32() in case lazy binding is disabled.
> 
> Fixes: e7904a28f533 ("locking/lockdep, sched/core: Implement a better ...")
> Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> ---
>  tools/lib/lockdep/common.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/lib/lockdep/common.c b/tools/lib/lockdep/common.c
> index d1c89cc06f5f..405c17667c4d 100644
> --- a/tools/lib/lockdep/common.c
> +++ b/tools/lib/lockdep/common.c
> @@ -1,5 +1,6 @@
>  #include <stddef.h>
>  #include <stdbool.h>
> +#include <stdlib.h>
>  #include <linux/compiler.h>
>  #include <linux/lockdep.h>
>  #include <unistd.h>
> @@ -10,6 +11,11 @@ static __thread struct task_struct current_obj;
>  /* lockdep wants these */
>  bool debug_locks = true;
>  bool debug_locks_silent;
> +u32 prandom_u32(void)
> +{
> +	/* Used only by lock_pin_lock() which is dead code */
> +	abort();
> +}

I had to place this bit in lockdep.c rather than common.c, since lockdep.c
is the one building kernel/lockdep.c.


Thanks,
Sasha




Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ