Skip to content

Create Linux_Memory_Management_Essentials.md#38

Open
igor-stoppa wants to merge 27 commits into
elisa-tech:mainfrom
igor-stoppa:create_memory_management_essentials
Open

Create Linux_Memory_Management_Essentials.md#38
igor-stoppa wants to merge 27 commits into
elisa-tech:mainfrom
igor-stoppa:create_memory_management_essentials

Conversation

@igor-stoppa

Copy link
Copy Markdown
Collaborator

Description of internal memory management in Linux, from safety perspective.

igor-stoppa and others added 2 commits July 12, 2024 21:31
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Co-authored-by: Daniel Weingaertner <danielwgt@redhat.com>
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md

@dweingaertner dweingaertner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My general comment is that we should separate what is knowledge about the kernel memory management system, provide it with reference anchors, and separately discuss the safety implications, as these are not of the same nature.

Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md
reading more pages than requested, under the assumption that more requests might be coming soon


#### **Safety-Oriented consideration**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. We should to separate the premises from these considerations, and explicitly state the premises each conclusion builds on. Take for example the 1 argument below. Uncertainty in the timing might be a problem, but might not, depending on the requirements or on the size of the uncertainty.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed to reconsider later the overall posture of the document.
My motivation is to try to keep together statements which are kind of obvious with others that might be less obvious, but derivable.
We could consider - in general - to introduce also the notion of which aspects are likely to be unavoidable, and which ones might be relevant only for some use case scenarios.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the structure of this document would need some further thought before publishing it, but I would prefer to merge it as a Contribution in its current form, and then consider how best to restructure it for publication (to https://osep.elisa.tech/) in a separate MR.

igor-stoppa and others added 8 commits September 19, 2024 15:16
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
added PXA, PXN examples

Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
monolithic -> boot image

Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
igor-stoppa and others added 4 commits September 19, 2024 17:38
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Co-authored-by: Daniel Weingaertner <danielwgt@redhat.com>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Signed-off-by: Igor Stoppa <istoppa@nvidia.com>
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
igor-stoppa and others added 11 commits September 20, 2024 15:34
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Daniel Weingaertner <danielwgt@redhat.com>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Daniel Weingaertner <danielwgt@redhat.com>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Daniel Weingaertner <danielwgt@redhat.com>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
Comment thread Contributions/Linux_Memory_Management_Essentials.md Outdated
igor-stoppa and others added 2 commits January 26, 2025 17:49
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
Co-authored-by: Paul Albertella <paul.albertella@codethink.co.uk>
Signed-off-by: Igor Stoppa <igor.stoppa@gmail.com>
1. Because of the way pages, fractions and multiples of them are allocated, freed, cached, recovered, there is a complex interaction between system components at various layers.
2. Even using cgroups, it is not possible to eliminate indirect interaction at the low level between components with different levels of safety integrity (e.g. the recirculation of pages related to critical processes in one group might be affected by less critical processes in another group)
3. Because of the nature of memory management, we cannot rule out the possibility that memory management mechanisms will interfere with safe processes, either due to a bug or due to the interference toward the metadata they rely on. For example, the memory management might hand over to a requesting entity a memory page that is currently already in use either by a device driver or by a userspace process playing a role in a safety use case.
4. These complex interaction between processes, kernel drivers and other kernel code mean that it is not feasible to qualify the kernel through positive, requirement-based testing alone.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. These complex interaction between processes, kernel drivers and other kernel code mean that it is not feasible to qualify the kernel through positive, requirement-based testing alone.
4. These complex interactions between processes, kernel drivers and other kernel code mean that it is not feasible to qualify the kernel through positive, requirement-based testing alone.

2. The optimisations made by the kernel in providing physical backing to process memory make it very
questionable if it can be assessed when a (part of) a process memory content is actually present in the
system physical memory.
3. we cannot rule out the possibility that a process will be exposed to various types of interference from the kernel:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. we cannot rule out the possibility that a process will be exposed to various types of interference from the kernel:
3. We cannot rule out the possibility that a process will be exposed to various types of interference from the kernel:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants