lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150221050724.GA8880@gmail.com>
Date:	Sat, 21 Feb 2015 06:07:25 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] locking fixes


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> How does this work for you at all?
> 
> On Fri, Feb 20, 2015 at 5:37 AM, Ingo Molnar <mingo@...nel.org> wrote:
> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> > index 94f643484300..e354cc6446ab 100644
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -803,8 +808,8 @@ static void kvm_unlock_kick(struct arch_spinlock *lock, __ticket_t ticket)
> >         add_stats(RELEASED_SLOW, 1);
> >         for_each_cpu(cpu, &waiting_cpus) {
> >                 const struct kvm_lock_waiting *w = &per_cpu(klock_waiting, cpu);
> > -               if (ACCESS_ONCE(w->lock) == lock &&
> > -                   ACCESS_ONCE(w->want) == ticket) {
> > +               if (READ_ONCE(w->lock) == lock &&
> > +                   READ_ONCE(w->want) == ticket) {
> >                         add_stats(RELEASED_SLOW_KICKED, 1);
> >                         kvm_kick_cpu(cpu);
> >                         break;
> 
> I get horrible compile warnings from this, because of how 
> 'w' is a pointer to a 'const' structure, which then 
> causes things like
> 
>     include/linux/compiler.h:262:39: warning: passing argument 1 of
> ‘__read_once_size’ discards ‘const’ qualifier from pointer target type
>       ({ typeof(x) __val; __read_once_size(&x, &__val, sizeof(__val)); __val; })
> 
> which is fairly hard to avoid (looks like it might need a 
> union)

Hm, that's really weird, I got no kernel build warnings at 
any stage during handling this commit, and I tested 
d6abfdb20223 for warnings right before sending you the pull 
request, as I do with every pull request, and booted the 
image as well.

( I've attached the build log that I saw before sending you 
  the pull request. )

The kbuild test robot which tests for warnings didn't 
report one to me either. I tested a few other configs as 
well:

  x86 defconfig (PARAVIRT=n):        0 warnings
  'make kvmconfig' (PARAVIRT=y):     0 warnings
  x86 bootable config (attached):    0 warnings

That's with a distro compiler with a couple of months old 
package: gcc version 4.8.3 20140911.

Could that warning be somehow config or compiler dependent? 
Could you send me your .config?

Weird and obviously annoying.

Thanks,

	Ingo

View attachment "config" of type "text/plain" (88126 bytes)

View attachment "build.log" of type "text/plain" (77333 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ