lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  1 Jul 2022 05:54:22 -0700
From:   Yury Norov <yury.norov@...il.com>
To:     linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        David Howells <dhowells@...hat.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Jonathan Corbet <corbet@....net>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Matthew Wilcox <willy@...radead.org>,
        NeilBrown <neilb@...e.de>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Russell King <linux@...linux.org.uk>,
        Vlastimil Babka <vbabka@...e.cz>,
        William Kucharski <william.kucharski@...cle.com>,
        linux-doc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mm@...ck.org
Cc:     Yury Norov <yury.norov@...il.com>
Subject: [PATCH 0/8] lib: cleanup bitmap-related headers

This series unifies declarations of bitmap-related functions and aligns
return types with values that actually returned. Also, it moves one-liner
wrappers around cpumask functions into headers, so that compiler has a
chance to optimize better.

With this series, GCC 11.2 for ARM64 with kernel v5.19-rc4:
add/remove: 15/7 grow/shrink: 461/164 up/down: 14844/-4580 (10264)

This +10K didn't surprize me because  modern compilers are more agressive
in inlining, loop unrolling, and other techniques that increase size of
the image.

Yury Norov (8):
  arm: align find_bit defs with generic kernel
  lib/bitmap: change return values to bool where appropriate
  lib/bitmap: change type of bitmap_weight to unsigned int
  cpumask: change return types to bool where appropriate
  lib/cpumask: change return types to unsigned
  lib/cpumask: move one-line wrappers around find_bit to the header
  mm: split include/linux/gfp.h
  lib/cpumask: move some one-line wrappers to header file

 Documentation/core-api/mm-api.rst |   8 +-
 MAINTAINERS                       |   1 +
 arch/arm/include/asm/bitops.h     |  20 +-
 include/linux/bitmap.h            |  10 +-
 include/linux/cpumask.h           | 125 +++++++++--
 include/linux/gfp.h               | 334 +----------------------------
 include/linux/gfp_flags.h         | 338 ++++++++++++++++++++++++++++++
 lib/bitmap.c                      |   9 +-
 lib/cpumask.c                     |  97 +--------
 tools/include/linux/bitmap.h      |  12 +-
 tools/lib/bitmap.c                |   6 +-
 11 files changed, 483 insertions(+), 477 deletions(-)
 create mode 100644 include/linux/gfp_flags.h

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ