<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/virt, branch v3.18.67</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.67</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.67'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-27T22:03:27Z</updated>
<entry>
<title>vfio: New external user group/file match</title>
<updated>2017-07-27T22:03:27Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2017-06-28T19:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0c20006ee2e3c18b87f781b51104275599fa2f8e'/>
<id>urn:sha1:0c20006ee2e3c18b87f781b51104275599fa2f8e</id>
<content type='text'>
commit 5d6dee80a1e94cc284d03e06d930e60e8d3ecf7d upstream.

At the point where the kvm-vfio pseudo device wants to release its
vfio group reference, we can't always acquire a new reference to make
that happen.  The group can be in a state where we wouldn't allow a
new reference to be added.  This new helper function allows a caller
to match a file to a group to facilitate this.  Given a file and
group, report if they match.  Thus the caller needs to already have a
group reference to match to the file.  This allows the deletion of a
group without acquiring a new reference.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Tested-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kvm: x86: memset whole irq_eoi</title>
<updated>2017-07-27T22:03:23Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-10-13T15:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d1ef14e5db17cd0642e3e9621182e206cdbceca5'/>
<id>urn:sha1:d1ef14e5db17cd0642e3e9621182e206cdbceca5</id>
<content type='text'>
commit 8678654e3c7ad7b0f4beb03fa89691279cba71f9 upstream.

gcc 7 warns:
arch/x86/kvm/ioapic.c: In function 'kvm_ioapic_reset':
arch/x86/kvm/ioapic.c:597:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]

And it is right. Memset whole array using sizeof operator.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
[Added x86 subject tag]
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: kvm_io_bus_unregister_dev() should never fail</title>
<updated>2017-04-22T05:15:03Z</updated>
<author>
<name>David Hildenbrand</name>
<email>david@redhat.com</email>
</author>
<published>2017-03-23T17:24:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=07882feab469f30e8e67b6aa02e2913004dac1da'/>
<id>urn:sha1:07882feab469f30e8e67b6aa02e2913004dac1da</id>
<content type='text'>
commit 90db10434b163e46da413d34db8d0e77404cc645 upstream.

No caller currently checks the return value of
kvm_io_bus_unregister_dev(). This is evil, as all callers silently go on
freeing their device. A stale reference will remain in the io_bus,
getting at least used again, when the iobus gets teared down on
kvm_destroy_vm() - leading to use after free errors.

There is nothing the callers could do, except retrying over and over
again.

So let's simply remove the bus altogether, print an error and make
sure no one can access this broken bus again (returning -ENOMEM on any
attempt to access it).

Fixes: e93f8a0f821e ("KVM: convert io_bus to SRCU")
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: x86: clear bus pointer when destroyed</title>
<updated>2017-04-22T05:15:03Z</updated>
<author>
<name>Peter Xu</name>
<email>peterx@redhat.com</email>
</author>
<published>2017-03-15T08:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6216a0f1e3da39f37aba3d43257c8cda172b414'/>
<id>urn:sha1:c6216a0f1e3da39f37aba3d43257c8cda172b414</id>
<content type='text'>
commit df630b8c1e851b5e265dc2ca9c87222e342c093b upstream.

When releasing the bus, let's clear the bus pointers to mark it out. If
any further device unregister happens on this bus, we know that we're
done if we found the bus being released already.

Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: nVMX: Fix memory corruption when using VMCS shadowing</title>
<updated>2016-08-22T16:23:09Z</updated>
<author>
<name>Jim Mattson</name>
<email>jmattson@google.com</email>
</author>
<published>2016-07-08T22:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2aa2e066287e796f1ead8476a0b1306b10777f8f'/>
<id>urn:sha1:2aa2e066287e796f1ead8476a0b1306b10777f8f</id>
<content type='text'>
[ Upstream commit 2f1fe81123f59271bddda673b60116bde9660385 ]

When freeing the nested resources of a vcpu, there is an assumption that
the vcpu's vmcs01 is the current VMCS on the CPU that executes
nested_release_vmcs12(). If this assumption is violated, the vcpu's
vmcs01 may be made active on multiple CPUs at the same time, in
violation of Intel's specification. Moreover, since the vcpu's vmcs01 is
not VMCLEARed on every CPU on which it is active, it can linger in a
CPU's VMCS cache after it has been freed and potentially
repurposed. Subsequent eviction from the CPU's VMCS cache on a capacity
miss can result in memory corruption.

It is not sufficient for vmx_free_vcpu() to call vmx_load_vmcs01(). If
the vcpu in question was last loaded on a different CPU, it must be
migrated to the current CPU before calling vmx_load_vmcs01().

Signed-off-by: Jim Mattson &lt;jmattson@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES</title>
<updated>2016-07-12T12:46:53Z</updated>
<author>
<name>Xiubo Li</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2016-06-15T10:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4929b4934f7bf919a97bd8826c929f74915c8e9a'/>
<id>urn:sha1:4929b4934f7bf919a97bd8826c929f74915c8e9a</id>
<content type='text'>
[ Upstream commit caf1ff26e1aa178133df68ac3d40815fed2187d9 ]

These days, we experienced one guest crash with 8 cores and 3 disks,
with qemu error logs as bellow:

qemu-system-x86_64: /build/qemu-2.0.0/kvm-all.c:984:
kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

And then we found one patch(bdf026317d) in qemu tree, which said
could fix this bug.

Execute the following script will reproduce the BUG quickly:

irq_affinity.sh
========================================================================

vda_irq_num=25
vdb_irq_num=27
while [ 1 ]
do
    for irq in {1,2,4,8,10,20,40,80}
        do
            echo $irq &gt; /proc/irq/$vda_irq_num/smp_affinity
            echo $irq &gt; /proc/irq/$vdb_irq_num/smp_affinity
            dd if=/dev/vda of=/dev/zero bs=4K count=100 iflag=direct
            dd if=/dev/vdb of=/dev/zero bs=4K count=100 iflag=direct
        done
done
========================================================================

The following qemu log is added in the qemu code and is displayed when
this bug reproduced:

kvm_irqchip_commit_routes: max gsi: 1008, nr_allocated_irq_routes: 1024,
irq_routes-&gt;nr: 1024, gsi_count: 1024.

That's to say when irq_routes-&gt;nr == 1024, there are 1024 routing entries,
but in the kernel code when routes-&gt;nr &gt;= 1024, will just return -EINVAL;

The nr is the number of the routing entries which is in of
[1 ~ KVM_MAX_IRQ_ROUTES], not the index in [0 ~ KVM_MAX_IRQ_ROUTES - 1].

This patch fix the BUG above.

Cc: stable@vger.kernel.org
Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Wei Tang &lt;tangwei@cmss.chinamobile.com&gt;
Signed-off-by: Zhang Zhuoyu &lt;zhangzhuoyu@cmss.chinamobile.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi</title>
<updated>2016-06-20T03:47:42Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-06-01T12:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9a579331430c2cebb99488f664a736654988532d'/>
<id>urn:sha1:9a579331430c2cebb99488f664a736654988532d</id>
<content type='text'>
[ Upstream commit c622a3c21ede892e370b56e1ceb9eb28f8bbda6b ]

Found by syzkaller:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000120
    IP: [&lt;ffffffffa0797202&gt;] kvm_irq_map_gsi+0x12/0x90 [kvm]
    PGD 6f80b067 PUD b6535067 PMD 0
    Oops: 0000 [#1] SMP
    CPU: 3 PID: 4988 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1
    [...]
    Call Trace:
     [&lt;ffffffffa0795f62&gt;] irqfd_update+0x32/0xc0 [kvm]
     [&lt;ffffffffa0796c7c&gt;] kvm_irqfd+0x3dc/0x5b0 [kvm]
     [&lt;ffffffffa07943f4&gt;] kvm_vm_ioctl+0x164/0x6f0 [kvm]
     [&lt;ffffffff81241648&gt;] do_vfs_ioctl+0x298/0x480
     [&lt;ffffffff812418a9&gt;] SyS_ioctl+0x79/0x90
     [&lt;ffffffff817a1062&gt;] tracesys_phase2+0x84/0x89
    Code: b5 71 a7 e0 5b 41 5c 41 5d 5d f3 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 8b 8f 10 2e 00 00 31 c0 48 89 e5 &lt;39&gt; 91 20 01 00 00 76 6a 48 63 d2 48 8b 94 d1 28 01 00 00 48 85
    RIP  [&lt;ffffffffa0797202&gt;] kvm_irq_map_gsi+0x12/0x90 [kvm]
     RSP &lt;ffff8800926cbca8&gt;
    CR2: 0000000000000120

Testcase:

    #include &lt;unistd.h&gt;
    #include &lt;sys/syscall.h&gt;
    #include &lt;string.h&gt;
    #include &lt;stdint.h&gt;
    #include &lt;linux/kvm.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;sys/ioctl.h&gt;

    long r[26];

    int main()
    {
        memset(r, -1, sizeof(r));
        r[2] = open("/dev/kvm", 0);
        r[3] = ioctl(r[2], KVM_CREATE_VM, 0);

        struct kvm_irqfd ifd;
        ifd.fd = syscall(SYS_eventfd2, 5, 0);
        ifd.gsi = 3;
        ifd.flags = 2;
        ifd.resamplefd = ifd.fd;
        r[25] = ioctl(r[3], KVM_IRQFD, &amp;ifd);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: fix spin_lock_init order on x86</title>
<updated>2016-04-18T12:49:38Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-03-21T09:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=241a9a816bc95d7bbc7c422c60e880491a59ac1b'/>
<id>urn:sha1:241a9a816bc95d7bbc7c422c60e880491a59ac1b</id>
<content type='text'>
[ Upstream commit e9ad4ec8379ad1ba6f68b8ca1c26b50b5ae0a327 ]

Moving the initialization earlier is needed in 4.6 because
kvm_arch_init_vm is now using mmu_lock, causing lockdep to
complain:

[  284.440294] INFO: trying to register non-static key.
[  284.445259] the code is fine but needs lockdep annotation.
[  284.450736] turning off the locking correctness validator.
...
[  284.528318]  [&lt;ffffffff810aecc3&gt;] lock_acquire+0xd3/0x240
[  284.533733]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.541467]  [&lt;ffffffff81715581&gt;] _raw_spin_lock+0x41/0x80
[  284.546960]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.554707]  [&lt;ffffffffa0305aa0&gt;] kvm_page_track_register_notifier+0x20/0x60 [kvm]
[  284.562281]  [&lt;ffffffffa02ece70&gt;] kvm_mmu_init_vm+0x20/0x30 [kvm]
[  284.568381]  [&lt;ffffffffa02dbf7a&gt;] kvm_arch_init_vm+0x1ea/0x200 [kvm]
[  284.574740]  [&lt;ffffffffa02bff3f&gt;] kvm_dev_ioctl+0xbf/0x4d0 [kvm]

However, it also helps fixing a preexisting problem, which is why this
patch is also good for stable kernels: kvm_create_vm was incrementing
current-&gt;mm-&gt;mm_count but not decrementing it at the out_err label (in
case kvm_init_mmu_notifier failed).  The new initialization order makes
it possible to add the required mmdrop without adding a new error label.

Cc: stable@vger.kernel.org
Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: do not warn on page allocation failures</title>
<updated>2016-03-10T14:43:52Z</updated>
<author>
<name>Christian Borntraeger</name>
<email>borntraeger@de.ibm.com</email>
</author>
<published>2016-02-19T12:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0b898dc779c02cba10eae3c8e6a99cadf0492a9'/>
<id>urn:sha1:e0b898dc779c02cba10eae3c8e6a99cadf0492a9</id>
<content type='text'>
[ Upstream commit d7444794a02ff655eda87e3cc54e86b940e7736f ]

In async_pf we try to allocate with NOWAIT to get an element quickly
or fail. This code also handle failures gracefully. Lets silence
potential page allocation failures under load.

qemu-system-s39: page allocation failure: order:0,mode:0x2200000
[...]
Call Trace:
([&lt;00000000001146b8&gt;] show_trace+0xf8/0x148)
[&lt;000000000011476a&gt;] show_stack+0x62/0xe8
[&lt;00000000004a36b8&gt;] dump_stack+0x70/0x98
[&lt;0000000000272c3a&gt;] warn_alloc_failed+0xd2/0x148
[&lt;000000000027709e&gt;] __alloc_pages_nodemask+0x94e/0xb38
[&lt;00000000002cd36a&gt;] new_slab+0x382/0x400
[&lt;00000000002cf7ac&gt;] ___slab_alloc.constprop.30+0x2dc/0x378
[&lt;00000000002d03d0&gt;] kmem_cache_alloc+0x160/0x1d0
[&lt;0000000000133db4&gt;] kvm_setup_async_pf+0x6c/0x198
[&lt;000000000013dee8&gt;] kvm_arch_vcpu_ioctl_run+0xd48/0xd58
[&lt;000000000012fcaa&gt;] kvm_vcpu_ioctl+0x372/0x690
[&lt;00000000002f66f6&gt;] do_vfs_ioctl+0x3be/0x510
[&lt;00000000002f68ec&gt;] SyS_ioctl+0xa4/0xb8
[&lt;0000000000781c5e&gt;] system_call+0xd6/0x264
[&lt;000003ffa24fa06a&gt;] 0x3ffa24fa06a

Cc: stable@vger.kernel.org
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Dominik Dingel &lt;dingel@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic: Ensure bitmaps are long enough</title>
<updated>2016-03-08T06:14:11Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2016-02-16T14:47:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e720b3ba019456800fe329bea4eb9f7b1cbdab73'/>
<id>urn:sha1:e720b3ba019456800fe329bea4eb9f7b1cbdab73</id>
<content type='text'>
[ Upstream commit 236cf17c2502007a9d2dda3c39fb0d9a6bd03cc2 ]

When we allocate bitmaps in vgic_vcpu_init_maps, we divide the number of
bits we need by 8 to figure out how many bytes to allocate. However,
bitmap elements are always accessed as unsigned longs, and if we didn't
happen to allocate a size such that size % sizeof(unsigned long) == 0,
bitmap accesses may go past the end of the allocation.

When using KASAN (which does byte-granular access checks), this results
in a continuous stream of BUGs whenever these bitmaps are accessed:

=============================================================================
BUG kmalloc-128 (Tainted: G    B          ): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in vgic_init.part.25+0x55c/0x990 age=7493 cpu=3 pid=1730
INFO: Slab 0xffffffbde6d5da40 objects=16 used=15 fp=0xffffffc935769700 flags=0x4000000000000080
INFO: Object 0xffffffc935769500 @offset=1280 fp=0x          (null)

Bytes b4 ffffffc9357694f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Object ffffffc935769570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Padding ffffffc9357695f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
CPU: 3 PID: 1740 Comm: kvm-vcpu-0 Tainted: G    B           4.4.0+ #17
Hardware name: ARM Juno development board (r1) (DT)
Call trace:
[&lt;ffffffc00008e770&gt;] dump_backtrace+0x0/0x280
[&lt;ffffffc00008ea04&gt;] show_stack+0x14/0x20
[&lt;ffffffc000726360&gt;] dump_stack+0x100/0x188
[&lt;ffffffc00030d324&gt;] print_trailer+0xfc/0x168
[&lt;ffffffc000312294&gt;] object_err+0x3c/0x50
[&lt;ffffffc0003140fc&gt;] kasan_report_error+0x244/0x558
[&lt;ffffffc000314548&gt;] __asan_report_load8_noabort+0x48/0x50
[&lt;ffffffc000745688&gt;] __bitmap_or+0xc0/0xc8
[&lt;ffffffc0000d9e44&gt;] kvm_vgic_flush_hwstate+0x1bc/0x650
[&lt;ffffffc0000c514c&gt;] kvm_arch_vcpu_ioctl_run+0x2ec/0xa60
[&lt;ffffffc0000b9a6c&gt;] kvm_vcpu_ioctl+0x474/0xa68
[&lt;ffffffc00036b7b0&gt;] do_vfs_ioctl+0x5b8/0xcb0
[&lt;ffffffc00036bf34&gt;] SyS_ioctl+0x8c/0xa0
[&lt;ffffffc000086cb0&gt;] el0_svc_naked+0x24/0x28
Memory state around the buggy address:
 ffffffc935769400: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc935769480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
&gt;ffffffc935769500: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffffffc935769580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc935769600: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Fix the issue by always allocating a multiple of sizeof(unsigned long),
as we do elsewhere in the vgic code.

Fixes: c1bfb577a ("arm/arm64: KVM: vgic: switch to dynamic allocation")
Cc: stable@vger.kernel.org
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Acked-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
