<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/coccinelle, branch v4.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-22T10:13:39Z</updated>
<entry>
<title>scripts/coccinelle: require coccinelle &gt;= 1.0.4 on device_node_continue.cocci</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc65e823363834a7ff0a2eca9bef2bbef64135f7'/>
<id>urn:sha1:cc65e823363834a7ff0a2eca9bef2bbef64135f7</id>
<content type='text'>
Make use of the new Requires: tag to be able to specify coccinelle binary
version requirements. The cocci file device_node_continue.cocci requires at
least coccinelle 1.0.4.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: catch krealloc() on devm_*() allocated memory</title>
<updated>2016-06-21T09:43:32Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2016-05-23T15:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7b2ee41f300b69c67c798df0cd5b8648bcb26a3'/>
<id>urn:sha1:b7b2ee41f300b69c67c798df0cd5b8648bcb26a3</id>
<content type='text'>
krealloc() must not be used against devm_*() allocated
memory regions:

- if a bigger memory is to be allocated, krealloc() and
  __krealloc() could return a different pointer than the
  one given to them, creating a memory region which is not
  managed, thus it will not be automatically released on
  device removal.

- if a bigger memory is to be allocated, krealloc() could
  kfree() the managed memory region which is passed to it.
  The old pointer is left registered as a resource for the
  device. On device removal, this dangling pointer will be
  used and an unrelated memory region could be released.

- if the requested size is equal to 0, krealloc() can also
  just behave like kfree(). Here too, the old pointer is
  kept associated with the device. On device removal, this
  invalid pointer will be used and an unrelated memory
  region could be released.

For all these reasons, krealloc() must not be used on a
pointer returned by devm_*() functions.

Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: recognize more devm_* memory allocation functions</title>
<updated>2016-06-21T09:43:32Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2016-05-23T15:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a720c0644d14011d3a1bcc8d1b36e80571ad2ce1'/>
<id>urn:sha1:a720c0644d14011d3a1bcc8d1b36e80571ad2ce1</id>
<content type='text'>
Updates free/devm_free.cocci to recognize functions added by:

- commit 64c862a839a8 ('devres: add kernel standard devm_k.alloc functions')
- commit e31108cad3de ('devres: introduce API "devm_kstrdup"')
- commit 3046365bb470 ('devres: introduce API "devm_kmemdup')
- commit 43339bed7010 ('devres: Add devm_get_free_pages API')
- commit 75f2a4ead5d5 ('devres: Add devm_kasprintf and devm_kvasprintf API')

See also Documentation/driver-model/devres.txt

Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Manish Badarkhe &lt;badarkhe.manish@gmail.com&gt;
Cc: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Cc: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: also catch kzfree() issues</title>
<updated>2016-06-21T09:43:32Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2016-05-23T15:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6dd9379e8f327e70d182b15be3ba21aa2b5d2cba'/>
<id>urn:sha1:6dd9379e8f327e70d182b15be3ba21aa2b5d2cba</id>
<content type='text'>
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'),
kfree() is no more the only function to be considered:
kzfree() should be recognized too.

In particular, kzfree() must not be called on memory
allocated through devm_*() functions.

Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Coccinelle: noderef: Add new rules and correct the old rule</title>
<updated>2016-06-20T15:20:13Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-05-24T04:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf56cc04ef97c8ec536e3fcd16fc57902cba339f'/>
<id>urn:sha1:bf56cc04ef97c8ec536e3fcd16fc57902cba339f</id>
<content type='text'>
Add new rules to detect the cases where sizeof is used in
function calls as a argument.

Also, for the patch mode third rule should behave same as
second rule with arguments reversed. So, change that as well.

Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2016-05-27T05:32:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-27T05:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc03c0f9d12d85286d5e3623aa96d5c2a271b8e6'/>
<id>urn:sha1:dc03c0f9d12d85286d5e3623aa96d5c2a271b8e6</id>
<content type='text'>
Pull misc kbuild updates from Michal Marek:
 "This is the non-critical part of kbuild:

   - Coccinelle fixes, one semantic patch less in this round [Vaishali
     Thakkar, Wolfram Sang, Kees Cook]

   - rpm-pkg support for (open)SUSE's update-bootloader [Jiří Kosian]

   - rpm-pkg restored support for $RPMOPTS [Srinivas Pandruvada]

   - deb-pkg fixes for the linux-headers package [Bjørn Mork, Azriel
     Samson]"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  coccicheck: Fix missing 0 index in kill loop
  scripts/package/Makefile: rpmbuild add support of RPMOPTS
  builddeb: fix missing headers in linux-headers package
  builddeb: include objtool binary in headers package
  kbuild/mkspec: support 'update-bootloader'-based systems
  scripts: coccinelle: remove check to move constants to right
  Coccinelle: setup_timer: Add space in front of parentheses
</content>
</entry>
<entry>
<title>scripts: coccinelle: remove check to move constants to right</title>
<updated>2016-04-20T07:53:27Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2016-03-19T17:37:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f931362b38191016b7a6dc31d90a515b37658e02'/>
<id>urn:sha1:f931362b38191016b7a6dc31d90a515b37658e02</id>
<content type='text'>
The header mentions this check depends on personal taste. I agree.
Running coccicheck on patches before I apply them, this SmPL produced
enough false positives for me that I'd rather see it removed.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Coccinelle: setup_timer: Add space in front of parentheses</title>
<updated>2016-04-20T07:50:53Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-03-20T05:27:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=531f50388f1b05a297c6eab7a0c1e8e6d997678b'/>
<id>urn:sha1:531f50388f1b05a297c6eab7a0c1e8e6d997678b</id>
<content type='text'>
Add space in front of the offending parentheses to silent the
parse error for older Coccinelle versions. This makes the rule
usable with all Coccinelle versions.

Reported-by: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Fixes: c5eda8fd10c6 ("Coccinelle: Add api/setup_timer.cocci")
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>debugfs, coccinelle: check for obsolete DEFINE_SIMPLE_ATTRIBUTE() usage</title>
<updated>2016-04-12T21:14:21Z</updated>
<author>
<name>Nicolai Stange</name>
<email>nicstange@gmail.com</email>
</author>
<published>2016-03-22T13:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5103068eaca290f890a30aae70085fac44cecaf6'/>
<id>urn:sha1:5103068eaca290f890a30aae70085fac44cecaf6</id>
<content type='text'>
In order to protect against file removal races, debugfs files created via
debugfs_create_file() now get wrapped by a struct file_operations at their
opening.

If the original struct file_operations are known to be safe against removal
races by themselves already, the proxy creation may be bypassed by creating
the files through debugfs_create_file_unsafe().

In order to help debugfs users who use the common
  DEFINE_SIMPLE_ATTRIBUTE() + debugfs_create_file()
idiom to transition to removal safe struct file_operations, the helper
macro DEFINE_DEBUGFS_ATTRIBUTE() has been introduced.

Thus, the preferred strategy is to use
  DEFINE_DEBUGFS_ATTRIBUTE() + debugfs_create_file_unsafe()
now.

Introduce a Coccinelle script that searches for
DEFINE_SIMPLE_ATTRIBUTE()-defined struct file_operations handed into
debugfs_create_file(). Suggest to turn these usages into the
  DEFINE_DEBUGFS_ATTRIBUTE() + debugfs_create_file_unsafe()
pattern.

Signed-off-by: Nicolai Stange &lt;nicstange@gmail.com&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Add api/setup_timer.cocci</title>
<updated>2016-02-18T21:17:30Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-02-10T10:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5eda8fd10c64720d5232189f812a3b1cc983b8b'/>
<id>urn:sha1:c5eda8fd10c64720d5232189f812a3b1cc983b8b</id>
<content type='text'>
Use the timer API function setup_timer instead of structure field
assignments to initialize a timer.

Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
</feed>
