All of lore.kernel.org
 help / color / mirror / Atom feed
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] kvm: vgic: are these warnings wrong?
Date: Wed, 15 Nov 2017 09:34:10 +0900	[thread overview]
Message-ID: <20171115003408.GE29552@linaro.org> (raw)
In-Reply-To: <5c77ed5c-3b57-f9ba-b24d-f54729bc6a59@arm.com>

On Tue, Nov 14, 2017 at 09:07:46AM +0000, Marc Zyngier wrote:
> On 14/11/17 06:47, AKASHI Takahiro wrote:
> > Hi Marc,
> > 
> > I've just run a static analyzer to v4.14.
> > While most of warnings/errors are false-positive, as you can easily imagine,
> > there are something dubious. Can you please check ones below?
> > 
> > virt/kvm/arm/vgic/vgic-v3.c:352 vgic_v3_save_pending_tables() error: uninitialized symbol 'val'.
> > virt/kvm/arm/vgic/vgic-its.c:424 its_sync_lpi_pending_table() error: uninitialized symbol 'pendmask'.
> > virt/kvm/arm/vgic/vgic-its.c:779 vgic_its_alloc_collection() error: potential null dereference 'collection'.  (kzalloc returns null)
> > virt/kvm/arm/vgic/vgic-irqfd.c:115 kvm_vgic_setup_default_irq_routing() warn: double check that we're allocating correct size: 48 vs 64
> > 
> > # I believe that the messages here are self-describing.
> 
> Hi Takahiro,
> 
> All of these are pretty good findings... Out of curiosity, what is the
> tool you've been using?

smatch!
https://blogs.oracle.com/linuxkernel/smatch-static-analysis-tool-overview,-by-dan-carpenter

> Many thanks for reporting these bugs.

I want to find more bugs with such tools :) Just kidding.

-Takahiro AKASHI

> 	M.
> -- 
> Jazz is not dead. It just smells funny...

  reply	other threads:[~2017-11-15  0:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14  6:47 [RFC] kvm: vgic: are these warnings wrong? AKASHI Takahiro
2017-11-14  9:07 ` Marc Zyngier
2017-11-15  0:34   ` AKASHI Takahiro [this message]
2017-11-14 13:38 ` Marc Zyngier

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=20171115003408.GE29552@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.