lkml.org 
[lkml]   [2018]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] kvm: x86: mmu: Add cast to negated bitmasks in update_permission_bitmask()
From
Date
On Mon, 2018-06-25 at 13:12 -0400, Nick Desaulniers wrote:
> On Mon, Jun 25, 2018 at 1:05 PM Joe Perches <joe@perches.com> wrote:
> > On Mon, 2018-06-25 at 12:47 -0400, Nick Desaulniers wrote:
[]
> > > Here's an actual bug this warning caught applied to drivers/input/:
> > >
> > > dae1a432ab1f ("Input: mousedev - fix implicit conversion warning"):
> > > https://patchwork.kernel.org/patch/9753771/
> >
> > What bug is that?
> >
> > $ cat test.c
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <memory.h>
> >
> > int main(int argc, char **argv)
> > {
> > static const signed char a[3] = {0x60, 3, 200};
> > static const unsigned char b[3] = {0x60, 3, 200};
> >
> > printf("a and b are %s\n",
> > memcmp(a, b, 3) == 0 ? "identical" : "different");
> > }
> > $ gcc test.c
> > $ ./a.out
> > a and b are identical
> >
> Good point, poor choice of example on my part.

Is there an actual example of this so-called "bug"
in the kernel code?

\
 
 \ /
  Last update: 2018-06-25 19:35    [W:0.681 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site