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: <ed92111b-3b80-0cde-1821-0a491dee2dcf@redhat.com>
Date:   Fri, 29 Apr 2022 15:52:02 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Oliver Upton <oupton@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
        Peter Gonda <pgonda@...gle.com>,
        Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH for-5.18] KVM: fix bad user ABI for KVM_EXIT_SYSTEM_EVENT

On 4/29/22 06:38, Oliver Upton wrote:
>> +                        __u64 data[16];
> This is out of sync with the union { flags; data; } now.

Yes, that's intentional.  The flags member is mentioned below:

+Previous versions of Linux defined a `flags` member in this struct.  The
+field is now aliased to `data[0]`.  Userspace can assume that it is only
+written if ndata is greater than 0.

but I don't want projects to believe it is different in any way from
`data[0]`.  In particular, `flags` should also be considered valid only
if the cap is present (unless crosvm wants ARM to be grandfathered in).

> IMO, we should put a giant disclaimer on all of this to*not*  use the
> flags field and instead only use data. I imagine we wont want to persist
> the union forever as it is quite ugly, but necessary.


>> +/* #define KVM_CAP_VM_TSC_CONTROL 214 */
> 
> This sticks out a bit. Couldn't the VM TSC control patch just use a
> different number? It seems that there will be a conflict anyway, if only to
> delete this comment.

I don't want to change cap numbers once things have landed in
kvm/next, because that's when userspace projects pick them.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ