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: <20120629.105442.297827463.d.hatayama@jp.fujitsu.com>
Date:	Fri, 29 Jun 2012 10:54:42 +0900 (JST)
From:	HATAYAMA Daisuke <d.hatayama@...fujitsu.com>
To:	zhangyanfei@...fujitsu.com
Cc:	avi@...hat.com, mtosatti@...hat.com, dzickus@...hat.com,
	luto@....edu, kvm@...r.kernel.org, joerg.roedel@....com,
	kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
	paul.gortmaker@...driver.com, ludwig.nussel@...e.de,
	ebiederm@...ssion.com, gregkh@...uxfoundation.org
Subject: Re: [PATCH v3 1/5] x86: Add helper variables and functions to hold
 VMCSINFO

From: Yanfei Zhang <zhangyanfei@...fujitsu.com>
Subject: [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO
Date: Wed, 27 Jun 2012 16:51:58 +0800

> This patch provides a set of variables to hold the VMCSINFO and also
> some helper functions to help fill the VMCSINFO.
> 
> Signed-off-by: zhangyanfei <zhangyanfei@...fujitsu.com>
> ---
>  arch/x86/include/asm/vmcsinfo.h |  219 ++++++++++++++++++++++
>  arch/x86/include/asm/vmx.h      |  158 +----------------
>  arch/x86/kernel/Makefile        |    1 +
>  arch/x86/kernel/vmcsinfo.c      |  381 +++++++++++++++++++++++++++++++++++++++
>  4 files changed, 603 insertions(+), 156 deletions(-)
>  create mode 100644 arch/x86/include/asm/vmcsinfo.h
>  create mode 100644 arch/x86/kernel/vmcsinfo.c
> 
> diff --git a/arch/x86/include/asm/vmcsinfo.h b/arch/x86/include/asm/vmcsinfo.h
> new file mode 100644
> index 0000000..4b9f56b
> --- /dev/null
> +++ b/arch/x86/include/asm/vmcsinfo.h
> @@ -0,0 +1,219 @@
> +#ifndef _ASM_X86_VMCSINFO_H
> +#define _ASM_X86_VMCSINFO_H
> +
> +#ifndef __ASSEMBLY__
> +#include <linux/types.h>
> +#include <linux/elf.h>
> +#include <linux/device.h>
> +
> +/* VMCS Encodings */
> +enum vmcs_field {
> +	VIRTUAL_PROCESSOR_ID            = 0x00000000,

<cut>

> +	HOST_RIP                        = 0x00006c16,
> +};
> +
> +/*
> + * vmcs field offsets.
> + */
> +struct vmcsinfo {
> +	u32 vmcs_revision_id;
> +	int filled;
> +	u16 vmcs_field_to_offset_table[HOST_RIP + 1];

HOST_RIP is so large that this array becomes large. Also there are
unused elements in this array because field encoding is not indexed
constantly.

Instead, how about defining the numbr of vmcs fields, 152?, as a
specific constant, indexing each fields using integers and newly
preparing index_to_field_table[]?

Thanks.
HATAYAMA, Daisuke

--
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