[patch 1/3] writeback regset[0] in coredump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These are the patches to support regset in ia64. The patches are on top
of Petr's ptrace cleanup patches.
http://marc.info/?l=linux-ia64&m=120276611704615&w=2


Writeback regset[0] before access it to make user memory RSE is up to
date. With Petr's patch, we are using access_process_vm to access user
RSE.

Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx>
---
 fs/binfmt_elf.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Index: linux/fs/binfmt_elf.c
===================================================================
--- linux.orig/fs/binfmt_elf.c	2008-02-25 15:19:18.000000000 +0800
+++ linux/fs/binfmt_elf.c	2008-02-25 15:20:23.000000000 +0800
@@ -1431,6 +1431,14 @@ static int fill_thread_core_info(struct 
 	unsigned int i;
 
 	/*
+	 * If regset 0 has a writeback call, do it now. On register window
+	 * machines, this makes sure the user memory backing the register data
+	 * is up to date
+	 */
+	if (view->regsets[0].writeback)
+		view->regsets[0].writeback(t->task, &view->regsets[0], 1);
+
+	/*
 	 * NT_PRSTATUS is the one special case, because the regset data
 	 * goes into the pr_reg field inside the note contents, rather
 	 * than being the whole note contents.  We fill the reset in here.


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux