Execute code in kernel mode.


 
Thread Tools Search this Thread
Top Forums Programming Execute code in kernel mode.
# 22  
Old 03-16-2011
Try export LD_PRELOAD="/usr/lib/speedhack.so"

Giving it the absolute path means you might even be able to keep it in /usr/local/lib/, not cluttered in with your actual system libraries.

---------- Post updated at 03:01 PM ---------- Previous update was at 02:48 PM ----------

Another thing just occurred to me. This is a 64-bit OS, right? Are some of these programs 32-bit? You'll need to compile a 32-bit speedhack.so for them (CFLAGS=-m32 in makefile) since you can't mix and match 32 and 64 bit libraries. Linux's message when this kind of conflict happens, "file not found", is singularly uninformative and took me a long time to get my head around.
This User Gave Thanks to Corona688 For This Post:
# 23  
Old 03-16-2011
I did:

Code:
$ ls /usr/lib/*hack*so
/usr/lib/openglhack32.so  /usr/lib/openglhack.so  /usr/lib/speedhack.so
$ export LD_PRELOAD=/usr/lib/openglhack32.so
$ quake4
ERROR: ld.so: object '/usr/lib/openglhack32.so' from LD_PRELOAD cannot be preloaded: ignored.0
...

# 24  
Old 03-16-2011
I think you tried to preload the wrong library there... Anyway:
Quote:
Originally Posted by Corona688
Another thing just occurred to me. This is a 64-bit OS, right? Are some of these programs 32-bit? You'll need to compile a 32-bit speedhack.so for them (CFLAGS=-m32 in makefile) since you can't mix and match 32 and 64 bit libraries. Linux's message when this kind of conflict happens, "file not found", is singularly uninformative and took me a long time to get my head around.
This User Gave Thanks to Corona688 For This Post:
# 25  
Old 03-16-2011
I see, but I don't know any way to give you more details. I always try to give as much details as I can.

openglhack32 is compiled (and linked) with -m32 and march-i386 (or something similar). So I don't know what to do now to test it for you.
# 26  
Old 03-16-2011
For starters you could answer the question I did ask; are these programs in fact 32-bit? Is it only the 32-bit ones that are failing?

I'll add onto that, you can ldd /path/to/program and ldd /path/to/libspeedhack.so to see what things they demand and are loading.

It could still because you're hellbent on using C++, too. It could be pining for C++ libraries that the executable in question didn't bother to load, or conflicting with different versions it does load.
This User Gave Thanks to Corona688 For This Post:
# 27  
Old 03-16-2011
Quake4 seems to be 32 bits. The other one (tileracer) too.

Okay, this seems to be the problem. By the way, I compiled openglhack32 (which is a void override of glBegin) and speedhack32 (32 bit version of speedhack) and I did:

Code:
$ export LD_PRELOAD=speedhack32.so
$ quake4
ERROR: ld.so: object 'speedhack32.so' from LD_PRELOAD cannot be preloaded: ignored.
...
$ ldd /usr/lib32/speedhack32.so
    linux-gate.so.1 =>  (0xf7742000)
    libdl.so.2 => /lib32/libdl.so.2 (0xf770d000)
    libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7622000)
    libm.so.6 => /lib32/libm.so.6 (0xf75fb000)
    libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf75df000)
    libc.so.6 => /lib32/libc.so.6 (0xf7484000)
    /lib/ld-linux.so.2 (0xf7743000)

By the way, I don't know why it say it couldn't load but it seems to load, because I had speedhack (but openglhack didn't work).

I will post a conclusion when I understand a bit more of this situation. Thank you corona for help me. The ldd command helped me to secure that I'm loading 32 bits libraries.
# 28  
Old 03-16-2011
I'd still like to see ldd quake4. And I'd still like to know whether the programs that're failing are mostly 32-bit programs. And I'd still like to know if you're compiling all these as C++ and I'd still like to know what bits you really need to be C++.

It may be failing to preload parts of it but not all of it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
Login or Register to Ask a Question