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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZrYSoQxHxyA5vsGT@smile.fi.intel.com>
Date: Fri, 9 Aug 2024 15:59:13 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jason Gunthorpe <jgg@...dia.com>,
	Matthew Wilcox <willy@...radead.org>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>
Subject: Re: [PATCH 1/1] container_of: Document container_of_const() is
 preferred

On Mon, Jun 17, 2024 at 01:08:25PM +0300, Sakari Ailus wrote:
> There is a warning in kerneldoc documentation of container_of() that
> constness of @ptr is lost. While this is a suggestion container_of_const()
> should be used instead, the vast majority of new code still uses
> container_of():

A side note...

> $ git diff v6.8 v6.9|grep container_of\(|wc -l
> 788
> $ git diff v6.8 v6.9|grep container_of_const|wc -l
> 11

This is classic "Useless use of grep".

$ git log --oneline -G 'container_of\(' v6.8..v6.9 | wc -l
296

However, if you really want the _new_ code only, you have to run to `git grep`:

$ git grep -n -w container_of v6.8 | wc
20763

$ git grep -n -w container_of v6.9 | wc
20943

180 new uses.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ