forked from gregkh/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
KRN-1117: Add path-compressed trie storage to stackdepot #2
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
Draft
caleb-kan
wants to merge
130
commits into
linux-6.18.y
Choose a base branch
from
caleb/KRN-1117-stackdepot-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.
Draft
Changes from all commits
Commits
Show all changes
130 commits
Select commit
Hold shift + click to select a range
b96d171
KRN-1117: Add caller-owned stack trace fetch helper
0ffe344
KRN-1117: Add stackdepot files to MAINTAINERS
90214d6
KRN-1117: Clarify stack_depot_fetch_into contract
0becc55
KRN-1117: Stop page_owner reading stack entries directly
d328e21
KRN-1117: Store page_owner stack handles in stack list
3a5759e
KRN-1117: Hide page_owner stack count internals
42a90b1
KRN-1117: Keep stackdepot record layout private
75f1a4d
KRN-1117: Add stackdepot frame compression hooks
250c3b7
KRN-1117: Warn on stackdepot count underflow
03f8f0a
KRN-1117: Compress x86-64 stackdepot frames
8f7a08f
KRN-1117: Add stackdepot frame-run encoding helpers
fe07f92
KRN-1117: Tighten page_owner stack display accounting
dd85540
KRN-1117: Materialize stackdepot trie frame runs
83e1828
KRN-1117: Add stackdepot trie child arrays
78463e7
KRN-1117: Harden stackdepot trie helper contracts
60a1fa0
KRN-1117: Match stackdepot trie node prefixes
edfe0dd
KRN-1117: Build stackdepot trie append chains
2fe6b7a
KRN-1117: Publish stackdepot trie append chains
25ce568
KRN-1117: Order stackdepot trie append publication
3bc1633
KRN-1117: Classify stackdepot trie lookup steps
2663c87
KRN-1117: Harden stackdepot trie lookup prep
2d85c61
KRN-1117: Add stackdepot trie append insertion
cd0e400
KRN-1117: Add stackdepot trie descend insertion
a245616
KRN-1117: Add stackdepot maintainer routing
0040433
KRN-1117: Clarify stackdepot prep invariants
0569363
KRN-1117: Harden stackdepot prep helper contracts
2e18d10
KRN-1117: Add stackdepot trie promotion
5bf3754
KRN-1117: Preserve children during trie promotion
2f1fe8c
KRN-1117: Add stackdepot trie node slicing
c78948b
KRN-1117: Add stackdepot trie split child arrays
bf4d8ff
KRN-1117: Add stackdepot trie split tail planning
91c3fa7
KRN-1117: Add stackdepot trie split precheck
546033d
KRN-1117: Add stackdepot trie split subtree
677886e
KRN-1117: Harden stackdepot trie split precheck
b9469d6
KRN-1117: Add stackdepot trie split insertion
2658c72
KRN-1117: Add stackdepot trie leaf lookup
84fe194
KRN-1117: Add stackdepot trie pre-publish hook
feb01a3
KRN-1117: Add stackdepot trie insertion planning
8e6de92
KRN-1117: Add stackdepot trie handle namespace
b3e2e2a
KRN-1117: Fix stackdepot trie COW leaf lookup
b69ba25
KRN-1117: Clarify page_owner marker reporting
fa13111
KRN-1117: Add stackdepot trie side table
946ce65
KRN-1117: Harden stackdepot trie COW publication
e6f8b98
KRN-1117: Add stackdepot trie side-table prepare
a5d195c
KRN-1117: Add stackdepot trie pool sizing
403bd56
KRN-1117: Align stackdepot trie pool allocations
6f19677
KRN-1117: Add stackdepot trie pool carve helper
20027ae
KRN-1117: Add stackdepot trie pool batch carve
5628485
KRN-1117: Clarify page_owner count transition
3c2ee85
KRN-1117: Add stackdepot trie pool prealloc
8c8c0bc
KRN-1117: Add stackdepot trie pool rollover
72e99db
KRN-1117: Add stackdepot trie allocation rollback
258129d
KRN-1117: Add stackdepot trie transaction IDs
8c2112d
KRN-1117: Add stackdepot trie allocation reserve
e8820ad
KRN-1117: Add stackdepot trie allocation commit
8248768
KRN-1117: Add stackdepot trie allocation insert
4aeddae
KRN-1117: Serialize stackdepot trie allocation insert
0ee779c
KRN-1117: Add stackdepot trie feature flag
a405d3d
KRN-1117: Remove stackdepot trie feature flag
69b854a
KRN-1117: Add stackdepot trie allocation planning
3720e5f
KRN-1117: Add stackdepot trie allocation workspace
f93eb03
KRN-1117: Add stackdepot trie workspace insert
237bf20
KRN-1117: Add stackdepot trie allocation prealloc
9908ea6
KRN-1117: Add stackdepot trie save miss
f693df3
KRN-1117: Add stackdepot trie save helper
a1afe16
KRN-1117: Add stackdepot trie handle fetch helper
7e823e0
KRN-1117: Re-add stackdepot trie feature flag
76c26db
KRN-1117: Materialize stackdepot trie handles directly
c030eaf
KRN-1117: Route stackdepot fetch_into trie handles
7a8781f
KRN-1117: Add stackdepot trie materialization slots
2cd8dac
KRN-1117: Publish trie materialization slots locklessly
ed8ae1f
KRN-1117: Add stackdepot trie frame walker
8ee1a71
KRN-1117: Add stackdepot trie materialize helper
c76f251
KRN-1117: Size stackdepot trie materialization buffers
aff8685
KRN-1117: Add stackdepot trie materialized records
5d51a39
KRN-1117: Add stackdepot trie materialization cache
b94f73b
KRN-1117: Route stackdepot fetch to trie cache
0a86543
KRN-1117: Count stackdepot trie materialization bytes
dd3bf3e
KRN-1117: Add a locked stackdepot trie save helper
12d3d49
KRN-1117: Initialize stackdepot trie side table
a2ecf7b
KRN-1117: Initialize stackdepot trie workspace
b60ebcb
KRN-1117: Gate stackdepot trie allocation readiness
2a085a4
KRN-1117: Print stackdepot trie handles directly
ab20790
KRN-1117: Route stackdepot saves to trie storage
2c373ef
KRN-1117: Migrate persistent stackdepot fetches to copy-out
4007005
KRN-1117: Print stackdepot trie frames in stack order
50a0c84
KRN-1117: Stress stackdepot trie saves concurrently
72761b3
KRN-1117: Make stackdepot trie side table sparse
d8774f1
KRN-1117: Reuse retired stackdepot trie child arrays
222556b
KRN-1117: Assert x86 stackdepot frame prefix is nonzero
3358ba7
KRN-1117: Reuse retired stackdepot trie nodes
e356b33
KRN-1117: Harden arm64 stackdepot prefix scan
0df12cc
KRN-1117: Reduce stackdepot trie pool usage
961acf0
KRN-1117: Warn on direct fetch of trie stackdepot handles
3fddeba
KRN-1117: Clean up stackdepot save control flow
6f255eb
KRN-1117: Close stackdepot trie save-path gaps
428f519
KRN-1117: Preserve page owner handles without stack list nodes
88ac7ba
KRN-1117: Harden stackdepot trie teardown ordering
b8ee429
KRN-1117: Initialize stackdepot trie on runtime enable
8ca6e19
Merge greg/linux-6.18.y into KRN-1117 stackdepot port
4f5a99b
KRN-1117: Drop stackdepot MAINTAINERS entry
5bdac6c
KRN-1117: Reduce KMSAN stackdepot report stack usage
9fb876c
KRN-1117: Clarify stackdepot trie review details
842163f
KRN-1117: Read page owner threshold consistently
0f1de1c
KRN-1117: Clarify page owner count marker comment
6d9ee43
KRN-1117: Clarify stackdepot trie buffer contracts
c435880
KRN-1117: Drop test-only stackdepot pool carve helper
0c53020
KRN-1117: Simplify stackdepot trie internals
8ab08c2
KRN-1117: Clarify stackdepot caller assumptions
09a15a5
KRN-1117: Remove test-driven stackdepot trie indirection
bbf31e7
KRN-1117: Clarify stackdepot caller invariants
8f6d52c
KRN-1117: Fold stackdepot trie internals into implementation
3218ba2
KRN-1117: Document stackdepot trie design invariants
0542d6b
KRN-1117: Clarify stackdepot trie namespace checks
c1a9c70
KRN-1117: Avoid signed overflow in arm64 stackdepot compression
272a555
KRN-1117: Simplify stackdepot trie publication
d98d67e
KRN-1117: Reserve stackdepot trie IDs before pool storage
722792d
KRN-1117: Clear unused stackdepot trie child slots
3b2ea44
KRN-1117: Simplify stackdepot trie helpers
61a7987
KRN-1117: Simplify stackdepot trie state
891506d
KRN-1117: Test stackdepot overlong stack truncation
2858c84
KRN-1117: Tighten stackdepot trie save semantics
a4af172
KRN-1117: Tighten stackdepot trie reservation state
98b5919
KRN-1117: Simplify stackdepot trie and count handling
7029a52
KRN-1117: Clarify stackdepot trie failure semantics
6bbefcb
KRN-1117: Clarify stackdepot fetch handle constraints
20bb972
KRN-1117: Clarify stackdepot hash-only diagnostics
202dfc9
KRN-1117: Simplify stackdepot trie init paths
8cb7e4d
KRN-1117: Tighten stackdepot trie invariants
09c919f
KRN-1117: Remove unrelated page_owner changes
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,43 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| #ifndef __ASM_STACKDEPOT_H | ||
| #define __ASM_STACKDEPOT_H | ||
|
|
||
| #include <linux/types.h> | ||
| #include <linux/limits.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_low(u32 low) | ||
| { | ||
| long offset; | ||
|
|
||
| offset = (s32)low; | ||
| 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 *low) | ||
| { | ||
| u32 candidate; | ||
|
|
||
| candidate = (u32)(frame - (unsigned long)_text); | ||
| if (arch_stack_depot_frame_from_low(candidate) != frame) | ||
| return false; | ||
|
|
||
| *low = candidate; | ||
| return true; | ||
| } | ||
|
|
||
| static inline void | ||
| arch_stack_depot_frame_decompress(u32 low, unsigned long *frame) | ||
| { | ||
| *frame = arch_stack_depot_frame_from_low(low); | ||
| } | ||
|
|
||
| #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,40 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| #ifndef _ASM_X86_STACKDEPOT_H | ||
| #define _ASM_X86_STACKDEPOT_H | ||
|
|
||
| #include <linux/build_bug.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_assert(STACK_DEPOT_X86_64_FRAME_PREFIX != 0); | ||
|
|
||
| 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.