Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-iv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-iv
  • Repository
Switch branch/tag
  • linux-iv
  • mm
  • kasan
  • kasan.c
Find file BlameHistoryPermalink
  • Andrey Ryabinin's avatar
    mm/kasan: get rid of speculative shadow checks · c634d807
    Andrey Ryabinin authored Jul 10, 2017
    For some unaligned memory accesses we have to check additional byte of
    the shadow memory.  Currently we load that byte speculatively to have
    only single load + branch on the optimistic fast path.
    
    However, this approach has some downsides:
    
     - It's unaligned access, so this prevents porting KASAN on
       architectures which doesn't support unaligned accesses.
    
     - We have to map additional shadow page to prevent crash if speculative
       load happens near the end of the mapped memory. This would
       significantly complicate upcoming memory hotplug support.
    
    I wasn't able to notice any performance degradation with this patch.  So
    these speculative loads is just a pain with no gain, let's remove them.
    
    Link: http://lkml.kernel.org/r/20170601162338.23540-1-aryabinin@virtuozzo.com
    
    Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
    Acked-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c634d807