stack on SPARC

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

 



Hi,

I'm porting a kernel-level process migration tool from i386 to SPARC. I work on sun4m running 2.2.19.

At the moment I'm trying to execute a migrated process on the remote node. During a trap on the home node, I have task_struct, mm_areas and all pages copied to the remote node. Then, I set %sp to (void*)current + TASK_UNION_SIZE - TRACEREG_SZ - REGWIN_SZ, copy pt_regs (from the home node) to to %sp + TRACEREG_SZ, and jump to ret_trap_entry, thus returning (on the remote node) from the trap (that was started on the home node). After this point, execution should continue on the remote.

To my regret, this method causes a SIGSEGV. I'm trying to track it down using kgdb, but still with no success.

How can I return from trap and execute the user code?

Should I restore some windows, or setup stack in some special manner (e.g., modify values in windows > CWP)? C routines called from ret_trap_entry (do_bottom_half, schedule) seem to spoil my new %sp value, setting it to %fp of the same stack frame.

_Any_ help would be greatly appreciated.

With kind regards,
Baurjan.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux