linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] GICv3: Bounds check redistributor accesses
@ 2017-10-11  9:41 Punit Agrawal
  2017-10-11  9:41 ` [PATCH 1/3] irqchip/gic-v3: Use resource structure to store redistributor regions Punit Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Punit Agrawal @ 2017-10-11  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

While bringing up linux on a platform with GICv3, I ran into a kernel
crash (data abort) due to incorrectly sized GIC redistributor region
in the device tree.

Even though the firmware is expected to provide incorrect information,
crashing on the kernel's part when that is not the case is also not
ideal.

This series adds bounds checking to redistributor accesses. This
prevents the crash. But we can do one better - when the redistributor
region has been exhausted without encountering the last record the
user is warned of this situation. This can be useful for developers
during board bring-up.

Patch 3 is where the bulk of the checking is introduced. The patch is
a bit invasive but there doesn't seem to be a nicer way to isolate the
change given layout of the redistributor.

Feedback welcome.

Thanks,
Punit

Punit Agrawal (3):
  irqchip/gic-v3: Use resource structure to store redistributor regions
  irqchip/gic-v3: Report firmwware provided address in case of error
  irqchip/gic-v3: Bounds check redistributor accesses

 drivers/irqchip/irq-gic-v3.c | 80 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 61 insertions(+), 19 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-13 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11  9:41 [PATCH 0/3] GICv3: Bounds check redistributor accesses Punit Agrawal
2017-10-11  9:41 ` [PATCH 1/3] irqchip/gic-v3: Use resource structure to store redistributor regions Punit Agrawal
2017-10-11  9:41 ` [PATCH 2/3] irqchip/gic-v3: Report firmwware provided address in case of error Punit Agrawal
2017-10-11  9:41 ` [PATCH 3/3] irqchip/gic-v3: Bounds check redistributor accesses Punit Agrawal
2018-03-13 13:38   ` [3/3] " Lokesh Vutla
2018-03-13 14:21     ` Marc Zyngier
2018-03-13 18:49       ` Nishanth Menon
2018-03-13 20:19         ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).