mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	Joe Perches <joe@perches.com>,
	Prakruthi Deepak Heragu <pheragu@codeaurora.org>,
	apw@canonical.com, Dan Carpenter <error27@gmail.com>,
	linux-kernel@vger.kernel.org, ckadabi@codeaurora.org,
	tsoni@codeaurora.org, bryanh@codeaurora.org,
	Israel Schlesinger <israels@codeaurora.org>,
	Stepan Moskovchenko <stepanm@codeaurora.org>
Subject: Re: [PATCH] checkpatch: Add warnings for use of mdelay()
Date: Sat, 7 Jul 2018 20:09:06 +0800	[thread overview]
Message-ID: <8149bc56-7523-9c25-67fd-c92480917039@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1807060747280.3506@hadrien>



On 2018/7/6 13:49, Julia Lawall wrote:
>
> On Thu, 5 Jul 2018, Dan Carpenter wrote:
>
>> Neither Smatch nor Coccinelle do a good job tracking when you're in
>> atomic context.  I've wanted to add this to Smatch but even then it
>> would be to warn that "We're holding a spinlock so we can't sleep".
>> It's trickier to say for sure when you're not holding a lock...
> Jia-Ju Bai is working on this.  The tool is available on github.  It's
> still being improved, though, so perhaps it's not yet ready for eg 0-day
> inclusion.  He can give more details.

Thanks for Julia's recommendation :)

I am doing the similar work with Julia, from the beginning of this year.
We develop two new LLVM-based tools to find two problems in the Linux 
kernel:
(1) Sleeping in atomic context. The tool is named DSAC.
(2) Using non-sleep function calls in non-atomic context. The tool is 
named DCNS.

We handle two common examples of atomic context:
(1) Holding a spinlock.
(2) In an interrupt handler.

DSAC and DCNS can basically work now, and some of the defects found by 
them have been confirmed and fixed in the Linux kernel.
But these tools are still being improved.

In fact, I encounter a hard problem when writing the tools, namely how 
to accurately and completely handle function pointer calls.
I have handled the function pointer in form of data structure field, but 
I do not find a good way to handle the function pointer that is used as 
a function argument.
Can someone give me good advice?

We also have made slides introducing DSAC and DCNS tools.
If you are interested in our work, I can send you the slides :)


Best wishes,
Jia-Ju Bai

  reply	other threads:[~2018-07-07 12:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 18:18 Prakruthi Deepak Heragu
2018-07-04 18:30 ` Joe Perches
2018-07-05  8:19   ` Dan Carpenter
2018-07-06  5:49     ` Julia Lawall
2018-07-07 12:09       ` Jia-Ju Bai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-07-27 17:11 Israel Schlesinger
2010-07-27 17:22 ` Joe Perches
2010-07-27 17:31 ` Jonathan Corbet
2010-07-27 17:32   ` Patrick Pannuto
2010-07-27 19:16     ` Andrew Morton
2010-07-28  9:44       ` Andy Whitcroft

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=8149bc56-7523-9c25-67fd-c92480917039@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=apw@canonical.com \
    --cc=bryanh@codeaurora.org \
    --cc=ckadabi@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=error27@gmail.com \
    --cc=israels@codeaurora.org \
    --cc=joe@perches.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pheragu@codeaurora.org \
    --cc=stepanm@codeaurora.org \
    --cc=tsoni@codeaurora.org \
    /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

Powered by JetHome