Comments (5)
It's possible to generate unique origin ids for parts of a heap allocation with 4-byte granularity.
from kmsan.
You mean generate via stackdepot?
I was thinking that maybe we can eat some bits from origin and put offset there, so it's still only 1 stackdepot id. We would need to propagate the offset during chaining and print in report.
from kmsan.
There is a trade off. You can eat through origin id values faster (I think we've seen a case when we ran out of them, but it's probably less of an issue for the kernel), or you can consume a bit more memory per allocation.
These "sub-origins" can be represented with a node in ChainedOriginDepot. This way the stack trace would only be stored once.
In any case, this can result in an explosion of chained origins. Imagine any kind of N*M algoritm, like matrix multiplication. Userspace msan has limits to deal with this.
from kmsan.
Why will offsets in origin ids lead to explosion of chained origins? We strip offset, chain, attach offset again. Stackdepot always sees ids without offsets.
from kmsan.
You are right. There is no explosion if we only track offsets in the original allocation, and not in subsequent stores.
from kmsan.
Related Issues (20)
- The return value of 'sscanf()' should be checked HOT 1
- Don't zero out origin of uninitialized bytes in kmsan_internal_set_shadow_origin() HOT 1
- KMSAN must use contiguous shadow for physical pages HOT 1
- Should we override gfp_flags when allocating metadata pages? HOT 1
- recipe for target 'vmlinux' failed? HOT 2
- trim aux frames from stacks HOT 1
- duplicate frame for local var origin HOT 1
- BUG: KMSAN: uninit-value in kmsan_handle_dma HOT 8
- Potential deadlock in stack_depot_save() HOT 1
- Some crypto configs that use asm are not disabled HOT 1
- BUG: NULL pointer dereference in wp_page_copy (kmsan specific) HOT 3
- Compile kmsan with clang-9 with -O2 ERROR HOT 2
- compile KMSAN error HOT 5
- https://www.google.com/webhp?client=ms-android-americamovil-us-revc&source=android-home&gws_rd=ssl
- Security Policy violation Binary Artifacts HOT 15
- can't compile if select KMSAN in ubuntu 2204 HOT 3
- arch/x86/kernel/module.c:230:49: error: call to undeclared library function 'memcpy' HOT 13
- KMSAN doesn't support paravirtualization
- Why do we need to sync metadata in x86_32 page faults? HOT 3
- false-positive bug report likely due to kmsan_percpu_ctx shared between softirq and hardirq context
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kmsan.