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: <87zifatu3a.fsf@concordia.ellerman.id.au>
Date:   Fri, 21 Apr 2017 11:42:01 +1000
From:   Michael Ellerman <michaele@....ibm.com>
To:     paulmck@...ux.vnet.ibm.com, Paolo Bonzini <pbonzini@...hat.com>
Cc:     tglx@...utronix.de, kvm@...r.kernel.org, oleg@...hat.com,
        peterz@...radead.org, fweisbec@...il.com, bobby.prani@...il.com,
        jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
        kvm-ppc@...r.kernel.org, josh@...htriplett.org,
        dhowells@...hat.com, edumazet@...gle.com,
        "paulus\@samba.org" <paulus@...ba.org>, rostedt@...dmis.org,
        dipankar@...ibm.com, mathieu.desnoyers@...icios.com,
        akpm@...ux-foundation.org,
        "linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        mingo@...nel.org
Subject: Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> writes:
> On Thu, Apr 20, 2017 at 05:28:32PM +0200, Paolo Bonzini wrote:
>> On 20/04/2017 05:40, Michael Ellerman wrote:
>> > "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> writes:
>> > 
>> > This change seems to have had the non-obvious effect of breaking the
>> > powerpc KVM build.
...
>> 
>> Michael, if you want to move the two srcu structs at the end of struct
>> kvm, that would be fine by me.  Please send a patch yourself so you can
>> test it on PPC.  Thanks,
>
> On the off-chance that it is at all helpful, I have added the commit
> shown below to -rcu.

As shown below :)

> If it helps, I am happy to push this, but am just as happy to drop it
> in favor of some other fix. If at all possible, I would like to get
> this into the upcoming merge window.

Thanks, this looks perfect to me, and if you're happy to put it on top
of your tree that would limit the breakage to a smaller history window,
so that would be ideal.

Tested-by: Michael Ellerman <mpe@...erman.id.au>

cheers


>From a19a6617e2817e485ccc2f7cc5a97bd7ff769b87 Mon Sep 17 00:00:00 2001
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Date: Thu, 20 Apr 2017 17:30:06 -0700
Subject: kvm: Move srcu_struct fields to end of struct kvm

Parallelizing SRCU callback handling increased the size of srcu_struct,
which moved the kvm_arch field within the kvm struct out of reach of
powerpc's current assembly code, resulting in the following sort of
build error:

arch/powerpc/kvm/book3s_hv_rmhandlers.S:617: Error: operand out of range (0x000000000000b328 is not between 0xffffffffffff8000 and 0x0000000000007fff)

This commit moves the srcu_struct fields in the kvm structure to follow
the kvm_arch field, which again allows powerpc's assembly code to
reach it.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Reported-by: Michael Ellerman <michaele@....ibm.com>
Reported-by: kbuild test robot <fengguang.wu@...el.com>
Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
---
 include/linux/kvm_host.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 2c14ad9..96c8e29 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -375,8 +375,6 @@ struct kvm {
 	struct mutex slots_lock;
 	struct mm_struct *mm; /* userspace tied to this vm */
 	struct kvm_memslots *memslots[KVM_ADDRESS_SPACE_NUM];
-	struct srcu_struct srcu;
-	struct srcu_struct irq_srcu;
 	struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
 
 	/*
@@ -429,6 +427,8 @@ struct kvm {
 	struct list_head devices;
 	struct dentry *debugfs_dentry;
 	struct kvm_stat_data **debugfs_stat_data;
+	struct srcu_struct srcu;
+	struct srcu_struct irq_srcu;
 };
 
 #define kvm_err(fmt, ...) \
-- 
cgit v1.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ