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: <4FBC4372.5070000@gmail.com>
Date:	Wed, 23 May 2012 11:54:58 +1000
From:	Ryan Mallon <rmallon@...il.com>
To:	Phil Carmody <ext-phil.2.carmody@...ia.com>
CC:	ext Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
	apw@...onical.com
Subject: Re: [PATCH 1/1] checkpatch: don't fake typedefs with #define

On 18/05/12 07:16, Phil Carmody wrote:

> On 17/05/12 13:54 -0700, ext Joe Perches wrote:
>>> +# check for deliberate avoidance of the above anti-typedef rule
>>> +		if ($line =~ /#\s*define\s+$Ident\s+$Type\b/) {
>>> +			WARN("NEW_TYPEDEFS",
>>> +			     "do not fake typedefs using #define\n" . $herecurr);
>>> +		}
>>> +
>>
>> I think the false positive rate is pretty high.
>> I used this and don't see too many I'd remove.
>>
>> $ git grep -E "#\s*define\s+\w+\s+(struct|unsigned|char|short|int|long|const)\b"
>>
>> Got an example you want this to find?
> 
> Too many. Alas I can't share them. 


That sounds like the cases you have seen are in code which is not
public. I don't think I have ever seen code in the kernel, or in
proposed patches which fakes a typedef with a #define.

Is this an issue for public code, or for a private company tree? In the
latter case, the checkpatch addition should go in your private tree,
rather than mainline. It looks like, at least for mainline Linux, you
are trying to solve a non-existent problem.

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