Skip to content

refcount_t and various related bits

Peter Zijlstra kernel-hardening lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5refcount_t: A special purpose refcount typeinclude/linux/refcount.h lib/Kconfig.debug+307 -02 replies
2/5kref: Implement using refcount_tinclude/linux/kref.h+11 -181 reply
3/5x86: Implement __WARN using UD2arch/x86/include/asm/bug.h arch/x86/kernel/dumpstack.c arch/x86/kernel/traps.c+56 -160 replies
4/5atomic: Introduce atomic_try_cmpxchg()arch/x86/include/asm/atomic.h arch/x86/include/asm/cmpxchg.h include/linux/atomic.h+97 -03 replies
5/5refcount: Use atomic_try_cmpxchg()include/linux/refcount.h+12 -210 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchGreg Kroah-Hartman
1/5
2/5A-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] refcount_t and various related bits

Hi all,

Here is the refcount_t patch and some related bits that I hacked up the past few days while playing with it in order to make it generate less aweful code (on x86_64).

I think we can start by merging the refcount_t and kref patches, the rest can come later if so desired. New here is the Kconfig knob to turn warnings off -- it significantly reduces the generated code while still avoiding the UAF.

I added David Howells because both he and hpa have suggested something like try_cmpxchg() in the past.