Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus-4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml

Pull UML fixes from Richard Weinberger:
"This contains four overdue UML regression fixes"

* 'for-linus-4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: Fix kernel mode fault condition
um: Fix waitpid() usage in helper code
um: Do not rely on libc to provide modify_ldt()
um: Fix out-of-tree build

+10 -7
+2 -2
arch/um/Makefile
··· 70 70 71 71 USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ 72 72 $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \ 73 - -D_FILE_OFFSET_BITS=64 -idirafter include \ 74 - -D__KERNEL__ -D__UM_HOST__ 73 + -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \ 74 + -idirafter $(obj)/include -D__KERNEL__ -D__UM_HOST__ 75 75 76 76 #This will adjust *FLAGS accordingly to the platform. 77 77 include $(ARCH_DIR)/Makefile-os-$(OS)
+1 -1
arch/um/kernel/trap.c
··· 220 220 show_regs(container_of(regs, struct pt_regs, regs)); 221 221 panic("Segfault with no mm"); 222 222 } 223 - else if (!is_user && address < TASK_SIZE) { 223 + else if (!is_user && address > PAGE_SIZE && address < TASK_SIZE) { 224 224 show_regs(container_of(regs, struct pt_regs, regs)); 225 225 panic("Kernel tried to access user memory at addr 0x%lx, ip 0x%lx", 226 226 address, ip);
+3 -3
arch/um/os-Linux/helper.c
··· 96 96 "ret = %d\n", -n); 97 97 ret = n; 98 98 } 99 - CATCH_EINTR(waitpid(pid, NULL, __WCLONE)); 99 + CATCH_EINTR(waitpid(pid, NULL, __WALL)); 100 100 } 101 101 102 102 out_free2: ··· 129 129 return err; 130 130 } 131 131 if (stack_out == NULL) { 132 - CATCH_EINTR(pid = waitpid(pid, &status, __WCLONE)); 132 + CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); 133 133 if (pid < 0) { 134 134 err = -errno; 135 135 printk(UM_KERN_ERR "run_helper_thread - wait failed, " ··· 148 148 int helper_wait(int pid) 149 149 { 150 150 int ret, status; 151 - int wflags = __WCLONE; 151 + int wflags = __WALL; 152 152 153 153 CATCH_EINTR(ret = waitpid(pid, &status, wflags)); 154 154 if (ret < 0) {
+4 -1
arch/x86/um/ldt.c
··· 12 12 #include <skas.h> 13 13 #include <sysdep/tls.h> 14 14 15 - extern int modify_ldt(int func, void *ptr, unsigned long bytecount); 15 + static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) 16 + { 17 + return syscall(__NR_modify_ldt, func, ptr, bytecount); 18 + } 16 19 17 20 static long write_ldt_entry(struct mm_id *mm_idp, int func, 18 21 struct user_desc *desc, void **addr, int done)