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: <1455589627.4046.35.camel@perches.com>
Date:	Mon, 15 Feb 2016 18:27:07 -0800
From:	Joe Perches <joe@...ches.com>
To:	Oleg Drokin <green@...uxhacker.ru>
Cc:	Andy Whitcroft <apw@...onical.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: checkpatch falsepositives in Lustre code

On Mon, 2016-02-15 at 20:57 -0500, Oleg Drokin wrote:
> On Feb 15, 2016, at 7:56 PM, Joe Perches wrote:
> > [etc...]
> > 
> > Yeah, that's a defect of some type.
> 
> Also while I have your attention, here's another one:
> 
> struct cfs_percpt_lock *
> cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
> {
>         struct cfs_percpt_lock  *pcl;
>         spinlock_t              *lock;
>         int                     i;
> …
>         cfs_percpt_for_each(lock, i, pcl->pcl_locks)
>                 spin_lock_init(lock);
> 
> The declaration of the spinlock pointer produces:
> CHECK: spinlock_t definition without comment
> 
> Should spinlock pointers really be included in the check, it's obvious that
> they themselves are not really protecting anything, esp. considering it's a
> local function variable here.

I don't have an opinion here.

spinlock_t pointers are relatively rare.

$ git grep -E "\bspinlock_t\s*\*\s*\w+\s*[=;]" | wc -l
327

~10% of them seem to have in-line comments.

$ git grep -E "\bspinlock_t\s*\*\s*\w+\s*[=;].*/\*" | wc -l
34

and just fyi, here's a top level directory breakdown:

$ git grep -E "\bspinlock_t\s*\*\s*\w+\s*[=;]" | cut -f1 -d"/" | uniq -c
      1 Documentation
     27 arch
      1 block
    119 drivers
     24 fs
     23 include
      5 kernel
      3 lib
     67 mm
     51 net
      4 security
      2 sound

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ