forked from gregkh/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
KRN-1117: Stackdepot Redesign Kernel Port #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
caleb-kan
wants to merge
38
commits into
linux-6.18.y
Choose a base branch
from
caleb/KRN-1117-kernel-port
base: linux-6.18.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2c0b0b5
KRN-1117: Add stackdepot trie storage
94f15d7
KRN-1117: Separate stackdepot put validation checks
799719b
KRN-1117: Tighten stackdepot fetch_into misuse handling
ddc92c8
KRN-1117: Simplify stackdepot trie state management
6fe0cb5
KRN-1117: Make stackdepot KUnit fixtures portable
6fbddb5
KRN-1117: Minimize the KMSAN fetch_into conversion
1bba11f
KRN-1117: Reject trie handles in the stackdepot GDB helper
4da813b
KRN-1117: Preserve hash capacity when trie init fails
0fcb660
KRN-1117: Surface invalid stackdepot fetch buffers
32db89c
KRN-1117: Preserve configured stackdepot pool capacity
0ffd850
KRN-1117: Inline the stackdepot leaf limit helper
61af459
KRN-1117: Separate stackdepot trie handle classification
e2eff77
KRN-1117: Simplify stackdepot trie preallocation
b0b581d
KRN-1117: Simplify stackdepot side-table page handling
c09b693
KRN-1117: Drop unrelated stackdepot kernel-doc change
81ad006
KRN-1117: Simplify stackdepot trie insertion allocation
8abd0ab
KRN-1117: Inline the stackdepot trie append allocation
79059e3
KRN-1117: Remove redundant stackdepot trie checks
48f7d5f
KRN-1117: Expand stackdepot trie KUnit coverage
63fa41f
KRN-1117: Simplify singleton stackdepot trie paths
7b14626
KRN-1117: Correct stackdepot post-put documentation
628dd4c
KRN-1117: Verify stackdepot trie KUnit backend
fa5c309
KRN-1117: Minimize the stackdepot DRM conversion
57d5cb4
KRN-1117: Avoid over-specifying stackdepot compression failure
ee43f24
KRN-1117: Simplify stackdepot trie reuse with bitmap slots
58bdc01
KRN-1117: Remove remaining stackdepot helper indirection
fbaf117
KRN-1117: Consolidate stackdepot KUnit coverage
aac13cd
KRN-1117: Simplify stackdepot trie helpers
5ad1215
KRN-1117: Cover remaining stackdepot trie topology paths
6075957
KRN-1117: Simplify stackdepot trie state ownership
d356157
KRN-1117: Verify constrained stackdepot trie misses
d41c11d
KRN-1117: Simplify stackdepot trie insertion
65e196c
KRN-1117: Skip x86 stackdepot codec test on UML
b0139f5
KRN-1117: Simplify stackdepot trie insertion allocation
f9d58e1
KRN-1117: Strengthen stackdepot trie topology coverage
7e20082
KRN-1117: Simplify stackdepot trie path construction
6f7a250
KRN-1117: Cover maximum stackdepot trie paths
8b068e3
KRN-1117: Tighten stackdepot pool and trie invariants
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| #ifndef __ASM_STACKDEPOT_H | ||
| #define __ASM_STACKDEPOT_H | ||
|
|
||
| #include <linux/types.h> | ||
| #include <asm/sections.h> | ||
|
|
||
| /* | ||
| * Modules are allocated inside a 2 GB relocation window containing the | ||
| * kernel image. Store a signed 32-bit offset from _text so compression is | ||
| * independent of 4 GB high-bit boundaries crossed by that window. | ||
| */ | ||
| static inline unsigned long arch_stack_depot_frame_from_payload(u32 payload) | ||
| { | ||
| long offset; | ||
|
|
||
| offset = (s32)payload; | ||
| if (offset < 0) | ||
| return (unsigned long)_text - (unsigned long)(-offset); | ||
| return (unsigned long)_text + (unsigned long)offset; | ||
| } | ||
|
|
||
| static inline bool | ||
| arch_stack_depot_frame_try_compress(unsigned long frame, u32 *payload) | ||
| { | ||
| u32 candidate; | ||
|
|
||
| candidate = (u32)(frame - (unsigned long)_text); | ||
| if (arch_stack_depot_frame_from_payload(candidate) != frame) | ||
| return false; | ||
|
|
||
| *payload = candidate; | ||
| return true; | ||
| } | ||
|
|
||
| static inline void | ||
| arch_stack_depot_frame_decompress(u32 payload, unsigned long *frame) | ||
| { | ||
| *frame = arch_stack_depot_frame_from_payload(payload); | ||
| } | ||
|
|
||
| #endif /* __ASM_STACKDEPOT_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| #ifndef _ASM_X86_STACKDEPOT_H | ||
| #define _ASM_X86_STACKDEPOT_H | ||
|
|
||
| #include <linux/types.h> | ||
|
|
||
| #ifdef CONFIG_X86_64 | ||
| /* | ||
| * Compress canonical kernel text/module addresses whose upper 32 bits are all | ||
| * ones. Other kernel virtual addresses stay raw, so decompression reconstructs | ||
| * the original frame by restoring this prefix. | ||
| */ | ||
| #define STACK_DEPOT_X86_64_FRAME_PREFIX 0xffffffff00000000UL | ||
| #define STACK_DEPOT_X86_64_FRAME_LOW_MASK 0x00000000ffffffffUL | ||
|
|
||
| static inline bool | ||
| arch_stack_depot_frame_try_compress(unsigned long frame, u32 *low) | ||
| { | ||
| if ((frame & ~STACK_DEPOT_X86_64_FRAME_LOW_MASK) != | ||
| STACK_DEPOT_X86_64_FRAME_PREFIX) | ||
| return false; | ||
|
|
||
| *low = (u32)frame; | ||
| return true; | ||
| } | ||
|
|
||
| static inline void | ||
| arch_stack_depot_frame_decompress(u32 low, unsigned long *frame) | ||
| { | ||
| *frame = STACK_DEPOT_X86_64_FRAME_PREFIX | low; | ||
| } | ||
|
|
||
| #else | ||
| #include <asm-generic/stackdepot.h> | ||
| #endif /* CONFIG_X86_64 */ | ||
|
|
||
| #endif /* _ASM_X86_STACKDEPOT_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| #ifndef __ASM_GENERIC_STACKDEPOT_H | ||
| #define __ASM_GENERIC_STACKDEPOT_H | ||
|
|
||
| #include <linux/types.h> | ||
|
|
||
| static inline bool | ||
| arch_stack_depot_frame_try_compress(unsigned long frame, u32 *low) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| static inline void | ||
| arch_stack_depot_frame_decompress(u32 low, unsigned long *frame) | ||
| { | ||
| /* Generic code never compresses frames, so this hook is unreachable. */ | ||
| } | ||
|
|
||
| #endif /* __ASM_GENERIC_STACKDEPOT_H */ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.