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:	Mon, 18 Jul 2011 21:17:00 +0100
From:	Rainer Weikusat <rweikusat@...ileactivedefense.com>
To:	David Miller <davem@...emloft.net>
Cc:	rweikusat@...ileactivedefense.com, adobriyan@...il.com,
	kaber@...sh.net, netfilter-devel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: add per-namespace logging to nfnetlink_log.c

David Miller <davem@...emloft.net> writes:
> From: Rainer Weikusat <rweikusat@...ileactivedefense.com>
> Date: Mon, 18 Jul 2011 20:43:30 +0100
>
>> [rw@...phire]~/work/linux-2-6/net/netfilter $find -name '*.c' | xargs grep '^#ifdef' | wc -l
>> 239
>> [rw@...phire]~/work/linux-2-6/net/netfilter $..
>> [rw@...phire]~/work/linux-2-6/net $find -name '*.c' | xargs grep '^#ifdef' | wc -l
>> 1672
>
> You've shown nothing.  Showing exceptions does not prove that the
> general effort has been to keep ifdef crap out of *.c files.

I've 'shown' that the networking code contains a fair amount of
#ifdefs in .c files. Consequently, 'we did it without' is wrong. At
best, 'we would like to do without in future' seems justified.

> And every developer or maintainer who says no to ifdefs in *.c files
> for new changes is %100 right.

Adding new files filled with ifdefs in order to avoid ifdefs in old
files in favor of lines-looking-like-code-which-arent seems
debatable to me. The same goes for adding unused structure members,
uneeded function calls, indirections through fifteen different other
files that turn out to do nothing etc. I spend much more time trying
to read Linux code than to write Linux code and while I decidedly know
worse things, Linux isn't exactly a prime example of easily accessible
code precisely because so much of it is something completely different
than what it appears to be.

But this is actually a digression that is besides the point: Put
something like 'ifdefs must not be used in new code, no matter what'
plainly into the CodingStyle text, then you can expect other people to
stick to this convention in the same way as to all the others (or at
least try to stick to it).

> We're also specifically talking about namespace stuff, so you should have
> at least refined your match criteria just a little bit.

The person I was replying to wrote 'We did whole networking without
sprinkling ifdefs'.
--
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