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]
Message-ID: <Pine.LNX.4.64.0803201639590.30696@peripatetic.hades>
Date:	Thu, 20 Mar 2008 16:43:13 +0530 (IST)
From:	Arun Raghavan <arunsr@....iitk.ac.in>
To:	David Howells <dhowells@...hat.com>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [keys] Always use key_get() to increment key refcount

On Wed, 19 Mar 2008, David Howells wrote:

> Arun Raghavan <arunsr@....iitk.ac.in> wrote:
> 
> > Patch to use key_get() wherever the keys code manually increments the
> > key refcount.
> > 
> > This should make debugging a little simpler for clients, since it
> > becomes easier to track where a key's refcount changes.
> 
> The problem with this is that key_get() is not simply an atomic_inc().  You
> end up introducing an extra conditional into each of these places where one is
> not required.  Now it's possible that the compiler's optimiser is sufficiently
> clever to get rid of them all, but do you guarantee that?

Is this really a significant performance penalty? If yes, wouldn't a
likely() be sufficient to mitigate the penalty?

The same arguments should also be applied to key_put(), I guess.

Regards,
Arun
--
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