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: <f26efdc0-84ec-6aeb-d488-06b580d59325@oracle.com>
Date:   Wed, 14 Jun 2017 13:43:45 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Cc:     gregkh@...uxfoundation.org
Subject: Re: [PATCH v4 2/4] xen: add sysfs node for guest type


> --- a/Documentation/ABI/testing/sysfs-hypervisor-pmu
> +++ b/Documentation/ABI/testing/sysfs-hypervisor-xen
> @@ -1,8 +1,19 @@
> +What:		/sys/hypervisor/guest_type
> +Date:		May 2017
> +KernelVersion:	4.13
> +Contact:	xen-devel@...ts.xenproject.org
> +Description:	If running under Xen:
> +		Type of guest:
> +		"Xen": standard guest type on arm
> +		"HVM": fully virtualized guest (x86)
> +		"PV": paravirtualized guest (x86)
> +		"PVH": fully virtualized guest without legacy emulation (x86)
> +
>  



>  
> +static ssize_t guest_type_show(struct hyp_sysfs_attr *attr, char *buffer)
> +{
> +	const char *type = "???";
> +
> +	switch (xen_domain_type) {
> +	case XEN_NATIVE:
> +		/* ARM only. */
> +		type = "Xen";
> +		break;
> +	case XEN_PV_DOMAIN:
> +		type = "PV";
> +		break;
> +	case XEN_HVM_DOMAIN:
> +		type = xen_pvh_domain() ? "PVH" : "HVM";
> +		break;
> +	}

I think we should return -EINVAL for unknown type. Or document "???" in
the ABI document.


-boris

> +	return sprintf(buffer, "%s\n", type);
> +}
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ