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: <469C7C8D.1020600@qumranet.com>
Date:	Tue, 17 Jul 2007 11:23:41 +0300
From:	Avi Kivity <avi@...ranet.com>
To:	Jeff Dike <jdike@...toit.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	KVM devel <kvm-devel@...ts.sourceforge.net>
Subject: Re: [PATCH 3/3] KVM - add hypercall nr to kvm_run

Jeff Dike wrote:
> Add the hypercall number to kvm_run and initialize it.  This might be
> considered API-changing, so I kept it separate.
>
> Signed-off-by: Jeff Dike <jdike@...ux.intel.com>
> --
>  drivers/kvm/kvm_main.c |    1 +
>  include/linux/kvm.h    |    1 +
>  2 files changed, 2 insertions(+)
>
> Index: kvm/drivers/kvm/kvm_main.c
> ===================================================================
> --- kvm.orig/drivers/kvm/kvm_main.c
> +++ kvm/drivers/kvm/kvm_main.c
> @@ -1361,6 +1361,7 @@ int kvm_hypercall(struct kvm_vcpu *vcpu,
>  	}
>  	switch (nr) {
>  	default:
> +		run->hypercall.nr = nr;
>  		run->hypercall.args[0] = a0;
>  		run->hypercall.args[1] = a1;
>  		run->hypercall.args[2] = a2;
> Index: kvm/include/linux/kvm.h
> ===================================================================
> --- kvm.orig/include/linux/kvm.h
> +++ kvm/include/linux/kvm.h
> @@ -106,6 +106,7 @@ struct kvm_run {
>  		} mmio;
>  		/* KVM_EXIT_HYPERCALL */
>  		struct {
> +			__u64 nr;
>  			__u64 args[6];
>  			__u64 ret;
>  			__u32 longmode;
>   

It isn't API changing as the API could not be (and has not been) used.  
We do need to add a padding element to the union to make sure additional 
union members don't cause its size to change.

Quite sad that we got this far with such brokenness.

-- 
error compiling committee.c: too many arguments to function

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ