possible bug in 2.1.96 fpu emulation

Mark Wagner (markwa@citylinq.com)
Fri, 17 Apr 1998 22:56:24 -0700


In the 2.1.96 patch the file linux/arch/i386/math-emu/fpu_system.h is
changed like yay:

-#define LDT_DESCRIPTOR(s) (current->ldt[(s) >> 3])
+#define LDT_DESCRIPTOR(s) (((struct ldt_struct *)current->mm->segments)[(s) >> 3])

When I try to compile the kernel with fpu emulation support it fails
at fpu_entry.c line 193:

if ( SEG_D_SIZE(code_descriptor = LDT_DESCRIPTOR(FPU_CS)) )

with the error message "trying to do pointer arithmetic on incomplete
type" (or somesuch, I didn't note the exact error message) which
usually (always?) means there is a pointer to a struct that isn't
defined.

Upon further investigation I found that the struct ldt_struct isn't
defined anywhere in the kernel source tree and FPU_CS is of type
desc_struct.

When I change the (struct ldt_struct *) above to (struct desc_struct
*) everything compiles and seems to work okay (so far).

This might be a bug.

-- 
Mark A. Wagner                                     markwa@citylinq.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu