Sponsored Content
Full Discussion: Execute code in kernel mode.
Top Forums Programming Execute code in kernel mode. Post 302505343 by lilezek on Wednesday 16th of March 2011 06:06:52 PM
Old 03-16-2011
I'm compiling c++ with extern "C" (without it doesn't work). I'm compiling exactly the same code that works on 64 bits. I'm only changing -m32 -march-i386 for compiler and -m32 for linker.

Code:
$ ldd /usr/games/quake4/quake4.x86
    linux-gate.so.1 =>  (0xf774b000)
    /usr/lib32/openglhack32.so (0xf7746000) <-------- LOOK AT THIS IS IMPLEMENTED VIA LD_PRELOAD
    libSDL-1.2.so.0 => /usr/lib32/libSDL-1.2.so.0 (0xf7690000)
    libpthread.so.0 => /lib32/libpthread.so.0 (0xf7676000)
    libdl.so.2 => /lib32/libdl.so.2 (0xf7672000)
    libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7555000)
    libXext.so.6 => /usr/lib32/libXext.so.6 (0xf7545000)
    libz.so.1 => /usr/lib32/libz.so.1 (0xf7530000)
    libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7445000)
    libm.so.6 => /lib32/libm.so.6 (0xf741e000)
    libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7402000)
    libc.so.6 => /lib32/libc.so.6 (0xf72a7000)
    libGL.so.1 => /usr/lib32/nvidia-current/libGL.so.1 (0xf71de000)
    libasound.so.2 => /usr/lib32/libasound.so.2 (0xf7118000)
    librt.so.1 => /lib32/librt.so.1 (0xf710e000)
    /lib/ld-linux.so.2 (0xf774c000)
    libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf70f4000)
    libnvidia-tls.so.260.19.06 => /usr/lib32/nvidia-current/tls/libnvidia-tls.so.260.19.06 (0xf70f2000)
    libnvidia-glcore.so.260.19.06 => /usr/lib32/nvidia-current/libnvidia-glcore.so.260.19.06 (0xf5a55000)
    libXau.so.6 => /usr/lib32/libXau.so.6 (0xf5a51000)
    libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf5a4a000)

I noticed that the library appears on the list because I used LD_PRELOAD. But it still seem not to work, I guess because the code is not correct or something similar, because the speedhack works.

Yes, the 100% of programs (I've tested) are 64 bit working and 32 bit failing.

Thank you for your interest again.
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

k_trap - kernel mode trap type 0x0000000E

HELP is urgently required, I run on SCO Unix 3 and this is the panic message that I get every time that I reboot 10U k_trap - kernel mode trap type 0x0000000E I have checked the swap already having the following results: #swap -l path dev swaplo blocks free... (3 Replies)
Discussion started by: alex_slb
3 Replies

2. SCO

unexpected trap in kernel mode

hi, I am trying to install sco openserver 5.0.4 on an old system. However, l was not able to proceed after putting the bootstr l have this panic message of PANIC: K_trap - kernel mode trap tupe 0x00000006 will someone kindly help to decode this error kayode (1 Reply)
Discussion started by: kayode
1 Replies

3. Linux

Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU

ok so I just installed fedora core 6 on my dell inspiron 700m and I go to boot into linux and I get this error. Has anyone seen this before? I also had XP Pro and Vista installed on this pc prior to putting fedora core 6 on the machine. I'm trying to setup a triple boot system. Please Help... (2 Replies)
Discussion started by: dave043
2 Replies

4. Programming

Aplication user and kernel mode (data access)

Hi all, I am trying to setup a program to use a device driver and am confusing buffer access between User and Kernel mode. I think all applications running in User space have to communicate with the device drivers using io control calls and then have some functions called back from the driver... (1 Reply)
Discussion started by: Brendan Kennedy
1 Replies

5. UNIX for Dummies Questions & Answers

Kernel Mode

Hi all i have queastion. Can anybody pease help me what is user mode and kernel mode and the term "De-mountable volumes" means? Thanks Palash (2 Replies)
Discussion started by: palash2k
2 Replies

6. SCO

PANIC: k_trap - Kernel mode trap type 0x0000000E

Hi, i'm another question: I'm a directory /usr/data on my server sco unix 5.0.5: # du /usr/data 4386948 /usr/data I'm tried to connect to ftp directory /usr/data to this server and: PANIC: k_trap - Kernel mode trap type 0x0000000E Cannot dump 262040 pages to dumpdev hd(1/41):space... (3 Replies)
Discussion started by: sebpes
3 Replies

7. Programming

which function copies data from user to kernel mode

when transitionaning from user to kernel mode which function copies data from user mode buffer to kernel mode? (5 Replies)
Discussion started by: rupeshkp728
5 Replies

8. Programming

HELP!!: CPU resource allocation between kernel modules and user mode process

Hi,all: I run my program which consists of one kernel module and one user mode process on a dual core server. The problem here is the kernel module consumes 100% of one core while the user mode process only consumes 10% of the other core, is there any solution that I can assign some computing... (1 Reply)
Discussion started by: neyshule
1 Replies

9. UNIX for Advanced & Expert Users

Precaution to access user mode buffers from kernel

When accessing a user mode buffers from kernel space drivers what precautions must we take and how those precautions need to be implemented? (0 Replies)
Discussion started by: rupeshkp728
0 Replies
COMPAT_30(8)						    BSD System Manager's Manual 					      COMPAT_30(8)

NAME
compat_30 -- setup procedure for backward compatibility on post-3.0 releases SYNOPSIS
options COMPAT_30 DESCRIPTION
The compat_30 module allows NetBSD to run NetBSD 3.0 executables. The support is present if the kernel was built with option COMPAT_30. It is not available as a loadable module. Static executables typically need no additional setup. Dynamic binaries may require shared libraries whose major version number changed since NetBSD 3.0, which are listed below. A shadow directory under /emul is not used; the libraries can be obtained from a NetBSD 3.0 dis- tribution and installed in the original directories shown, as the major version number in the file name will prevent conflicts. If an upgrade installation from NetBSD 3.0 has been done and these libraries are still present, nothing more need be done. Libraries needed from 3.0 /lib/libcrypto.so.2.1 /lib/libcrypto.so.2 /usr/lib/libcrypto.so.2.1 /usr/lib/libcrypto.so.2 /lib/libevent.so.0.2 /lib/libevent.so.0 /usr/lib/libevent.so.0.2 /usr/lib/libevent.so.0 /usr/lib/libg2c.so.2.0 /usr/lib/libg2c.so.2 /usr/lib/libkadm.so.5.0 /usr/lib/libkadm.so.5 /usr/lib/libkafs.so.6.0 /usr/lib/libkafs.so.6 /usr/lib/libkdb.so.5.0 /usr/lib/libkdb.so.5 /usr/lib/libkrb5.so.19.1 /usr/lib/libkrb5.so.19 /usr/lib/libkrb.so.6.0 /usr/lib/libkrb.so.6 /usr/lib/libkstream.so.2.0 /usr/lib/libkstream.so.2 /usr/lib/libmagic.so.0.1 /usr/lib/libmagic.so.0 /usr/lib/libpcap.so.1.4 /usr/lib/libpcap.so.1 /lib/libradius.so.0.0 /lib/libradius.so.0 /usr/lib/libradius.so.0.0 /usr/lib/libradius.so.0 /usr/lib/libssh.so.1.0 /usr/lib/libssh.so.1 /usr/lib/libssl.so.3.0 /usr/lib/libssl.so.3 /usr/lib/libstdc++.so.5.0 /usr/lib/libstdc++.so.5 /lib/libz.so.0.4 /lib/libz.so.0 /usr/lib/libz.so.0.4 /usr/lib/libz.so.0 /usr/lib/libamu.so.2.1 /usr/lib/libamu.so.2 IMPLEMENTATION NOTES
COMPAT_30 enables the NetBSD 3.0 versions of the following system calls, whose syscall numbers and argument structures were changed after the 3.0 release to accommodate 64-bit filesystems: fhstat(2), fstat(2), getdents(2), lstat(2), stat(2). The filehandle structure (formerly fhandle_t) was made opaque to userland and variable-sized. A fh_size argument was added to related syscalls: fhstat(2), fhstatvfs(2), fhstatvfs1(2), fhopen(2), getfh(2). This changes the API and ABI of those syscalls, COMPAT_30 enables binary compatibility with the old ABI. Source compatibility is not provided, as use of those syscalls is supposed to be rare. The error code from the socket(2) syscall changed from EPROTONOSUPPORT to EAFNOSUPPORT in the case of an unsupported address family. COMPAT_30 enables binary compatibility with the old ABI. Source compatiblility is not provided. The struct ntptimeval used by ntp_gettime(2) changed with the implementation of timecounters. SEE ALSO
config(1), fhstat(2), fstat(2), getdents(2), lstat(2), stat(2), options(4) HISTORY
NetBSD offers back-compatibility options back to NetBSD 0.9, but the first to be documented with a manual page is compat_30. BUGS
The compatible getdents(2) is unable to see directory entries beneath the top layer of a union, even though the real 3.0 getdents() did not have that problem. SECURITY CONSIDERATIONS
Programs with security impact that receive incorrect directory contents from getdents() may behave improperly, as when they are unable to find, or find the wrong versions of, important files. BSD
December 15, 2007 BSD
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy