lkml.org 
[lkml]   [2006]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Announce: kdb v4.4 is available for kernel 2.6.16
On Sat, Apr 01, 2006 at 08:04:30PM +0300, Dan Aloni wrote:
> > Current versions are :-
> >
> > kdb-v4.4-2.6.16-common-1.bz2
> > kdb-v4.4-2.6.16-i386-1.bz2
> > kdb-v4.4-2.6.16-ia64-1.bz2
>
> Thanks for this new version, however I'm looking forward to see
> kdb maintained also for the x86_64 architecture. Currently I have
> got as far as forward-porting it to a level where it "works" except
> for one annoying issue where setjmp/longjmp looks to be broken:

Problem is due to the mixed C/asm implementation of setjmp/longjmp.
Replace that with one written entirely in assemply and it will work.
Here's mine:

/* setjmp / longjmp for the kernel.
* Inspired by the glibc version.
*/
.text
.globl __kernel_setjmp
.p2align 4
__kernel_setjmp:
movq %rbx,0x0(%rdi)
movq %rbp,0x8(%rdi)
movq %r12,0x10(%rdi)
movq %r13,0x18(%rdi)
movq %r14,0x20(%rdi)
movq %r15,0x28(%rdi)
leaq 0x8(%rsp),%rdx
movq %rdx,0x30(%rdi)
movq (%rsp),%rax
movq %rax,0x38(%rdi)
xorq %rax,%rax
ret

.globl __kernel_longjmp
__kernel_longjmp:
movq 0x0(%rdi),%rbx
movq 0x8(%rdi),%rbp
movq 0x10(%rdi),%r12
movq 0x18(%rdi),%r13
movq 0x20(%rdi),%r14
movq 0x28(%rdi),%r15
test %esi,%esi
mov $1,%eax
cmove %eax,%esi
mov %esi,%eax
movq 0x38(%rdi),%rdx
movq 0x30(%rdi),%rsp
jmpq *%rdx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-02 02:57    [W:0.064 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site