Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • Makefile.lib
Find file BlameHistoryPermalink
  • Andrey Konovalov's avatar
    kasan: don't emit builtin calls when sanitization is off · e186d8bf
    Andrey Konovalov authored Feb 06, 2018
    commit 0e410e15 upstream.
    
    With KASAN enabled the kernel has two different memset() functions, one
    with KASAN checks (memset) and one without (__memset).  KASAN uses some
    macro tricks to use the proper version where required.  For example
    memset() calls in mm/slub.c are without KASAN checks, since they operate
    on poisoned slab object metadata.
    
    The issue is that clang emits memset() calls even when there is no
    memset() in the source code.  They get linked with improper memset()
    implementation and the kernel fails to boot due to a huge amount of KASAN
    reports during early boot stages.
    
    The solution is to add -fno-builtin flag for files with KASAN_SANITIZE :=
    n marker.
    
    Link: http://lkml.kernel.org/r/8ffecfffe04088c52c42b92739c2bd8a0bcb3f5e.1516384594.git.andreyknvl@google.com
    
    
    Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
    Acked-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Michal Marek <michal.lkml@markovi.net>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e186d8bf
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7