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
  • kernel-doc
Find file BlameHistoryPermalink
  • Alexander Lobakin's avatar
    compiler_types: add Endianness-dependent __counted_by_{le,be} · ca7e324e
    Alexander Lobakin authored Mar 27, 2024
    
    
    Some structures contain flexible arrays at the end and the counter for
    them, but the counter has explicit Endianness and thus __counted_by()
    can't be used directly.
    
    To increase test coverage for potential problems without breaking
    anything, introduce __counted_by_{le,be}() defined depending on
    platform's Endianness to either __counted_by() when applicable or noop
    otherwise.
    Maybe it would be a good idea to introduce such attributes on compiler
    level if possible, but for now let's stop on what we have.
    
    Acked-by: default avatarKees Cook <keescook@chromium.org>
    Acked-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
    Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
    Link: https://lore.kernel.org/r/20240327142241.1745989-2-aleksander.lobakin@intel.com
    
    
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    ca7e324e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7