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-next>] [day] [month] [year] [list]
Date:   Sat, 16 Sep 2017 21:54:29 +0530
From:   Abdul Haleem <abdhalee@...ux.vnet.ibm.com>
To:     linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
Cc:     "Jan H." Schönherr <jschoenh@...zon.de>,
        Paolo Bonzini <pbonzini@...hat.com>, mpe <mpe@...erman.id>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        sachinp <sachinp@...ux.vnet.ibm.com>
Subject: [mainline][bisected 36ae3c0] Build fail at virt/kvm/eventfd.c:568

Hi,

Today's mainline kernel failed to build on powerpc with below error

arch/powerpc/kvm/../../../virt/kvm/eventfd.c: In function ‘kvm_irqfd’: 
arch/powerpc/kvm/../../../virt/kvm/eventfd.c:568:19: error:
‘KVM_MAX_IRQ_ROUTES’ undeclared (first use in this function)
  if (args->gsi >= KVM_MAX_IRQ_ROUTES)
                   ^
arch/powerpc/kvm/../../../virt/kvm/eventfd.c:568:19: note: each
undeclared identifier is reported only once for each function it appears
in
make[1]: *** [arch/powerpc/kvm/../../../virt/kvm/eventfd.o] Error 1


Machine Type: Power 8 KVM Host
kernel: 4.13.0
gcc : 5.1.1
config: attached.


Possible bad commit is :

commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563
Author: Jan H. Schönherr <jschoenh@...zon.de>
Date:   Thu Sep 7 19:02:48 2017 +0100

    KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
    
    We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
    kvm_set_irq_routing(). Hence, there is no sense in accepting them
    via KVM_IRQFD. Prevent them from entering the system in the first
    place.
    
    Signed-off-by: Jan H. Schönherr <jschoenh@...zon.de>
    Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index f2ac53a..c608ab4 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -565,6 +565,8 @@ kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
 {
        if (args->flags & ~(KVM_IRQFD_FLAG_DEASSIGN |
KVM_IRQFD_FLAG_RESAMPLE))
                return -EINVAL;
+       if (args->gsi >= KVM_MAX_IRQ_ROUTES)
+               return -EINVAL;
 
        if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
                return kvm_irqfd_deassign(kvm, args);


-- 
Regard's

Abdul Haleem
IBM Linux Technology Centre



View attachment "config-kvm-host" of type "text/plain" (140210 bytes)

Powered by blists - more mailing lists