Comments (13)
Any chance you could share the config you were using to build the kernel? Thanks!
from kmsan.
Here you go kmsan-failure.zip
from kmsan.
Ok, this must have something to do with CONFIG_FORTIFY_SOURCE=y, looking...
from kmsan.
Another finding is that CONFIG_FRAME_WARN makes no sense under KMSAN, and configs like CONFIG_WERROR and CONFIG_KVM_WERROR enforce build-time-errors because of that warning.
from kmsan.
And another one:
ld: arch/x86/purgatory/purgatory.ro: in function `purgatory':
(.text+0x1a): undefined reference to `__msan_get_context_state'
ld: (.text+0x35): undefined reference to `__msan_poison_alloca'
ld: (.text+0x69): undefined reference to `__msan_metadata_ptr_for_store_4'
ld: (.text+0x126): undefined reference to `__msan_metadata_ptr_for_store_8'
ld: (.text+0x153): undefined reference to `__msan_metadata_ptr_for_load_8'
from kmsan.
FYI the config is largely based off of the default Ubuntu config, just ran through olddefconfig and disabled some signing/lockdown options.
from kmsan.
FYI the config is largely based off of the default Ubuntu config, just ran through olddefconfig and disabled some signing/lockdown options.
Ok, then it really makes sense for me to make it work. It's nice that it uncovered so many problems at once.
from kmsan.
Another one:
MODPOST Module.symvers
ERROR: modpost: "kmsan_copy_page_meta" [fs/nilfs2/nilfs2.ko] undefined!
ERROR: modpost: "kmsan_copy_page_meta" [drivers/gpu/drm/ttm/ttm.ko] undefined!
ERROR: modpost: "kmsan_copy_page_meta" [drivers/block/drbd/drbd.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1
from kmsan.
After setting CONFIG_FRAME_WARN=0
(we cannot override what's written in the config for that flag) in the original config, I am able to build the current KMSAN master (which is almost identical to Linux v6.1-rc4).
Yet it is unable to boot, probably there are more config flags that don't paly well with KMSAN.
from kmsan.
@tklengyel please note that according to your config you are using Clang 14, which does not support all the required features:
1 #
2 # Automatically generated file; DO NOT EDIT.
3 # Linux/x86 6.0.0 Kernel Configuration
4 #
5 CONFIG_CC_VERSION_TEXT="Ubuntu clang version 14.0.0-1ubuntu1"
6 CONFIG_GCC_VERSION=0
7 CONFIG_CC_IS_CLANG=y
8 CONFIG_CLANG_VERSION=140000
9 CONFIG_AS_IS_LLVM=y
10 CONFIG_AS_VERSION=140000
...
10502 CONFIG_HAVE_ARCH_KMSAN=y
10503 CONFIG_HAVE_KMSAN_COMPILER=y
10504 CONFIG_KMSAN=y
10505 # end of Memory Debugging
-- it does not have CONFIG_HAVE_KMSAN_PARAM_RETVAL=y
or CONFIG_KMSAN_CHECK_PARAM_RETVAL=y
This shouldn't prevent KMSAN from booting though.
from kmsan.
@ramosian-glider Thanks, have already moved on to clang-15, this was just the backup of the config I tried first. Very first thing I tried was to move to clang-15 to see if that resolved the compile issue (it did not) ;)
from kmsan.
@tklengyel can you please try to disable the following configs and see if that helps?
- CONFIG_XEN_PV=n
- CONFIG_X86_MEM_ENCRYPT=n
- CONFIG_HARDENED_USERCOPY=n
- CONFIG_FRAME_WARN=0
from kmsan.
I just checked with the latest tip of linux (9d64600) and I no longer have this issue popping up.
from kmsan.
Related Issues (20)
- duplicate stack origin PC HOT 2
- 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
- KMSAN doesn't support paravirtualization
- Why do we need to sync metadata in x86_32 page faults? HOT 3
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.