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: <20080428215555.GB16153@elte.hu>
Date:	Mon, 28 Apr 2008 23:55:55 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Harvey Harrison <harvey.harrison@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH] bitops: simplify generic bit finding functions


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> So we do have cases where the inlines are obviously worth it. But in 
> general, I think we should try to move things from the header files 
> into *.c files unless there is a really clear reason for keeping it 
> that way.

there's another benefit, and in asm-x86 we prefer to move inlines to .c 
files even in borderline cases because it simplifies the type 
dependencies: not having to fully define all types at the function 
prototype site avoids include file dependency hell.

Putting things like a task struct dereference into a lowlevel inline 
file easily causes dependency problems that causes people to use macros 
instead - which have their own set of readability and side-effect 
problems.

a third argument is that inlines seldom get smaller. So if they are 
borderline and we move them into a .c, and later on the function gets 
larger, no harm is done. But if we keep the inline in a .h in the 
borderline case and we grow the inline later on, the whole kernel bloats 
in a multiplied way, without any apparent direct feedback to the 
developer that something wrong and harmful just happened.

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