lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 8 Aug 2007 19:07:24 +0500
From:	"Fawad Lateef" <fawadlateef@...il.com>
To:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	kernelnewbies <kernelnewbies@...linux.org>
Subject: Porting setjmp/longjmp to mips64 kernel issue

Hello,

I am trying to implement/port the functionality of "setjmp" and
"longjmp" provided by glibc in a kernel module for mips64 based
embedded system; running debian with modified smp kernel 2.6.16 on
2-cores.

I removed all the floating-point registers save and restore
functionality from setjmp/longjmp functions as they are not
used/accessable from kernel.

Now the issue is:

Kernel hangs at instruction "j $31" in __longjmp function whenever I
try to do longjmp; the value loaded in registers (in longjmp function
especially PC in $31) are the same as I got in setjmp so it should
jump to correct location but I think its jmping to some other place
and simply stuck there.

The prints from my module before the kernel hangs is:

# insmod jmptest.ko
JMP test module loaded. Starting tests...
1:
pj_setjmp: 14 ....
calling first
calling second
pj_longjmp: 21 ....
__longjmp: 64 .... pc = [c00000000009d11c]

Can someone tell me if there is something wrong in my
porting/implementation __or__ give some hints ? I am attaching the
code in tar.gz (I am doing cross-compilation with embedded tool chain
so please adjust paths in Makefile when compiling)

Thanks in Advance.

-- 
Fawad Lateef

Download attachment "setjmp_mips64_kern.tar.gz" of type "application/x-gzip" (4135 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ