Skip to content

Fix arm64 issues highlighted by sparse and smatch

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11KVM: ARM/arm64: fix non-const declaration of function returning constarch/arm/include/asm/kvm_host.h arch/arm64/include/asm/kvm_host.h+2 -22 replies
2/11KVM: ARM/arm64: fix broken __percpu annotationarch/arm/kvm/arm.c arch/arm64/include/asm/kvm_host.h+2 -21 reply
3/11KVM: ARM/arm64: avoid returning negative error code as boolarch/arm/kvm/coproc.c arch/arm64/kvm/sys_regs.c+2 -22 replies
4/11KVM: ARM/arm64: return -EFAULT if copy_from_user fails in set_timer_regarch/arm/kvm/guest.c arch/arm64/kvm/guest.c+2 -22 replies
5/11KVM: vgic: return int instead of bool when checking I/O rangesvirt/kvm/arm/vgic.c+1 -12 replies
6/11KVM: vgic: declare probe function pointer as constvirt/kvm/arm/vgic.c+2 -22 replies
7/11irqchip: gic: make gic_default_routable_irq_domain_ops staticdrivers/irqchip/irq-gic.c+1 -11 reply
8/11irqchip: gic-v3: declare rdist as __percpu pointer to __iomem pointerdrivers/irqchip/irq-gic-v3.c+1 -11 reply
9/11arm64: ptrace: fix compat hardware watchpoint reportingarch/arm64/include/asm/hw_breakpoint.h arch/arm64/kernel/ptrace.c+2 -20 replies
10/11arm64: ptrace: fix compat reg getter/setter return valuesarch/arm64/kernel/ptrace.c+7 -30 replies
11/11arm64: perf: don't rely on layout of pt_regs when grabbing sp or pcarch/arm64/kernel/perf_regs.c+6 -01 reply

Reviews trailers per patch

9 of 11 patches have a Reviewed-by or Acked-by.

PatchMarc ZyngierChristoffer DallJean Pihet
1/11A-b A-b
2/11A-b
3/11A-b A-b
4/11A-b A-b
5/11A-b A-b
6/11A-b A-b
7/11A-b
8/11A-b
9/11
10/11
11/11A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/11] Fix arm64 issues highlighted by sparse and smatch

Hi all,

After the static checking talk at kernel summit, I felt empowered to go and run sparse and smatch over the arm64 defconfig. As I anticipated, this spotted a few issues in the arch code, so I've fixed up the ones that aren't just noise in this series. Most are simply incorrect address space annotations, but fixing these is useful for spotting real issues in the future.

I don't think any of these fix critical bugs, but they all deserve to be addressed. I tagged the compat watchpoint fix for stable, as that code has been broken since we merged the architecture port.

Cheers,

Will

Cc Christoffer Dall <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Jean Pihet <[email protected]>

--->8

Will Deacon (11):
KVM: ARM/arm64: fix non-const declaration of function returning const
KVM: ARM/arm64: fix broken __percpu annotation
KVM: ARM/arm64: avoid returning negative error code as bool
KVM: ARM/arm64: return -EFAULT if copy_from_user fails in
set_timer_reg
KVM: vgic: return int instead of bool when checking I/O ranges
KVM: vgic: declare probe function pointer as const
irqchip: gic: make gic_default_routable_irq_domain_ops static
irqchip: gic-v3: declare rdist as __percpu pointer to __iomem pointer
arm64: ptrace: fix compat hardware watchpoint reporting
arm64: ptrace: fix compat reg getter/setter return values
arm64: perf: don't rely on layout of pt_regs when grabbing sp or pc

 arch/arm/include/asm/kvm_host.h        |  2 +-
 arch/arm/kvm/arm.c                     |  2 +-
 arch/arm/kvm/coproc.c                  |  2 +-
 arch/arm/kvm/guest.c                   |  2 +-
 arch/arm64/include/asm/hw_breakpoint.h |  1 -
 arch/arm64/include/asm/kvm_host.h      |  4 ++--
 arch/arm64/kernel/perf_regs.c          |  6 ++++++
 arch/arm64/kernel/ptrace.c             | 13 +++++++++----
 arch/arm64/kvm/guest.c                 |  2 +-
 arch/arm64/kvm/sys_regs.c              |  2 +-
 drivers/irqchip/irq-gic-v3.c           |  2 +-
 drivers/irqchip/irq-gic.c              |  2 +-
 virt/kvm/arm/vgic.c                    |  6 +++---
 13 files changed, 28 insertions(+), 18 deletions(-)
Signature · 1 line
2.1.0.rc1