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: <542BFB2C.5070609@users.sourceforge.net>
Date:	Wed, 01 Oct 2014 15:01:32 +0200
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>
CC:	Coccinelle <cocci@...teme.lip6.fr>,
	kernel-janitors@...r.kernel.org, Michal Marek <mmarek@...e.cz>,
	Chi Pham <chidaph@...il.com>,
	Fabian Frederick <fabf@...net.be>,
	Joe Perches <joe@...ches.com>
Subject: Re: [PATCH with Coccinelle?] Deletion of unnecessary checks before
 specific function calls

>> If you are convinced that dropping the null tests is a good idea, then you 
>> can submit the patch that makes the change to the relevant maintainers and 
>> mailing lists.

Hello,

A couple of functions perform input parameter validation before their
implementations will try further actions with side effects. Some calling
functions perform similar safety checks.

Functions which release a system resource are occasionally documented in the way
that they tolerate the passing of a null pointer for example.
I do not see a need because of this fact that a function caller repeats a
corresponding check.

Now I would like to propose such a change again.

1. Extension of the infrastructure for the analysis tool "coccicheck"
   Semantic patch patterns can help to identify update candidates also in the
Linux source file hierarchy.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/scripts/coccinelle?id=79f0345fefaafb7cde301a830471edd21a37989b

   Would you like to reconsider an approach which was discussed with a subject
like "scripts/coccinelle/free: Delete NULL test before freeing functions?" a
while ago?
   https://lkml.org/lkml/2014/8/9/36
   https://groups.google.com/d/msg/linux.kernel/rIWfYsRRW6I/cTs6y0STf2cJ


2. Clarification for some automated update suggestions
   My source code search approach found 227 functions with the help of the
software "Coccinelle 1.0.0-rc22" at least which might need another review and
corresponding corrections for Linux 3.16.3. Further software development will
point out even more potentially open issues.

Regards,
Markus

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