Laurent Wandrebeck wrote:
> 2008/6/16 Laurent Wandrebeck <[EMAIL PROTECTED]>:
>> Hi Benedict, all,
>>
>> I've solved the problem, and rebased on a newer linus tree (a bit
>> after rc6). git clone
>> git://gitorious.org/low-unofficial-linux-uml-hacking-tree/mainline.git
>> I've deleted the previous repo which was becoming messy. Hope that one
>> will last longer.
>> Compile tested (on i386), and started (no time to do much testing up to now).
>> Let me know how it goes.
>> Regards,
>> Laurent.
> You can also get the patch here:
> http://dl.kodros.fr/skas4_patch_7775c9753b94fe429dc4323360d6502c95e0dd6e_to_5c625f340a7acb7ef73a0d36c68ccec82dec75f6.diff
> Laurent.
Laurent,
i downloaded patch 2.6.26-rc6 and applied it to the patch baseline as
specified on the kernel site. This works but when i applied the skas 4
patch, 2 hunks failed to apply:
...
Hunk #7 succeeded at 497 (offset -7 lines).
patching file arch/um/os-Linux/sys-i386/registers.c
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 79.
2 out of 3 hunks FAILED -- saving rejects to file
arch/um/os-Linux/sys-i386/registers.c.rej
De rejects file contents:
***************
*** 4,15 ****
* Licensed under the GPL
*/
#include <errno.h>
#include <sys/ptrace.h>
- #include <sys/user.h>
#include "kern_constants.h"
#include "longjmp.h"
#include "user.h"
#include "sysdep/ptrace_user.h"
int save_fp_registers(int pid, unsigned long *fp_regs)
--- 4,20 ----
* Licensed under the GPL
*/
+ #include <stdio.h>
+ #include <stdlib.h>
#include <errno.h>
+ #include <asm/ldt.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
#include <sys/ptrace.h>
#include "kern_constants.h"
#include "longjmp.h"
#include "user.h"
+ #include "skas.h"
#include "sysdep/ptrace_user.h"
int save_fp_registers(int pid, unsigned long *fp_regs)
*************** int put_fp_registers(int pid, unsigned long *regs)
*** 74,85 ****
return restore_fp_registers(pid, regs);
}
void arch_init_registers(int pid)
{
- struct user_fpxregs_struct fpx_regs;
- int err;
- err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs);
if (!err)
return;
--- 79,110 ----
return restore_fp_registers(pid, regs);
}
+ extern int host_gdt_entry_tls_min;
+
+ #define GDT_ENTRY_TLS_ENTRIES 3
+ #define GDT_ENTRY_TLS_MIN 6
+ #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
+
+ struct user_desc tls[GDT_ENTRY_TLS_ENTRIES];
+
+ unsigned long fp_regs[FP_SIZE];
+
void arch_init_registers(int pid)
{
+ struct user_desc *entry;
+ int err, i;
+ for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++) {
+ entry = &tls[i];
+ entry->entry_number = i + GDT_ENTRY_TLS_MIN;
+ err = get_thread_area(entry);
+ if (err) {
+ perror("get_thread_area");
+ exit(1);
+ }
+ }
+
+ err = ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs);
if (!err)
return;
Regards,
Benedict
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user