Coder Social home page Coder Social logo

Comments (13)

ramosian-glider avatar ramosian-glider commented on June 14, 2024

Any chance you could share the config you were using to build the kernel? Thanks!

from kmsan.

tklengyel avatar tklengyel commented on June 14, 2024

Here you go kmsan-failure.zip

from kmsan.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

Ok, this must have something to do with CONFIG_FORTIFY_SOURCE=y, looking...

from kmsan.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

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.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

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.

tklengyel avatar tklengyel commented on June 14, 2024

FYI the config is largely based off of the default Ubuntu config, just ran through olddefconfig and disabled some signing/lockdown options.

from kmsan.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

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.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

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.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

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.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

@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.

tklengyel avatar tklengyel commented on June 14, 2024

@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.

ramosian-glider avatar ramosian-glider commented on June 14, 2024

@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.

tklengyel avatar tklengyel commented on June 14, 2024

I just checked with the latest tip of linux (9d64600) and I no longer have this issue popping up.

from kmsan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.