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>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0701160906140.20489@CPE00045a9c397f-CM001225dbafb6>
Date:	Tue, 16 Jan 2007 09:14:58 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: how exactly is the macro SPIN_LOCK_UNLOCKED going to be removed?


  (the following applies equally well to RW_LOCK_UNLOCKED.)

according to Documentation/spinlocks.txt:

======================================
Macros SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated and will
be removed soon. So for any new code dynamic initialization should be
used:

   spinlock_t xxx_lock;
   rwlock_t xxx_rw_lock;

   static int __init xxx_init(void)
   {
        spin_lock_init(&xxx_lock);
        rwlock_init(&xxx_rw_lock);
        ...
   }

   module_init(xxx_init);
...
======================================

  fair enough, i can see how *some* of that replacement is going to be
done.  new spinlocks can be created based on the macro:

#define DEFINE_SPINLOCK(x)      spinlock_t x = __SPIN_LOCK_UNLOCKED(x)

  so i'm assuming that the underlying macro __SPIN_LOCK_UNLOCKED is
sticking around.

  also, since defining a spinlock that way requires a lock name,
things like this:

  ...
  .lock           = SPIN_LOCK_UNLOCKED,
  ...

will have to be replaced with the form:

  ...
  .death_lock     = __SPIN_LOCK_UNLOCKED(tcp_death_row.death_lock)
  ...

is that correct so far?  but i'm not sure what's going to happen with
stuff like this:

  spinlock_t cris_atomic_locks[] =
    { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED};

what's the deal with *that*?  or am i misunderstanding this
completely?

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