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: <20070330023355.GU10459@waste.org>
Date:	Thu, 29 Mar 2007 21:33:55 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Andi Kleen <ak@...e.de>, akpm@...ux-foundation.org, bunk@...sta.de,
	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Cleanup: i386 separate hardware-defined TSS from Linux additions

On Fri, Mar 30, 2007 at 12:36:35PM +1000, Rusty Russell wrote:
> On Thu, 2007-03-29 at 13:16 +0200, Andi Kleen wrote:
> > Please clean it up properly with two structs.
> 
> Not sure about this, now I've done it.  Running it here.
> 
> If you like it, I can do x86-64 as well.
> 
> ==
> lguest defines its own TSS struct because the "struct tss_struct"
> contains linux-specific additions.  Andi asked me to split the struct
> in processor.h.
> 
> Unfortunately it makes usage a little awkward.
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> 
> diff -r 7edfac26a523 include/asm-i386/processor.h
> --- a/include/asm-i386/processor.h	Thu Mar 29 20:02:17 2007 +1000
> +++ b/include/asm-i386/processor.h	Fri Mar 30 12:22:38 2007 +1000
> @@ -325,7 +325,8 @@ typedef struct {
>  
>  struct thread_struct;
>  
> -struct tss_struct {
> +/* This is the TSS defined by the hardware. */
> +struct i386_hw_tss {
>  	unsigned short	back_link,__blh;
>  	unsigned long	esp0;
>  	unsigned short	ss0,__ss0h;
> @@ -349,6 +350,11 @@ struct tss_struct {
>  	unsigned short	gs, __gsh;
>  	unsigned short	ldt, __ldth;
>  	unsigned short	trace, io_bitmap_base;
> +} __attribute__((packed));
> +
> +struct tss_struct {
> +	struct i386_hw_tss x86_tss;
> +
>  	/*
>  	 * The extra 1 is there because the CPU will access an
>  	 * additional byte beyond the end of the IO permission

This comment needs to stay in the first struct..?

-- 
Mathematics is the supreme nostalgia of our time.
-
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