Skip to content

x86/irq: Plug various vector cleanup races

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14x86/irq: Fix a race in x86_vector_free_irqs()arch/x86/kernel/apic/vector.c+8 -80 replies
2/14x86/irq: Validate that irq descriptor is still activearch/x86/kernel/irq.c+9 -00 replies
3/14x86/irq: Do not use apic_chip_data.old_domain as temporary bufferarch/x86/kernel/apic/vector.c+5 -30 replies
4/14x86/irq: Reorganize the return path in assign_irq_vectorarch/x86/kernel/apic/vector.c+8 -140 replies
5/14x86/irq: Reorganize the search in assign_irq_vectorarch/x86/kernel/apic/vector.c+16 -80 replies
6/14x86/irq: Check vector allocation earlyarch/x86/kernel/apic/vector.c+25 -130 replies
7/14x86/irq: Copy vectormask instead of an AND operationarch/x86/kernel/apic/vector.c+1 -10 replies
8/14x86/irq: Get rid of code duplicationarch/x86/kernel/apic/vector.c+15 -180 replies
9/14x86/irq: Remove offline cpus from vector cleanuparch/x86/kernel/apic/vector.c+6 -20 replies
10/14x86/irq: Clear move_in_progress before sending cleanup IPIarch/x86/kernel/apic/vector.c+3 -10 replies
11/14x86/irq: Remove the cpumask allocation from send_cleanup_vector()arch/x86/kernel/apic/vector.c+3 -130 replies
12/14x86/irq: Remove outgoing CPU from vector cleanup maskarch/x86/kernel/apic/vector.c+16 -20 replies
13/14x86/irq: Call irq_force_move_complete with irq descriptorarch/x86/include/asm/irq.h arch/x86/kernel/apic/vector.c arch/x86/kernel/irq.c+11 -70 replies
14/14x86/irq: Plug vector cleanup racearch/x86/kernel/apic/vector.c+53 -100 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchJoe LawrenceBorislav Petkov
SeriesT-b T-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

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 00/14] x86/irq: Plug various vector cleanup races

Joe reported a nasty race in the vector cleanup code which results in stale irq descriptors in the vector arrays and a potential use after free.

This series addresses this issue, another race which was found and fixed by Jiang related to the same area, plus a cpu hotplug issue which is not related to this.

This lot is intended for stable, but not yet marked so. The diffstat below is rather large, but this is mostly due to extensive commentry which I added in the process.

This is also available via git from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/apic

Thanks,

tglx

---
 include/asm/irq.h    |    5 -
 kernel/apic/vector.c |  221 +++++++++++++++++++++++++++++++++------------------
 kernel/irq.c         |   11 ++
 3 files changed, 158 insertions(+), 79 deletions(-)