cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Software analysis with SmPL around unchecked function calls
Date: Fri, 11 Oct 2019 09:03:39 +0200	[thread overview]
Message-ID: <c9b2c5be-455a-ad69-ad65-6efb910055b6@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1910110806250.2662@hadrien>

>> The possibility remains that also your search pattern suggestion will point
>> update candidates out at other places than the implementation of the mentioned
>> function “imx_pd_bind”.
>
> So many words.  So little information.

This can also occasionally happen if the search approach is simpler
than it would be required for specific source code places.

The discussion context should be resolvable together with previous messages.

Repetition:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/imx/parallel-display.c?id=43b815c6a8e7dbccb5b8bd9c4b099c24bc22d135#n197
https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/imx/parallel-display.c#L197


> What is the name of the file and the line number at which you get a result
> that you find inacceptable with my rule?

Another example:
Now I wonder about a patch hunk like the following which is generated
from the discussed search pattern suggestion.

@display@
expression x;
identifier f;
@@
* x = kmemdup(...);
  ... when != x
(
  x->f
|
  f(...,<+...x...+>,...)
)


elfring@Sonne:~/Projekte/Linux/next-patched> spatch ~/Projekte/Coccinelle/janitor/show_unchecked_kmemdup3.cocci net/sunrpc/auth_gss/auth_gss.c
…
@@ -146,7 +146,6 @@ simple_get_netobj(const void *p, const v
 	q = (const void *)((const char *)p + len);
 	if (unlikely(q > end || q < p))
 		return ERR_PTR(-EFAULT);
-	dest->data = kmemdup(p, len, GFP_NOFS);
 	if (unlikely(dest->data == NULL))
 		return ERR_PTR(-ENOMEM);
 	dest->len = len;


https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sunrpc/auth_gss/auth_gss.c?id=9e208aa06c2109b45eec6be049a8e47034748c20#n149
https://elixir.bootlin.com/linux/v5.4-rc2/source/net/sunrpc/auth_gss/auth_gss.c#L149


Will the corresponding clarification help software developers (besides me)?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-10-11  7:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 12:56 [Cocci] Software analysis with SmPL around unchecked function calls Markus Elfring
2019-10-10 13:13 ` Julia Lawall
2019-10-10 13:35   ` Markus Elfring
2019-10-10 13:38     ` Julia Lawall
2019-10-10 14:04       ` Markus Elfring
     [not found]         ` <alpine.DEB.2.21.1910101606420.2305@hadrien>
2019-10-10 14:15           ` Markus Elfring
     [not found]             ` <alpine.DEB.2.21.1910102053440.2500@hadrien>
2019-10-11  5:11               ` Markus Elfring
2019-10-11  6:07                 ` Julia Lawall
2019-10-11  7:03                   ` Markus Elfring [this message]
     [not found]                     ` <alpine.DEB.2.21.1910110906390.2662@hadrien>
2019-10-11  7:30                       ` Markus Elfring
2019-10-11  9:23                       ` Markus Elfring
2019-10-10 16:25       ` Markus Elfring
2019-10-18 12:54   ` [Cocci] Software analysis with SmPL around unchecked pointer " Markus Elfring
2019-10-18 13:31     ` Julia Lawall
2019-10-18 13:42       ` Markus Elfring
2019-10-18 13:49         ` Julia Lawall
2019-10-18 14:20           ` Markus Elfring
2019-10-18 14:30             ` Julia Lawall
2019-10-18 14:34               ` Markus Elfring
2019-10-18 14:39                 ` Julia Lawall
2019-10-18 14:46                   ` Markus Elfring
2019-10-18 14:52                     ` Julia Lawall
2019-10-18 14:56                       ` Markus Elfring
2019-10-18 16:00       ` Markus Elfring
2019-10-18 16:06         ` Julia Lawall
2019-10-18 16:32           ` Markus Elfring
2019-10-19 15:33         ` Markus Elfring
2019-10-19 15:41           ` Julia Lawall
2019-10-19 16:04             ` Markus Elfring
2019-10-19 19:40             ` Markus Elfring
2019-10-20  5:42               ` Julia Lawall
2019-10-20  6:04                 ` Markus Elfring
2019-10-20  9:22                 ` Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9b2c5be-455a-ad69-ad65-6efb910055b6@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).