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]
Message-Id: <20220510154750.212913-1-yury.norov@gmail.com>
Date:   Tue, 10 May 2022 08:47:28 -0700
From:   Yury Norov <yury.norov@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        David Laight <David.Laight@...LAB.COM>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Joe Perches <joe@...ches.com>,
        Julia Lawall <Julia.Lawall@...ia.fr>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Nicholas Piggin <npiggin@...il.com>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Peter Zijlstra <peterz@...radead.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Matti Vaittinen <Matti.Vaittinen@...rohmeurope.com>,
        linux-kernel@...r.kernel.org
Cc:     Yury Norov <yury.norov@...il.com>
Subject: [PATCH 00/21] add coccinelle scripts for {bitmap,cpumask,nodes}_empty()

In this series:
 - introduce bitmap.cocci, cpumask.cocci and nodemask.cocci;
 - add checks for cases where bitmap_weight() may be replaced with one of
   "empty, full, gt, lt, ge, le or eq" versions; and
 - address issued found with those scripts.

On top of next-2022-05-06.

Yury Norov (22):
  introduce bitmap.cocci
  introduce cpumask.cocci
  introduce nodemask.cocci
  ice: use bitmap_empty() in ice_vf_has_no_qs_ena()
  iio: replace bitmap_weight with bitmap_weitght_{eq,le} where
    appropriate
  octeontx2: use bitmap_empty() instead of bitmap_weight()
  risc-v: replace bitmap_weight with bitmap_empty in riscv_fill_hwcap()
  bitops: introduce MANY_BITS() macro
  qed: replace bitmap_weight() with MANY_BITS()
  net/mlx5e: simplify mlx5e_set_fecparam()
  KVM: x86: hyper-v: replace bitmap_weight() with hweight64()
  ia64: cleanup remove_siblinginfo()
  x86: smp: move cpumask_weight() out of for-loop in remove_siblinginfo
  x86: smp: use cpumask_weight_eq() in remove_siblinginfo
  net/mlx5: use cpumask_weight_gt() in irq_pool_request_irq()
  x86/tsc: use cpumask_weight_gt() in loop_timeout()
  sched/core: fix opencoded cpumask_any_but() in
    sched_core_cpu_{starting,deactivate}
  sched/core: remove unneeded cpumask_weight in
    sched_core_cpu_{starting,deactivate}
  sched/core: replace cpumask_weight() with cpumask_weight_eq() where
    appropriate
  sched/topology: replace cpumask_weight() with cpumask_weight_eq where
    appropriate
  cpufreq: use cpumask_weight_gt() in policy_is_shared()
  clockevents: use cpumask_weight_eq() in tick_cleanup_dead_cpu()

 MAINTAINERS                                   |   3 +
 arch/ia64/kernel/smpboot.c                    |   4 -
 arch/riscv/kernel/cpufeature.c                |   7 +-
 arch/x86/kernel/smpboot.c                     |   7 +-
 arch/x86/kernel/tsc_sync.c                    |   2 +-
 arch/x86/kvm/hyperv.c                         |   4 +-
 arch/xtensa/kernel/traps.c                    |   5 +-
 drivers/iio/adc/ad_sigma_delta.c              |   2 +-
 drivers/iio/industrialio-buffer.c             |   2 +-
 drivers/net/ethernet/intel/ice/ice_vf_lib.c   |   4 +-
 .../net/ethernet/marvell/octeontx2/af/cgx.c   |   6 +-
 .../net/ethernet/marvell/octeontx2/af/rpm.c   |   2 +-
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |   4 +-
 .../mellanox/mlx5/core/irq_affinity.c         |   2 +-
 drivers/net/ethernet/qlogic/qed/qed_dev.c     |   3 +-
 include/linux/bitops.h                        |   3 +
 include/linux/cpufreq.h                       |   2 +-
 include/linux/log2.h                          |   2 +-
 kernel/sched/core.c                           |  47 +++-----
 kernel/sched/topology.c                       |   4 +-
 kernel/time/clockevents.c                     |   2 +-
 scripts/coccinelle/api/bitmap.cocci           | 104 ++++++++++++++++++
 scripts/coccinelle/api/cpumask.cocci          |  51 +++++++++
 scripts/coccinelle/api/nodemask.cocci         |  51 +++++++++
 24 files changed, 256 insertions(+), 67 deletions(-)
 create mode 100644 scripts/coccinelle/api/bitmap.cocci
 create mode 100644 scripts/coccinelle/api/cpumask.cocci
 create mode 100644 scripts/coccinelle/api/nodemask.cocci

-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ