linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Joe Perches <joe@perches.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	rkrcmar@redhat.com, Thomas Gleixner <tglx@linutronix.de>,
	hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: Re: [PATCH] kvm: x86: mmu: Add cast to negated bitmasks in update_permission_bitmask()
Date: Wed, 20 Jun 2018 16:00:17 -0700	[thread overview]
Message-ID: <20180620230017.GI169030@google.com> (raw)
In-Reply-To: <c1d26d79-6e0c-fca8-af3c-e97af47b6b5f@redhat.com>

On Wed, Jun 20, 2018 at 10:02:15AM +0200, Paolo Bonzini wrote:
> On 20/06/2018 01:45, Matthias Kaehlcke wrote:
> > 
> > v4.16 with an x86 allyesconfig and a few drivers disabled since they
> > don't build with clang (yet):
> > 
> > 16 occurrences of -Wconstant-conversion, including the ones fixed by
> > this patch. Certainly no need for an endless churn of patches, and
> > given the limited number it also doesn't seem likely that new
> > instances will be added on a regular base.
> 
> Thanks for providing numbers!  The next question is: how many of these
> 16 occurrences are actual bugs?

Probably none.

> This is what measures the usefulness of the warning.

I very much doubt that this is a useful metric given the limited
number of occurrences.

Let's assume that 1 out of 20 patches not doing the cast have an
actual problem. For 16 occurrences this means there's a 44% chance
that none of these instances is an error (18.5% for 1 out 10). This
is without taking into account that some of the instances are in the
same file and likey similar (as in the KVM case), and that most of the
code has undergone years of testing in the field.

  reply	other threads:[~2018-06-20 23:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 17:47 [PATCH] kvm: x86: mmu: Add cast to negated bitmasks in update_permission_bitmask() Matthias Kaehlcke
2018-06-15 18:04 ` Nick Desaulniers
2018-06-15 18:18   ` Joe Perches
2018-06-15 18:29     ` Matthias Kaehlcke
2018-06-15 18:40       ` Joe Perches
2018-06-15 18:45         ` Nick Desaulniers
2018-06-19 15:19           ` Paolo Bonzini
2018-06-19 17:08             ` Nick Desaulniers
2018-06-19 17:13               ` Paolo Bonzini
2018-06-19 18:38                 ` Matthias Kaehlcke
2018-06-19 17:23               ` Joe Perches
2018-06-19 17:35                 ` Paolo Bonzini
2018-06-19 18:07                   ` Joe Perches
2018-06-19 18:36                     ` Matthias Kaehlcke
2018-06-19 19:11                       ` Joe Perches
2018-06-19 21:10                         ` Matthias Kaehlcke
2018-06-19 21:55                           ` Joe Perches
2018-06-19 23:45                             ` Matthias Kaehlcke
2018-06-20  0:18                               ` Joe Perches
2018-06-20  1:36                                 ` Matthias Kaehlcke
2018-06-20  8:02                               ` Paolo Bonzini
2018-06-20 23:00                                 ` Matthias Kaehlcke [this message]
2018-06-16  3:39 ` kbuild test robot

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=20180620230017.GI169030@google.com \
    --to=mka@chromium.org \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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).