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] [day] [month] [year] [list]
Date:	Thu, 16 Apr 2015 17:50:28 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Andreas Messerschmid <andreas@...utronix.de>
Subject: Re: [PATCH] lockdep: make print_lock_name() robust against
 non-existing lock_class

On Thu, Apr 16, 2015 at 05:39:36PM +0200, Sebastian Andrzej Siewior wrote:
> * Peter Zijlstra | 2015-04-16 17:35:03 [+0200]:
> 
> >On Thu, Apr 16, 2015 at 04:50:21PM +0200, Sebastian Andrzej Siewior wrote:
> >
> >> Andreas confirmed that it works for him on v3.18 with minor adjustment.
> >> 
> >> <---
> >> +       struct held_lock lock = READ_ONCE(*hlock);
> >> +       unsigned int class_idx = lock.class_idx;
> >> --->
> >> 
> >
> >I'm confused by the need for that. What was the failure with the
> >proposed patch?
> 
> It was tested on v3.18, there might have been a change between v3.18 &
> 4.0. The patch as-is did no compile:

Yeah, I might not have compiled it..

>  in file included from arch/x86/include/asm/current.h:4:0,
>                   from include/linux/mutex.h:13,
>                   from kernel/locking/lockdep.c:29:
>  kernel/locking/lockdep.c: In function ‘print_lock’:
>  kernel/locking/lockdep.c:558:37: error: ‘typeof’ applied to a bit-field
>    unsigned int class_idx = READ_ONCE(hlock->class_idx);

Ah! Indeed so, copying all of the hlock is overdoing it a bit but would
work I suppose.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists