PDB: convert ptrace.c and traps.c changes to local patches

This commit is contained in:
ach61@arcadians.cl.cam.ac.uk committed 2005-08-01 10:43:16 +00:00
1 parent b640da2bc5
commit df47943bc5
8 files changed
+81 -8

No files matched your search

+4 -1
View File
@@ -33,7 +33,7 @@ LIBDIRS += ../libxendebug
LIBS += unix str
# bc = byte-code, dc = debug byte-code
all : dc
all : patches dc
SOURCES += pdb_caml_xc.c
SOURCES += pdb_caml_domain.c pdb_caml_process.c
@@ -50,3 +50,6 @@ RESULT = pdb
include $(OCAMLMAKEFILE)
PATCHDIR = ./linux-2.6-patches
patches :
make -C $(PATCHDIR) patches
+2 -7
View File
@@ -278,14 +278,10 @@ pdb_initialize (void)
return err;
}
extern struct notifier_block *i386die_chain;
extern spinlock_t die_notifier_lock;
static void __exit
pdb_terminate(void)
{
int err = 0;
unsigned long flags;
printk("pdb cleanup\n");
@@ -305,9 +301,8 @@ pdb_terminate(void)
pdb_send_connection_status(PDB_CONNECTION_STATUS_DOWN, 0);
spin_lock_irqsave(&die_notifier_lock, flags);
err = notifier_chain_unregister(&i386die_chain, &pdb_exceptions_nb);
spin_unlock_irqrestore(&die_notifier_lock, flags);
/* handler for int1 & int3 */
err = unregister_die_notifier(&pdb_exceptions_nb);
return;
}
@@ -0,0 +1,10 @@
XEN_ROOT = ../../../..
LINUX_DIR = linux-2.6.12-xenU
KDIR = $(XEN_ROOT)/$(LINUX_DIR)
PATCH_DIR = $(CURDIR)
patches : patches-done
patches-done :
( for i in *.patch ; do ( cd $(KDIR) ; patch -p1 < $(PATCH_DIR)/$$i || exit 1 ) ; done )
touch $@
@@ -0,0 +1,11 @@
diff -u linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c
--- linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c 2005-07-31 22:36:50.000000000 +0100
+++ linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c 2005-08-01 10:57:31.000000000 +0100
@@ -172,6 +172,7 @@
EXPORT_SYMBOL_GPL(unset_nmi_callback);
EXPORT_SYMBOL(register_die_notifier);
+EXPORT_SYMBOL(unregister_die_notifier);
#ifdef CONFIG_HAVE_DEC_LOCK
EXPORT_SYMBOL(_atomic_dec_and_lock);
#endif
@@ -0,0 +1,11 @@
diff -u linux-2.6.12/include/asm-i386/kdebug.h linux-2.6.12-pdb/include/asm-i386/kdebug.h
--- linux-2.6.12/include/asm-i386/kdebug.h 2005-06-17 20:48:29.000000000 +0100
+++ linux-2.6.12-pdb/include/asm-i386/kdebug.h 2005-08-01 11:11:53.000000000 +0100
@@ -21,6 +21,7 @@
If you really want to do it first unregister - then synchronize_kernel - then free.
*/
int register_die_notifier(struct notifier_block *nb);
+int unregister_die_notifier(struct notifier_block *nb);
extern struct notifier_block *i386die_chain;
@@ -0,0 +1,12 @@
diff -Naur linux-2.6.12/Makefile linux-2.6.12-pdb/Makefile
--- linux-2.6.12/Makefile 2005-08-01 01:21:21.000000000 +0100
+++ linux-2.6.12-pdb/Makefile 2005-08-01 10:28:10.000000000 +0100
@@ -508,7 +508,7 @@
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
CFLAGS += -Os
else
-CFLAGS += -O2
+CFLAGS += -O
endif
#Add align options if CONFIG_CC_* is not equal to 0
@@ -0,0 +1,11 @@
diff -u linux-2.6.12/kernel/ptrace.c linux-2.6.12-pdb/kernel/ptrace.c
--- linux-2.6.12/kernel/ptrace.c 2005-06-17 20:48:29.000000000 +0100
+++ linux-2.6.12-pdb/kernel/ptrace.c 2005-07-22 13:23:16.000000000 +0100
@@ -239,6 +239,7 @@
return buf - old_buf;
}
+EXPORT_SYMBOL(access_process_vm);
int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
{
@@ -0,0 +1,20 @@
diff -u linux-2.6.12/arch/xen/i386/kernel/traps.c linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c
--- linux-2.6.12/arch/xen/i386/kernel/traps.c 2005-07-31 22:47:00.000000000 +0100
+++ linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c 2005-07-31 22:47:32.000000000 +0100
@@ -102,6 +102,16 @@
return err;
}
+int unregister_die_notifier(struct notifier_block *nb)
+{
+ int err = 0;
+ unsigned long flags;
+ spin_lock_irqsave(&die_notifier_lock, flags);
+ err = notifier_chain_unregister(&i386die_chain, nb);
+ spin_unlock_irqrestore(&die_notifier_lock, flags);
+ return err;
+}
+
static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
{
return p > (void *)tinfo &&
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.