From 88ba9b1364a7844d0d07cdd2bec6be229d4d1a1d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:09:16 -0500 Subject: [PATCH] Import 0.99.14f --- .depend~ | 29 --------- Makefile | 13 ++-- README | 27 +++++++++ drivers/FPU-emu/fpu_entry.c | 4 ++ drivers/net/Makefile | 4 +- include/linux/ldt.h | 5 ++ include/linux/major.h | 2 +- include/linux/sched.h | 4 +- include/linux/sys.h | 8 +++ kernel/Makefile | 9 ++- kernel/exit.c | 2 +- kernel/fork.c | 6 +- kernel/ldt.c | 16 +++-- kernel/sched.c | 9 ++- kernel/signal.c | 7 ++- kernel/traps.c | 114 +++++++++--------------------------- mm/memory.c | 6 +- 17 files changed, 122 insertions(+), 143 deletions(-) delete mode 100644 .depend~ diff --git a/.depend~ b/.depend~ deleted file mode 100644 index ae28d4383dc3..000000000000 --- a/.depend~ +++ /dev/null @@ -1,29 +0,0 @@ -init/main.o : init/main.c /usr/lib/gcc-lib/i486-linux/2.5.4/include/stdarg.h /usr/include/asm/system.h \ - /usr/include/linux/segment.h /usr/include/asm/io.h /usr/include/linux/types.h \ - /usr/include/linux/fcntl.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \ - /usr/include/linux/sched.h /usr/include/linux/tasks.h /usr/include/linux/head.h \ - /usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \ - /usr/include/linux/wait.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \ - /usr/include/linux/net.h /usr/include/linux/socket.h /usr/include/linux/sockios.h \ - /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \ - /usr/include/linux/ext2_fs_i.h /usr/include/linux/hpfs_fs_i.h /usr/include/linux/msdos_fs_i.h \ - /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \ - /usr/include/linux/xia_fs_i.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \ - /usr/include/linux/ext2_fs_sb.h /usr/include/linux/hpfs_fs_sb.h /usr/include/linux/msdos_fs_sb.h \ - /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/xia_fs_sb.h \ - /usr/include/linux/mm.h /usr/include/linux/page.h /usr/include/linux/kernel.h \ - /usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \ - /usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \ - /usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/linux/unistd.h \ - /usr/include/linux/string.h /usr/include/linux/timer.h /usr/include/linux/ctype.h \ - /usr/include/linux/delay.h /usr/include/linux/utsname.h /usr/include/linux/ioport.h -tools/build.o : tools/build.c /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ - /usr/include/_G_config.h /usr/include/string.h /usr/lib/gcc-lib/i486-linux/2.5.4/include/stddef.h \ - /usr/include/stdlib.h /usr/include/errno.h /usr/include/linux/errno.h /usr/lib/gcc-lib/i486-linux/2.5.4/include/float.h \ - /usr/include/alloca.h /usr/include/sys/types.h /usr/include/linux/types.h /usr/include/sys/stat.h \ - /usr/include/linux/stat.h /usr/include/sys/sysmacros.h /usr/include/unistd.h \ - /usr/include/posix_opt.h /usr/include/gnu/types.h /usr/include/fcntl.h /usr/include/linux/fcntl.h \ - /usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/a.out.h \ - /usr/include/linux/page.h -tools/version.o : tools/version.c /usr/include/linux/config.h /usr/include/linux/autoconf.h \ - /usr/include/linux/utsname.h tools/./version.h diff --git a/Makefile b/Makefile index 767776a7bda8..020b99cd0160 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 0.99 PATCHLEVEL = 14 -ALPHA = e +ALPHA = f all: Version zImage @@ -44,16 +44,17 @@ ROOT_DEV = CURRENT # The number is the same as you would ordinarily press at bootup. # -SVGA_MODE= -DSVGA_MODE=3 - -# Special options. -#OPTS = -pro +SVGA_MODE= -DSVGA_MODE=NORMAL_VGA # # standard CFLAGS # -CFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe # -x c++ +CFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe + +ifdef CONFIG_CPP +CFLAGS := $(CFLAGS) -x c++ +endif ifdef CONFIG_M486 CFLAGS := $(CFLAGS) -m486 diff --git a/README b/README index 0929c2c22d3b..c8d352336708 100644 --- a/README +++ b/README @@ -87,6 +87,33 @@ COMPILING the kernel: - keep a backup kernel handy in case something goes wrong. + - In order to boot your new kernel, you'll need to copy the kernel + image (found in /usr/src/linux/zImage after compilation) to the place + where your regular bootable kernel is found. + + For some, this is on a floppy disk, in which case you can "cp + /usr/src/linux/zImage /dev/fd0" to make a bootable floppy. + + If you boot Linux from the hard drive, chances are you use LILO uses + the kernel image as specified in the file /etc/lilo/config. The + kernel image file is usually /vmlinux, or /Image, or /etc/Image. To + use the new kernel, copy the new image over the old one (save a + backup of the original!). Then, you MUST REINSTALL LILO!! If you + don't, you won't be able to boot the new kernel image. + + Reinstalling LILO is usually a matter of running /etc/lilo/install. + You may wish to edit /etc/lilo/config to specify an entry for your + old kernel image (say, /vmlinux.old) in case the new one does not + work. See the LILO docs for more information. + + After reinstalling LILO, you should be all set. Shutdown the system, + reboot, and enjoy! + + If you ever need to change the default root device, video mode, + ramdisk size, etc. in the kernel image, use the 'rdev' program (or + alternatively the LILO boot options when appropriate). No need to + recompile the kernel to change these parameters. + - reboot with the new kernel and enjoy. IF SOMETHING GOES WRONG: diff --git a/drivers/FPU-emu/fpu_entry.c b/drivers/FPU-emu/fpu_entry.c index d511a1fbf70e..0498a1a45472 100644 --- a/drivers/FPU-emu/fpu_entry.c +++ b/drivers/FPU-emu/fpu_entry.c @@ -282,6 +282,8 @@ do_another_FPU_instruction: } RE_ENTRANT_CHECK_OFF; + current->tss.trap_no = 16; + current->tss.error_code = 0; send_sig(SIGFPE, current, 1); return; } @@ -611,6 +613,8 @@ static int valid_prefix(unsigned char byte) void __math_abort(struct info * info, unsigned int signal) { FPU_EIP = FPU_ORIG_EIP; + current->tss.trap_no = 16; + current->tss.error_code = 0; send_sig(signal,current,1); RE_ENTRANT_CHECK_OFF; __asm__("movl %0,%%esp ; ret": :"g" (((long) info)-4)); diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 2a958fdad658..51c1c8d9e7fd 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -14,10 +14,10 @@ CPP := $(CPP) -I../../net/inet # The point of the makefile... all: net.a -Space.o: Space.c /usr/include/linux/autoconf.h +Space.o: Space.c ../../include/linux/autoconf.h $(CC) $(CFLAGS) $(OPTS) $(DL_OPTS) -c $< -o $@ -net_init.o: /usr/include/linux/autoconf.h +net_init.o: ../../include/linux/autoconf.h ifdef CONFIG_WD80x3 NETDRV_OBJS := $(NETDRV_OBJS) net.a(wd.o) diff --git a/include/linux/ldt.h b/include/linux/ldt.h index 7ab13e83c465..3deed07273b7 100644 --- a/include/linux/ldt.h +++ b/include/linux/ldt.h @@ -6,6 +6,11 @@ #ifndef _LINUX_LDT_H #define _LINUX_LDT_H +/* Maximum number of LDT entries supported. */ +#define LDT_ENTRIES 8192 +/* The size of each LDT entry. */ +#define LDT_ENTRY_SIZE 8 + struct modify_ldt_ldt_s { unsigned int entry_number; unsigned long base_addr; diff --git a/include/linux/major.h b/include/linux/major.h index a37d7a56cd46..2848f955754b 100644 --- a/include/linux/major.h +++ b/include/linux/major.h @@ -67,7 +67,7 @@ #define SCSI_GENERIC_MAJOR 21 /* unused: 22 */ #define MITSUMI_CDROM_MAJOR 23 -#define SONY535_CDROM_MAJOR 24 +#define CDU535_CDROM_MAJOR 24 /* * Tests for SCSI devices. diff --git a/include/linux/sched.h b/include/linux/sched.h index 4ea4e25f885b..df6bfd99339c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -145,7 +145,7 @@ struct tss_struct { unsigned short trace, bitmap; unsigned long io_bitmap[IO_BITMAP_SIZE+1]; unsigned long tr; - unsigned long cr2; + unsigned long cr2, trap_no, error_code; union i387_union i387; }; @@ -277,7 +277,7 @@ struct task_struct { _LDT(0),0, \ 0, 0x8000, \ /* ioperm */ {~0, }, \ - _TSS(0), 0, \ + _TSS(0), 0, 0,0, \ /* 387 state */ { { 0, }, } \ } \ } diff --git a/include/linux/sys.h b/include/linux/sys.h index 401f11c2e4e8..b0f4ff0a9bb9 100644 --- a/include/linux/sys.h +++ b/include/linux/sys.h @@ -139,6 +139,7 @@ extern int sys_create_module(); extern int sys_init_module(); extern int sys_delete_module(); extern int sys_get_kernel_syms(); /* 130 */ +extern int sys_quotactl(); /* * These are system calls that will be removed at some time @@ -156,6 +157,13 @@ extern int sys_get_kernel_syms(); /* 130 */ #define sys_ssetmask sys_old_syscall /* sig_sigprocmask */ #endif +/* + * These are system calls that haven't been implemented yet + * but have an entry in the table for future expansion.. + */ + +#define sys_quotactl sys_ni_syscall + typedef int (*fn_ptr)(); #ifdef __cplusplus diff --git a/kernel/Makefile b/kernel/Makefile index 49a191401597..c4a9adc7e60e 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -34,11 +34,14 @@ sys_call.o: sys_call.s sched.o: sched.c $(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $< -ksyms.o: ksyms.S ksyms.sh /usr/include/linux/autoconf.h +ksyms.lst: ksyms.S ../include/linux/autoconf.h $(CPP) $(CFLAGS) ksyms.S > ksyms.lst - sh ksyms.sh > ksyms.s - $(AS) -o ksyms.o ksyms.s +ksyms.s: ksyms.lst ksyms.sh + sh ksyms.sh > ksyms.s + +ksyms.o: ksyms.s + dep: $(CPP) -M *.c > .depend diff --git a/kernel/exit.c b/kernel/exit.c index 9bc7316ee46f..62e9fddab2c1 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -385,7 +385,7 @@ fake_volatile: } if (current->ldt) { - free_page((unsigned long) current->ldt); + vfree(current->ldt); current->ldt = NULL; for (i=1 ; i #include #include +#include #include #include @@ -182,8 +183,9 @@ asmlinkage int sys_fork(struct pt_regs regs) p->exit_signal = clone_flags & CSIGNAL; p->tss.ldt = _LDT(nr); if (p->ldt) { - if ((p->ldt = (struct desc_struct*) __get_free_page(GFP_KERNEL)) != NULL) - memcpy(p->ldt, current->ldt, PAGE_SIZE); + p->ldt = (struct desc_struct*) vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE); + if (p->ldt != NULL) + memcpy(p->ldt, current->ldt, LDT_ENTRIES*LDT_ENTRY_SIZE); } p->tss.bitmap = offsetof(struct tss_struct,io_bitmap); for (i = 0; i < IO_BITMAP_SIZE+1 ; i++) /* IO bitmap is actually SIZE+1 */ diff --git a/kernel/ldt.c b/kernel/ldt.c index 5d9f514a0008..f014cdc3da90 100644 --- a/kernel/ldt.c +++ b/kernel/ldt.c @@ -20,7 +20,7 @@ static int read_ldt(void * ptr, unsigned long bytecount) if (!ptr) return -EINVAL; - size = PAGE_SIZE; + size = LDT_ENTRIES*LDT_ENTRY_SIZE; if (!address) { address = &default_ldt; size = sizeof(default_ldt); @@ -49,7 +49,7 @@ static int write_ldt(void * ptr, unsigned long bytecount) memcpy_fromfs(&ldt_info, ptr, sizeof(ldt_info)); - if (ldt_info.contents == 3 || ldt_info.entry_number >= 512) + if (ldt_info.contents == 3 || ldt_info.entry_number >= LDT_ENTRIES) return -EINVAL; limit = ldt_info.limit; @@ -64,16 +64,22 @@ static int write_ldt(void * ptr, unsigned long bytecount) if (!current->ldt) { for (i=1 ; ildt = (struct desc_struct*) get_free_page(GFP_KERNEL))) + if (!(current->ldt = (struct desc_struct*) vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE))) return -ENOMEM; - set_ldt_desc(gdt+(i<<1)+FIRST_LDT_ENTRY, current->ldt, 512); + set_ldt_desc(gdt+(i<<1)+FIRST_LDT_ENTRY, current->ldt, LDT_ENTRIES); load_ldt(i); } } } lp = (unsigned long *) ¤t->ldt[ldt_info.entry_number]; - *lp = ((ldt_info.base_addr & 0x0000ffff) << 16) | + /* Allow LDTs to be cleared by the user. */ + if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { + *lp = 0; + *(lp+1) = 0; + return 0; + } + *lp = ((ldt_info.base_addr & 0x0000ffff) << 16) | (ldt_info.limit & 0x0ffff); *(lp+1) = (ldt_info.base_addr & 0xff000000) | ((ldt_info.base_addr & 0x00ff0000)>>16) | diff --git a/kernel/sched.c b/kernel/sched.c index cbf723484e47..17eca1b9c0b7 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -103,6 +103,11 @@ struct { extern "C" { #endif +int sys_ni_syscall(void) +{ + return -EINVAL; +} + fn_ptr sys_call_table[] = { sys_setup, sys_exit, sys_fork, sys_read, sys_write, sys_open, sys_close, sys_waitpid, sys_creat, sys_link, sys_unlink, sys_execve, sys_chdir, sys_time, sys_mknod, sys_chmod, @@ -126,8 +131,8 @@ sys_syslog, sys_setitimer, sys_getitimer, sys_newstat, sys_newlstat, sys_newfstat, sys_uname, sys_iopl, sys_vhangup, sys_idle, sys_vm86, sys_wait4, sys_swapoff, sys_sysinfo, sys_ipc, sys_fsync, sys_sigreturn, sys_clone, sys_setdomainname, sys_newuname, sys_modify_ldt, -sys_adjtimex, sys_mprotect, sys_sigprocmask, -sys_create_module, sys_init_module, sys_delete_module, sys_get_kernel_syms }; +sys_adjtimex, sys_mprotect, sys_sigprocmask, sys_create_module, +sys_init_module, sys_delete_module, sys_get_kernel_syms, sys_quotactl }; /* So we don't have to do any more manual updating.... */ int NR_syscalls = sizeof(sys_call_table)/sizeof(fn_ptr); diff --git a/kernel/signal.c b/kernel/signal.c index 4ed60cdcbab1..9616297fcc2a 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -268,8 +268,8 @@ static void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned lon put_fs_long(regs->edx, frame+11); put_fs_long(regs->ecx, frame+12); put_fs_long(regs->eax, frame+13); - put_fs_long(0, frame+14); /* trapno - not implemented */ - put_fs_long(0, frame+15); /* err - not implemented */ + put_fs_long(current->tss.trap_no, frame+14); + put_fs_long(current->tss.error_code, frame+15); put_fs_long(eip, frame+16); put_fs_long(regs->cs, frame+17); put_fs_long(regs->eflags, frame+18); @@ -407,6 +407,7 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs) oldmask |= sa->sa_mask; } regs->esp = (unsigned long) frame; - regs->eip = eip; /* "return" to the first handler */ + regs->eip = eip; /* "return" to the first handler */ + current->tss.trap_no = current->tss.error_code = 0; return 1; } diff --git a/kernel/traps.c b/kernel/traps.c index 420ff3178d39..03ddea5d10e0 100644 --- a/kernel/traps.c +++ b/kernel/traps.c @@ -22,6 +22,17 @@ #include #include +#define DO_ERROR(trapnr, signr, str, name, tsk) \ +asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +{ \ + tsk->tss.error_code = error_code; \ + tsk->tss.trap_no = trapnr; \ + if (signr == SIGTRAP && current->flags & PF_PTRACED) \ + current->blocked &= ~(1 << (SIGTRAP-1)); \ + send_sig(signr, tsk, 1); \ + die_if_kernel(str,regs,error_code); \ +} + #define get_seg_byte(seg,addr) ({ \ register char __res; \ __asm__("push %%fs;mov %%ax,%%fs;movb %%fs:%2,%%al;pop %%fs" \ @@ -83,37 +94,20 @@ asmlinkage void alignment_check(void); do_exit(SIGSEGV); } -asmlinkage void do_double_fault(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("double fault",regs,error_code); -} - -asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("general protection",regs,error_code); -} - -asmlinkage void do_alignment_check(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("alignment check",regs,error_code); -} - -asmlinkage void do_divide_error(struct pt_regs * regs, long error_code) -{ - send_sig(SIGFPE, current, 1); - die_if_kernel("divide error",regs,error_code); -} - -asmlinkage void do_int3(struct pt_regs * regs, long error_code) -{ - if (current->flags & PF_PTRACED) - current->blocked &= ~(1 << (SIGTRAP-1)); - send_sig(SIGTRAP, current, 1); - die_if_kernel("int3",regs,error_code); -} +DO_ERROR( 0, SIGFPE, "divide error", divide_error, current) +DO_ERROR( 3, SIGTRAP, "int3", int3, current) +DO_ERROR( 4, SIGSEGV, "overflow", overflow, current) +DO_ERROR( 5, SIGSEGV, "bounds", bounds, current) +DO_ERROR( 6, SIGILL, "invalid operand", invalid_op, current) +DO_ERROR( 7, SIGSEGV, "device not available", device_not_available, current) +DO_ERROR( 8, SIGSEGV, "double fault", double_fault, current) +DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun, last_task_used_math) +DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS, current) +DO_ERROR(11, SIGSEGV, "segment not present", segment_not_present, current) +DO_ERROR(12, SIGSEGV, "stack segment", stack_segment, current) +DO_ERROR(13, SIGSEGV, "general protection", general_protection, current) +DO_ERROR(15, SIGSEGV, "reserved", reserved, current) +DO_ERROR(17, SIGSEGV, "alignment check", alignment_check, current) asmlinkage void do_nmi(struct pt_regs * regs, long error_code) { @@ -126,6 +120,8 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code) if (current->flags & PF_PTRACED) current->blocked &= ~(1 << (SIGTRAP-1)); send_sig(SIGTRAP, current, 1); + current->tss.trap_no = 1; + current->tss.error_code = error_code; if((regs->cs & 3) == 0) { /* If this is a kernel mode trap, then reset db7 and allow us to continue */ __asm__("movl $0,%%edx\n\t" \ @@ -138,54 +134,6 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code) die_if_kernel("debug",regs,error_code); } -asmlinkage void do_overflow(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("overflow",regs,error_code); -} - -asmlinkage void do_bounds(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("bounds",regs,error_code); -} - -asmlinkage void do_invalid_op(struct pt_regs * regs, long error_code) -{ - send_sig(SIGILL, current, 1); - die_if_kernel("invalid operand",regs,error_code); -} - -asmlinkage void do_device_not_available(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("device not available",regs,error_code); -} - -asmlinkage void do_coprocessor_segment_overrun(struct pt_regs * regs, long error_code) -{ - send_sig(SIGFPE, last_task_used_math, 1); - die_if_kernel("coprocessor segment overrun",regs,error_code); -} - -asmlinkage void do_invalid_TSS(struct pt_regs * regs,long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("invalid TSS",regs,error_code); -} - -asmlinkage void do_segment_not_present(struct pt_regs * regs,long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("segment not present",regs,error_code); -} - -asmlinkage void do_stack_segment(struct pt_regs * regs,long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("stack segment",regs,error_code); -} - /* * Allow the process which triggered the interrupt to recover the error * condition. @@ -212,6 +160,8 @@ void math_error(void) } env = &last_task_used_math->tss.i387.hard; send_sig(SIGFPE, last_task_used_math, 1); + current->tss.trap_no = 16; + current->tss.error_code = 0; __asm__ __volatile__("fnsave %0":"=m" (*env)); last_task_used_math = NULL; stts(); @@ -227,12 +177,6 @@ asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code) math_error(); } -asmlinkage void do_reserved(struct pt_regs * regs, long error_code) -{ - send_sig(SIGSEGV, current, 1); - die_if_kernel("reserved (15,17-47) error",regs,error_code); -} - void trap_init(void) { int i; diff --git a/mm/memory.c b/mm/memory.c index 98ef0d855f84..8b57ac538243 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -633,6 +633,8 @@ void do_wp_page(unsigned long error_code, unsigned long address, if (!(page & PAGE_COW)) { if (user_esp && tsk == current) { current->tss.cr2 = address; + current->tss.error_code = error_code; + current->tss.trap_no = 14; send_sig(SIGSEGV, tsk, 1); return; } @@ -660,8 +662,6 @@ int verify_area(int type, void * addr, unsigned long size) return -EFAULT; if (wp_works_ok || type == VERIFY_READ || !size) return 0; - if (!size) - return 0; size--; size += start & ~PAGE_MASK; size >>= PAGE_SHIFT; @@ -879,6 +879,8 @@ void do_no_page(unsigned long error_code, unsigned long address, return; } tsk->tss.cr2 = address; + current->tss.error_code = error_code; + current->tss.trap_no = 14; send_sig(SIGSEGV,tsk,1); return; } -- 2.39.5