[siemens/jailhouse] 089f61: arm: Fix off-by-one in gic_probe_cpu_id

1 view
Skip to first unread message

GitHub

unread,
Feb 7, 2015, 5:41:35 AM2/7/15
to jailho...@googlegroups.com
Branch: refs/heads/coverity_scan
Home: https://github.com/siemens/jailhouse
Commit: 089f61a8cc2b982c38f7d379290e5e2eaba68d3c
https://github.com/siemens/jailhouse/commit/089f61a8cc2b982c38f7d379290e5e2eaba68d3c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-02-07 (Sat, 07 Feb 2015)

Changed paths:
M hypervisor/arch/arm/gic-common.c

Log Message:
-----------
arm: Fix off-by-one in gic_probe_cpu_id

We support up to 8 CPUs, not 9. Avoid future overflows by using the
actual size of target_cpu_map as limit.

This addresses Coverity finding CID 21114.

Adjust comment wordings at this chance as well.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: eb6aa547add6b145b271f985d5b617de87a5557a
https://github.com/siemens/jailhouse/commit/eb6aa547add6b145b271f985d5b617de87a5557a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-02-07 (Sat, 07 Feb 2015)

Changed paths:
M hypervisor/arch/arm/gic-v2.c

Log Message:
-----------
arm: Stop relying on little endian ordering for GICH_ELSRn scan

Arrange ELSR0 and ELSR1 in an array of unsigned longs to avoid that the
code breaks on a big endian target.

This addresses Coverity finding CID 21112.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: dd3ef73c56c3fe0c8e459a549d720492560ae00f
https://github.com/siemens/jailhouse/commit/dd3ef73c56c3fe0c8e459a549d720492560ae00f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-02-07 (Sat, 07 Feb 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/irqchip.h

Log Message:
-----------
arm: Fix spi_in_cell for SPIs 32..63

The cell configuration format restricts us to 64 SPIs this far. Make
sure that we properly test the range of 32 to 63 and avoid overflows due
to 32-bit word width. As Jailhouse provides no __aeabi_llsr, extract
high and low words first, then scan within 32 bits.

This addresses Coverity finding CID 21110.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Compare: https://github.com/siemens/jailhouse/compare/5245980e32dd...dd3ef73c56c3
Reply all
Reply to author
Forward
0 new messages