Skip to contentSkip to conversation

new single copy pipe version

PATCH New Manfred Spraul 1 participant 1 message Sep 28, 2001

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 new single copy pipe version

I found 2 bugs in my previous single copy pipe version:

* Could deadlock on the mmap_semaphore with multithreaded apps.
* It doesn't follow the atomicity requirements with blocking transfers if a signal arrives. SuS isn't 100% clear, but FreeBSD and Tru64 guarantee it.

I've uploaded the new patches to
http://www.colorfullife.com/~manfred/linux-2.5/kiopipe/

* patch-pgw: enum_user_pages - helper function for getting 'struct page*' from virtual addresses, and use it for access_process_vm and map_user_kiobuf.
net 62 lines removed ;-)
* patch-kiopipe: actual single copy pipe, not tuned. based on patch-pgw.
* patch-expand: unrelated.

Unfortunately kiopipe is visible to broken user space aps. (run test5.cpp - it stalls with kiopipe, but finishes on all other Unix versions I tested)

patch-pgw is attached - it simplifies access_process_vm and map_user_kiobuf.
I'd apreciate any comments.

--
Manfred

// $Header$
// Kernel Version:

//  VERSION = 2
//  PATCHLEVEL = 4
//  SUBLEVEL = 10
//  EXTRAVERSION =
include/linux/mm.h +3 -0
@@ -431,6 +431,9 @@
 extern int ptrace_detach(struct task_struct *, unsigned int);
 extern void ptrace_disable(struct task_struct *);
 
+int enum_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
+		unsigned int len, int write, struct page **pages, struct vm_area_struct **vmas);
+
 /*
  * On a two-level page table, this ends up being trivial. Thus the
  * inlining and the symmetry break with pte_alloc() that does all
mm/memory.c +98 -87

244 lines not on this page · raw message

kernel/ptrace.c +37 -113

170 lines not on this page · raw message