[PATCH] struct thread_struct, asm-i386/processor.h: wrong datatype?

From: Herbert Rosmanith
Date: Sat Jun 04 2005 - 10:44:18 EST



good day,

concerning this file:

/usr/src/linux/include/asm-i386/processor.h

we find a "struct thread_struct":

struct thread_struct {
unsigned long esp0;
unsigned long eip;
unsigned long esp;
unsigned long fs;
^^^^^^^^^^^^^^^^^^^
unsigned long gs;
^^^^^^^^^^^^^^^^^^^

as segment-registers, aren't fs and gs only 16 bit? why are they not
unsigned short (or possibly u_int16_t)?

kind regards,
herbert rosmanith

# diff -uN processor.h.orig processor.h
--- processor.h.orig Wed Feb 18 14:36:32 2004
+++ processor.h Sat Jun 4 17:41:58 2005
@@ -2,6 +2,9 @@
* include/asm-i386/processor.h
*
* Copyright (C) 1994 Linus Torvalds
+ *
+ * Sat Jun 4 17:41:23 MET DST 2005 herp - Herbert Rosmanith
+ * fix wrong datatypes in struct thread_struct
*/

#ifndef __ASM_I386_PROCESSOR_H
@@ -361,8 +364,8 @@
unsigned long esp0;
unsigned long eip;
unsigned long esp;
- unsigned long fs;
- unsigned long gs;
+ unsigned short fs;
+ unsigned short gs;
/* Hardware debugging registers */
unsigned long debugreg[8]; /* %%db0-7 debug registers */
/* fault info */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/