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:	Fri, 16 Dec 2011 13:36:53 -0800
From:	Andi Kleen <andi@...stfloor.org>
To:	David Howells <dhowells@...hat.com>
Cc:	linux-arch@...r.kernel.org, mingo@...e.hu,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] Add assertion checking macros

David Howells <dhowells@...hat.com> writes:
>
>      There is no need to display val here in the case the expression fails
>      since it can only be 0.  If this fails, it produces an error like the
>      following:
>
> 	------------[ cut here ]------------
> 	kernel BUG at fs/fscache/main.c:109!
> 	ASSERTION FAILED

It would be nice to display the expression here like an user space
assert. While it can be looked up in the source it would
make quick eyeballing easier. 

Probably wouldn't cost too much additional text size?

>
>  (e) ASSERTIFCMP(C, X, OP, Y)
>
>      This is a combination of ASSERTIF and ASSERTCMP.  For example:
>
> 	ASSERTIFCMP(test_bit(FSCACHE_OP_EXCLUSIVE, &op->flags),
> 		    object->n_exclusive, >, 0);

You probably want a checkpatch rule with those to only allow a few
selected functions like test_bit. Otherwise people will put real side
effects in there.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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