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: <47934604.6080505@gmail.com>
Date:	Sun, 20 Jan 2008 22:00:52 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Jeff Garzik <jeff@...zik.org>
Subject: Re: [PATCH 0/6] RFC: Typesafe callbacks

Tejun Heo wrote:
> * Passing NULL as data to callback which takes non-void pointer
>   triggers warning.  I think this should be allowed.  Something like
>   the following?

Please ignore the last sentence.

> * Allowing non-pointer integral types which fit into pointer would be
>   nice.  It's often convenient to pass integers to simple callbacks.
> 
> The following macro kinda-sorta achieves the above two but it doesn't
> consider promotion of integer types and thus is too strict.  There
> gotta be some way.

What should be do are

* Check that the threadfn's argument fits into void *.

* Trigger overflow in implicit constant conversion warning if the
specified data is too large for the argument type.

Tricky...

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