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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 30 Jul 2008 13:07:19 -0400 (EDT)
From:	venetis@...l.capsl.udel.edu
To:	linux-kernel@...r.kernel.org
Subject: [OT?] Can linux be compiled/used as a library?

Hello everyone,

I assume that the first thing that comes to ones mind is "Why would
someone like to use an OS kernel as a library?". So let me explain my
situation.

I am using a simulator which runs on a x86 Linux system, which simulates
an Alpha processor. I have a cross-compiler for it to compile my programs.
There is, however, a disadvantage currently. System calls are not fully
simulated. How it works is as follows. The program sets up all required
simulated registers and executes the specific instruction that initiates
the system call. At this point the simulator takes over and uses the
necessary values from the simulated registers to execute the system call
NATIVELY, i.e., on the x86 Linux system. Finally, it writes the resulting
values returned from the system call back to the simulated registers and
execution continues. (Of course, some more book-keeping is required, but
this is the basic mechanism.)

Although this works, the problem is that system calls are not timed in the
simulator (execution time is thought of as zero). I have quite a few
programs where system call execution time is a considerable percentage of
the total execution time, which means that the reported execution time is
far from the "real" time required.

My thought was to completely remove the current system call simulation and
instead link the simulator with a real kernel (linux), which has been
compiled as a library for the simulated processor. This way, even system
calls would be timed and the reported time would be a much closer
estimation of the real time.

Any pointers and/or thoughts on this are appreciated.

Ioannis E. Venetis

P.S: Please CC any answers to me, as I am not subscribed to the list.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ