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]
Message-Id: <200904081709.55481.philipp.reisner@linbit.com>
Date:	Wed, 8 Apr 2009 17:09:54 +0200
From:	Philipp Reisner <philipp.reisner@...bit.com>
To:	Nikanth K <nikanth@...il.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...e.de,
	Nikanth Karthikesan <knikanth@...e.de>
Subject: Re: [PATCH 01/12] DRBD: lru_cache

On Wednesday 08 April 2009 12:15:13 Nikanth K wrote:
> On Mon, Mar 23, 2009 at 9:17 PM, Philipp Reisner
>
> <philipp.reisner@...bit.com> wrote:
> > +/* this is developers aid only! */
> > +#define PARANOIA_ENTRY() BUG_ON(test_and_set_bit(__LC_PARANOIA,
> > &lc->flags)) +#define PARANOIA_LEAVE() do { clear_bit(__LC_PARANOIA,
> > &lc->flags); smp_mb__after_clear_bit(); } while (0) +#define RETURN(x...)
> >     do { PARANOIA_LEAVE(); return x ; } while (0) +
>
> The PARANOIA_LEAVE is used for void functions, so RETURN can be
> changed to take a simple non-variadic argument. Or empty RETURN()
> could be used everywhere instead of mixing PARANOIA_LEAVE() and
> RETURN(). Just to make it consistent.

Ok, using the RETURN() now everywhere.

> Also this could be made as nop based on some config debug option?
>

It is a very cheap debugging code, setting and clearing a single bit, just
to make sure the function calls of the lru-cache API are used in the right
order.

Since it is that cheap I decided to have it permanently in, but if 
I get that hint twice, I will change it into a config debug option.

-Phil
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.

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