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>] [day] [month] [year] [list]
Date:	Tue, 18 Jul 2006 14:39:33 -0400
From:	Chuck Ebbert <76306.1226@...puserve.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	Christian Limpach <Christian.Limpach@...cam.ac.uk>,
	Chris Wright <chrisw@...s-sol.org>,
	virtualization <virtualization@...ts.osdl.org>,
	Xen-devel <xen-devel@...ts.xensource.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>, Andi Kleen <ak@...e.de>,
	Andrew Morton <akpm@...l.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Zachary Amsden <zach@...are.com>,
	Ian Pratt <Ian.Pratt@...source.com>
Subject: Re: [RFC PATCH 06/33] Add Xen interface header files

In-Reply-To: <20060718091950.075712000@...s-sol.org>

On Tue, 18 Jul 2006 00:00:06 -0700, Chris Wright wrote:
>
> Add Xen interface header files.

> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/include/xen/interface/arch-x86_32.h     Thu Jun 08 19:24:13 2006 -0400

> +#define FIRST_RESERVED_GDT_PAGE  14
> +#define FIRST_RESERVED_GDT_BYTE  (FIRST_RESERVED_GDT_PAGE * 4096)
> +#define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8)

== 7168

> +
> +/*
> + * These flat segments are in the Xen-private section of every GDT. Since these
> + * are also present in the initial GDT, many OSes will be able to avoid
> + * installing their own GDT.
> + */
> +#define FLAT_RING1_CS 0xe019    /* GDT index 259 */
> +#define FLAT_RING1_DS 0xe021    /* GDT index 260 */
> +#define FLAT_RING1_SS 0xe021    /* GDT index 260 */
> +#define FLAT_RING3_CS 0xe02b    /* GDT index 261 */
> +#define FLAT_RING3_DS 0xe033    /* GDT index 262 */
> +#define FLAT_RING3_SS 0xe033    /* GDT index 262 */

Umm, these definitions are magic hardcoded constants that really refer
to indexes 7171 through 7174.

How about this instead?

+#define FLAT_RING1_CS (((FIRST_RESERVED_GDT_ENTRY + 3) << 3) | 1)
+#define FLAT_RING1_DS (((FIRST_RESERVED_GDT_ENTRY + 4) << 3) | 1)
+#define FLAT_RING1_SS FLAT_RING1_DS
+#define FLAT_RING3_CS (((FIRST_RESERVED_GDT_ENTRY + 5) << 3) | 3)
+#define FLAT_RING3_DS (((FIRST_RESERVED_GDT_ENTRY + 6) << 3) | 3)
+#define FLAT_RING3_SS FLAT_RING3_DS

-- 
Chuck
And did we tell you the name of the game, boy, we call it Riding the Gravy Train.
-
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