diff options
| author | Andi Kleen <ak@muc.de> | 2003-01-04 19:27:30 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-04 19:27:30 -0800 |
| commit | 717db2f9f36805d85c695771ea7d712812896aa7 (patch) | |
| tree | aedd3b58d4b2eefc0fd4191a2190f49a0fb40ef4 /include | |
| parent | 4c55cc628bf2eaa15a8d5814974ad61e71d7e30c (diff) | |
[PATCH] x86-64 updates for 2.5.54
More x86-64 updates for 2.5.54. Most noticeable change is that the
64bit X server works again.
This only changes x86-64 specific files. It requires some AGP driver
changes I'm sending separately.
- Some Makefile cleanups from Sam Ravnborg
- Make sure extended registers in 32bit processes are zeroed and not
accessible/changeable from ptrace. This is to avoid potential
security bugs with non 64bit clean 32bit emulation functions (they
often are overflow prone etc.)
- Some 32bit emulation cleanups from Stephen Rothwell
- Make copy_*_user source const to fix warnings.
- Set fs/gs to dummy values when the 64bit segment base is set to not
confuse the context switch (Karsten Keil, me)
* still one mysterious bug in this area unfortunately.
- Make MAP_32BIT for 64bit processes only map in the first 31bit,
because it is usually used to map small model code. This fixes the X
server crashes. Some cleanups in this area.
- Don't set O_LARGEFILE for 32bit open
- Handle ptregs calls from 32bit syscall correctly.
- Implement aio io_getevents for 32bit.
- Remove buggy unused command handler in nfsd 32bit emulation.
- Convert timespec in semtimedop (thanks to Anton for telling me about
this)
- Ignore long mode flag from 32bit modify_ldt. This fixes Wine, which
left it uninitialized (bug found by Karsten Keil)
- Merge with i386
- Handle new kallsyms
- Remove some superfluous bootup printks
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86_64/compat.h | 8 | ||||
| -rw-r--r-- | include/asm-x86_64/ia32.h | 13 | ||||
| -rw-r--r-- | include/asm-x86_64/segment.h | 3 | ||||
| -rw-r--r-- | include/asm-x86_64/smp.h | 5 | ||||
| -rw-r--r-- | include/asm-x86_64/uaccess.h | 4 |
5 files changed, 16 insertions, 17 deletions
diff --git a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h index 47e4aa499cc2..8dc4e41d0e5d 100644 --- a/include/asm-x86_64/compat.h +++ b/include/asm-x86_64/compat.h @@ -10,16 +10,22 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; typedef s32 compat_time_t; -typedef s32 compat_suseconds_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 compat_uid_t; typedef u16 compat_gid_t; +typedef u32 compat_uid32_t; +typedef u32 compat_gid32_t; typedef u16 compat_mode_t; typedef u32 compat_ino_t; typedef u16 compat_dev_t; typedef s32 compat_off_t; +typedef s64 compat_loff_t; typedef u16 compat_nlink_t; +typedef u16 compat_ipc_pid_t; +typedef s32 compat_daddr_t; +typedef u32 compat_caddr_t; +typedef __kernel_fsid_t compat_fsid_t; struct compat_timespec { compat_time_t tv_sec; diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h index 23d4d607a398..5bb05b4dfda7 100644 --- a/include/asm-x86_64/ia32.h +++ b/include/asm-x86_64/ia32.h @@ -11,17 +11,6 @@ * 32 bit structures for IA32 support. */ -/* 32bit compatibility types */ -typedef unsigned short __kernel_ipc_pid_t32; -typedef unsigned __kernel_uid32_t32; -typedef unsigned __kernel_gid32_t32; -typedef unsigned short __kernel_umode_t32; -typedef int __kernel_daddr_t32; -typedef unsigned int __kernel_caddr_t32; -typedef long __kernel_loff_t32; -typedef __kernel_fsid_t __kernel_fsid_t32; - - /* fcntl.h */ struct flock32 { short l_type; @@ -130,7 +119,7 @@ struct statfs32 { int f_bavail; int f_files; int f_ffree; - __kernel_fsid_t32 f_fsid; + compat_fsid_t f_fsid; int f_namelen; /* SunOS ignores this field. */ int f_spare[6]; }; diff --git a/include/asm-x86_64/segment.h b/include/asm-x86_64/segment.h index 70cb7cf0808e..64f131070585 100644 --- a/include/asm-x86_64/segment.h +++ b/include/asm-x86_64/segment.h @@ -6,6 +6,8 @@ #define __KERNEL32_CS 0x38 +#define __USER_LONGBASE ((GDT_ENTRY_LONGBASE * 8) | 3) + /* * we cannot use the same code segment descriptor for user and kernel * even not in the long flat model, because of different DPL /kkeil @@ -23,6 +25,7 @@ #define GDT_ENTRY_LDT 10 #define GDT_ENTRY_TLS_MIN 11 #define GDT_ENTRY_TLS_MAX 13 +#define GDT_ENTRY_LONGBASE 14 #define GDT_ENTRY_TLS_ENTRIES 3 diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 3af6dbea3d1c..b6a8eb92d2b1 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h @@ -83,16 +83,17 @@ extern inline int find_first_cpu(void) return ffz(~cpu_online_map); } +/* RED-PEN different from i386 */ #define for_each_cpu(i) \ for((i) = find_first_cpu(); (i)>=0; (i)=find_next_cpu(i)) -extern volatile unsigned long cpu_callout_map; -/* We don't mark CPUs online until __cpu_up(), so we need another measure */ static inline int num_booting_cpus(void) { return hweight32(cpu_callout_map); } +extern volatile unsigned long cpu_callout_map; + /* * Some lowlevel functions might want to know about * the real APIC ID <-> CPU # mapping. diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index 065eb4c8dafb..47e78d59e27b 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h @@ -240,7 +240,7 @@ extern unsigned long copy_user_generic(void *to, const void *from, unsigned len) extern unsigned long copy_to_user(void *to, const void *from, unsigned len); extern unsigned long copy_from_user(void *to, const void *from, unsigned len); -static inline int __copy_from_user(void *dst, void *src, unsigned size) +static inline int __copy_from_user(void *dst, const void *src, unsigned size) { if (!__builtin_constant_p(size)) return copy_user_generic(dst,src,size); @@ -269,7 +269,7 @@ static inline int __copy_from_user(void *dst, void *src, unsigned size) } } -static inline int __copy_to_user(void *dst, void *src, unsigned size) +static inline int __copy_to_user(void *dst, const void *src, unsigned size) { if (!__builtin_constant_p(size)) return copy_user_generic(dst,src,size); |
