Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
This may be a simple question but, I heard that the only rule in working on the kernel is that you don't break "user space". So I was wondering what that means: To break user space and how does it happen?
Edit
It has been pointed out to me that this question is not suited for Stack Over Flow by #lurker so I will move it to Super User as #lurker suggests. (See below)
"Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – lurker, jww, SilentKiller
You're referring to Linus Torvald's first rule of kernel development. This note explains it: https://lkml.org/lkml/2012/12/23/75. I.e., when maintaining the kernel, do not do something which breaks user programs/applications. In other words, when making kernel changes, it is very bad to cause problems in the user's application "space". That doesn't literally mean memory. That means anything that impacts the user applications in a way that negatively affects its behavior (causes the program to malfunction). The note I cite also indicates at least one example.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am attempting to monitor /sys/block/*/device/ioerr_cnt for disks that are about to fail. I am seeing healthy disks reporting some errors, as well.
What are typical thresholds to distinguish between disk drives operating normally, and those about to fail? Are there best practices in this area?
Here's a good discussion on ioerr_cnt
It's not a good indicator of drive failure since it's really an indicator of how the drive is responding to commands, not how the actual drive hardware is doing. SMART capable drives, for example, remap bad blocks internally and this may not show up in ioerr_cnt.
Your best bet would be to query the drive (if it is SMART capable), since it keeps track of actual error rates and remapped blocks.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
How is kernel space sections? and how do they locate?
For example, user space has some sections (.data, .text, stack ...).
I want to know kernel space's memory layout image.
Please tell me it or related site.
The user space is not laid out like this:
For example, user space has some sections(.data, .text, stack ...).
Sections only exist in the executable file. The user space is just memory. There is no "stack" section. The stack is just read/write memory that happens to be used as a stack. A process can have multiple user-mode stacks when there is threading.
Unfortunately dreadful operating system books persist in confusing people this way.
The kernel is also just memory. It can be organized however the operating system wants it to be.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am reading a chapter Sytem Protection of operating system of Peter Baer Galvin.
Inside the chapter there is a paragraph inside a subtopic Principles of Protection which I m not able to understand .
An operating system following the principles of least privilege
implements its features, programs ,system calls, and data structures
so that failure or compromise of a component does the minimum damage
and allows the minimum damage to be done. The overflow of a buffer in
a system daemon might cause the daemon to fail, for example ,but
should not allow the execution of code from the process's stack that
would enable a remote user to gain maximum privileges and access to
the entire system (as happens too often today).
Please help me to understand this pragraph.
Basically, the developers of a hardened (inherently relatively secure) OS should follow common sense and give a non-kernel process the absolute minimal amount of access it needs to do its job. If you don't do this, then anything executing at kernel privilege level can potentially crash the system or, worse, compromise it and wreak havoc on the system's data.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I understand that /proc/* contains directories that are actually PIDs.
I have a custom process that is killed and spawned every few minutes.
What are the chances of a PID (for example, 1009) getting reused by the custom process? (After wrapping around pid_max)
Is it likely enough to happen that my code should deal with it?
High enough that you should expect it to happen and be prepared to deal with it. The actual probability will of course depend on how often other processes are being created on your system. There is certainly no guarantee that it won't happen, though, so you must assume that it will.
"What are the odds" is a statistics question, and the answer depends on how many other processes there are, and how often they fork() and how often they exit(), so the exact answer is difficult to calculate. Anywhere between "almost impossible to happen" and "nearly guaranteed to happen every minute."
If the question is "could this happen in my lifetime and should I handle that in my code" then the answer is yes.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm looking for a way to see if a kernel module is really used, in my case aesni-intel.
I see that it's loaded in lsmod|grep aes and also used by other aes modules and crypto helper.
But i can't see if tools like cryptsetup or libreswan ipsec are using the module.
I see that the performance is better when loaded but sometimes that's not enough.
I also tried "perf top" and i see that aes_enc_blk is called but that's no ensurance either.
So if anyone has any idea how to achieve this, besides patching the linux kernel to log something when aesni-intel is called, i would appreciate it.
thanks