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] [day] [month] [year] [list]
Date:   Mon, 5 Jul 2021 14:00:34 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Fuad Tabba <tabba@...gle.com>, Pavel Machek <pavel@...x.de>
Cc:     Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH 5.10 049/101] KVM: selftests: Fix kvm_check_cap()
 assertion

On 05/07/21 09:10, Fuad Tabba wrote:
>>>
>>>        ret = ioctl(kvm_fd, KVM_CHECK_EXTENSION, cap);
>>> -     TEST_ASSERT(ret != -1, "KVM_CHECK_EXTENSION IOCTL failed,\n"
>>> +     TEST_ASSERT(ret >= 0, "KVM_CHECK_EXTENSION IOCTL failed,\n"
>>>                "  rc: %i errno: %i", ret, errno);
> There's at least one case that I am aware of that potentially would
> return a value other than -1 on error, which is a check for
> KVM_CAP_MSI_DEVID (-EINVAL, -22):
> 
> https://elixir.bootlin.com/linux/latest/source/arch/arm64/kvm/arm.c#L229

In userspace that becomes -1, errno == EINVAL.  I probably just misread 
the "ret != -1" as "ret == 0" when applying this patch; it doesn't hurt 
but it is certainly not needed for stable.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ