[PATCH 00/17] Add __attribute_const__ to ffs()-family implementations

patchwork-bot+linux-riscv at kernel.org patchwork-bot+linux-riscv at kernel.org
Thu Oct 9 12:07:04 AEDT 2025


Hello:

This series was applied to riscv/linux.git (for-next)
by Kees Cook <kees at kernel.org>:

On Mon,  4 Aug 2025 09:43:56 -0700 you wrote:
> Hi,
> 
> While tracking down a problem where constant expressions used by
> BUILD_BUG_ON() suddenly stopped working[1], we found that an added static
> initializer was convincing the compiler that it couldn't track the state
> of the prior statically initialized value. Tracing this down found that
> ffs() was used in the initializer macro, but since it wasn't marked with
> __attribute_const__, the compiler had to assume the function might
> change variable states as a side-effect (which is not true for ffs(),
> which provides deterministic math results).
> 
> [...]

Here is the summary with links:
  - [01/17] KUnit: Introduce ffs()-family tests
    (no matching commit)
  - [02/17] bitops: Add __attribute_const__ to generic ffs()-family implementations
    (no matching commit)
  - [03/17] csky: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [04/17] x86: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [05/17] powerpc: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [06/17] sh: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [07/17] alpha: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [08/17] hexagon: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [09/17] riscv: Add __attribute_const__ to ffs()-family implementations
    https://git.kernel.org/riscv/c/c51c26e687a6
  - [10/17] openrisc: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [11/17] m68k: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [12/17] mips: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [13/17] parisc: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [14/17] s390: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [15/17] xtensa: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [16/17] sparc: Add __attribute_const__ to ffs()-family implementations
    (no matching commit)
  - [17/17] KUnit: ffs: Validate all the __attribute_const__ annotations
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




More information about the Linuxppc-dev mailing list