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-next>] [day] [month] [year] [list]
Message-ID: <9f4f8abe0801111457t7535069ar1f98cc37d5cf8d40@mail.gmail.com>
Date:	Fri, 11 Jan 2008 14:57:47 -0800
From:	"Vineet Gupta" <vineetg76@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Usage semantics of atomic_set ( )

I'm trying to implement atomic ops for a CPU which has no inherent
support for Read-Modify-Write Ops. Instead of using a global spin lock
which protects all the atomic APIs, I want to use a spin lock per
instance of atomic_t. This works well when atomic_t is unitary and
statically initialized using ATOMIC_INIT (where I can reset the
spinlock_t as well). However if atomic_t var is embedded within a
bigger struct which is allocated dynamically how to I init the
embedded spin lock. atomic_set ( ) is the closest choice, however I
don't think it's current usage in kernel code qualifies it to be
"initializer only".

Doesn't that defeat the intended usage of atomic_t as a opaque type
which can be "effectively" used to hide other architecture specific
stuff.

Thanks,
Vineet
--
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