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]
Date:	Tue, 10 Sep 2013 13:59:39 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Gleb Natapov <gleb@...hat.com>
CC:	Chris Metcalf <cmetcalf@...era.com>, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, Jan Kiszka <jan.kiszka@...mens.com>
Subject: Re: [PATCH v3 1/3] tile: support KVM host mode

Il 10/09/2013 12:53, Gleb Natapov ha scritto:
>> > +#ifndef __KERNEL__
>> > +/* For hv_*() */
>> > +#define KVM_EMULATE(name) [HV_SYS_##name] = qemu_emulate_illegal,
>> > +#define USER_EMULATE(name) [HV_SYS_##name] = qemu_emulate_hv_##name,
>> > +#define NO_EMULATE(name) [HV_SYS_##name] = qemu_emulate_illegal,
>> > +#define BOTH_EMULATE(name) [HV_SYS_##name] = qemu_emulate_hv_##name,
>> > +/* For others */
>> > +#define USER_HCALL(name) [KVM_HCALL_##name] = qemu_handle_##name,
> This does not belong to a kernel header. QEMU is not the only user of KVM
> kernel APIs. Please drop that and change all the references in comment
> from "qemu" to "userspace". If you add code that workarounds QEMU bugs it
> is appropriate to mention QEMU by name, otherwise interface to userspace
> should not be QEMU specific.
> 

In general, I believe that HCALL_DEFS should not be part of the public
interface.

Otherwise, adding a new hypercall would break compilation of userspace.
 Hypercalls (after the first commit) should always be associated to a
capability, so they shouldn't be generated unless userspace explicitly
requests them.

Rather, document the hypercalls under Documentation/virtual/kvm, noting
which are implemented in the kernel and which need to be handled in
userspace.

BTW, BOTH_EMULATE and USER_HCALL seem unused.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists