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
  • linux
  • scripts
  • Makefile.lib
Find file BlameHistoryPermalink
  • Vegard Nossum's avatar
    kcov: allow more fine-grained coverage instrumentation · a4691dea
    Vegard Nossum authored Aug 02, 2016
    For more targeted fuzzing, it's better to disable kernel-wide
    instrumentation and instead enable it on a per-subsystem basis.  This
    follows the pattern of UBSAN and allows you to compile in the kcov
    driver without instrumenting the whole kernel.
    
    To instrument a part of the kernel, you can use either
    
        # for a single file in the current directory
        KCOV_INSTRUMENT_filename.o := y
    
    or
    
        # for all the files in the current directory (excluding subdirectories)
        KCOV_INSTRUMENT := y
    
    or
    
        # (same as above)
        ccflags-y += $(CFLAGS_KCOV)
    
    or
    
        # for all the files in the current directory (including subdirectories)
        subdir-ccflags-y += $(CFLAGS_KCOV)
    
    Link: http://lkml.kernel.org/r/1464008380-11405-1-git-send-email-vegard.nossum@oracle.com
    
    
    Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    a4691dea
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7