Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
I have an idea for a project, a very cool project. Is there any way to obtain detailed memory access information for a given process or set of processes. I would need to encode the data for use in Machine Learning algorithms, particularly those pertaining to Artificial Neural Networks.
It depends on what you mean by "memory access information".
Basic paging statistics are available...
The usual problem with trying to use them is that the information is too coarse for any real use other than crudely optimizing the paging algorithm.
One example of a problem of insufficient data has to do with identifying if a page has been modified. To do it right requires hardware. HOWEVER, it can be done by software - by making all pages read only... if a write fault occurs, AND the OS has designated the page to be writable, then the page is made r/w, and the OS data marks it as "dirty"... then the interrupt is dismissed, and the instruction retried.
Slow... but workable. Use for statistics? really bad. frequently you would like to know "how often" is a page written to, how long between writes... to get that detailed amount of information really really needs hardware.
The next problem is that if you actually get enough information for good use, it comes way too fast (such as a program counter trace) for any use. Computing a modified paging algorithm takes longer than it takes the application being traced to run...
Most that I've met take a paging statistics snapshot once every 5-10 seconds, then spends a half second to compute updates...
Last edited by jpollard; 03-15-2013 at 01:14 PM.
Reason: small followup.
another approach is to gather executable/loaded opcodes memory access instructions statistics/modify executable to add statistics info before memory access..
Valgrind is an instrumentation framework for building dynamic analysis tools.
Memcheck is one of the tools that comes with Valgrind:
Quote:
When a program is run under Memcheck's supervision, all reads and writes of memory are checked, and calls to malloc/new/free/delete are intercepted.
...
Memcheck runs programs about 10--30x slower than normal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.