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]
Date:	Thu, 14 Feb 2008 13:33:10 -0600
From:	Corey Minyard <minyard@....org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>,
	OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>,
	Konstantin Baydarov <kbaidarov@...mvista.com>
Subject: Re: [PATCH 3/4] IPMI: convert locked counters to atomics

Andrew Morton wrote:
>> +	for (i = 0; i < IPMI_NUM_STATS; i++)
>> +		atomic_set(&intf->stats[i], 0);
>>     
>
> And this is why it would be very hard for any architecture to ever
> implement atomic_t as
>
> struct atomic_t {
> 	int counter;
> 	spinlock_t lock;
> };
>
> The interface assumes that atomic_set() fully initialises the atomic_t, and
> that atomic_set() can be used agaisnt both an uninitialised atomic_t and
> against an already-initialised atomic_t.  IOW, we don't have atomic_init().
>
> So would our hypothetical future architcture's atomic_set() do spin_lock(),
> or would it do spin_lock_init()?  Either one is wrong in many atomic_set
> callsites.
>
> Oh well.
>   
Yeah, I thought the same thing when I did this.  Do we start working
on an atomic_init()?  It would be easy enough to set it to atomic_set()
for current architectures.

-corey
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ