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] [thread-next>] [day] [month] [year] [list]
Message-ID: <46CCBC3C.7010307@windriver.com>
Date:	Wed, 22 Aug 2007 17:44:12 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Mariusz Kozlowski <m.kozlowski@...land.pl>,
	kgdb-bugreport@...ts.sourceforge.net, amitkale@...syssoft.com,
	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on powerpc

Andrew Morton wrote:
> On Wed, 22 Aug 2007 21:04:28 +0200
> Mariusz Kozlowski <m.kozlowski@...land.pl> wrote:
>
>   
>> Hello,
>>
>> 	Got that on imac g3.
>>
>>   CC      kernel/kgdb.o
>> kernel/kgdb.c: In function 'kgdb_handle_exception':
>> kernel/kgdb.c:940: error: invalid lvalue in unary '&'
>> kernel/kgdb.c:940: warning: type defaults to 'int' in declaration of '_o_'
>> kernel/kgdb.c:940: error: invalid lvalue in unary '&'
>> kernel/kgdb.c:940: warning: type defaults to 'int' in declaration of '_n_'
>> kernel/kgdb.c:940: error: invalid lvalue in unary '&'
>> kernel/kgdb.c:940: error: invalid lvalue in unary '&'
>> kernel/kgdb.c:940: error: invalid lvalue in unary '&'
>> kernel/kgdb.c:940: warning: type defaults to 'int' in declaration of 'type name'
>> make[1]: *** [kernel/kgdb.o] Blad 1
>> make: *** [kernel] Blad 2
>>
>>     
>
>   
Against the tip of the kernel + kgdb patches this config builds.  I 
wonder if is the compiler or the macros for atomic_read or cmpxchg have 
changed for in the -mm tree.  Perhaps it is not relevant though if you 
read on.
> I'm not surprised.
>
> 	while (cmpxchg(&atomic_read(&debugger_active), 0, (procid + 1)) != 0) {
>
> a) cmpxchg isn't available on all architectures
>
>   
It was available for all the archs that the kgdb had been implemented on 
at the time.
> b) we can't just go and take the address of atomic_read()'s return value!
>
>   
Perhaps yes, perhaps no I guess it depends on what actually gets 
generated...  In the past the intent of this was to guard for the race 
to be the master processor and looked like some attempt to do it 
atomically.  This code had been in use for a number of years at this point.
> c) that's pretty ugly-looking stuff anyway.
>
>   

Perhaps there is a cleaner way to do the same thing and avoid the 
cmpxchg all together.  I used the attached patch to eliminate the 
cmpxchg operation.


Jason.

View attachment "kgdb_enter_atomic.patch" of type "text/plain" (2029 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ