Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164831177
D41566.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41566.diff
View Options
diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c
--- a/sys/arm64/arm64/gicv3_its.c
+++ b/sys/arm64/arm64/gicv3_its.c
@@ -1277,21 +1277,44 @@
/* No device table */
if (sc->sc_dev_table_idx < 0) {
- if (devid < (1 << sc->sc_devbits))
- return (true);
- return (false);
+ if (devid >= (1 << sc->sc_devbits)) {
+ if (bootverbose) {
+ device_printf(sc->dev,
+ "%s: Device out of range for hardware "
+ "(%x >= %x)\n", __func__, devid,
+ 1 << sc->sc_devbits);
+ }
+ return (false);
+ }
+ return (true);
}
ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx];
/* Check the devid is within the table limit */
if (!ptable->ptab_indirect) {
- return (devid < ptable->ptab_l1_nidents);
+ if (devid >= ptable->ptab_l1_nidents) {
+ if (bootverbose) {
+ device_printf(sc->dev,
+ "%s: Device out of range for table "
+ "(%x >= %x)\n", __func__, devid,
+ ptable->ptab_l1_nidents);
+ }
+ return (false);
+ }
+
+ return (true);
}
/* Check the devid is within the allocated range */
index = devid / ptable->ptab_l2_nidents;
- if (index >= ptable->ptab_l1_nidents)
+ if (index >= ptable->ptab_l1_nidents) {
+ if (bootverbose) {
+ device_printf(sc->dev,
+ "%s: Index out of range for table (%x >= %x)\n",
+ __func__, index, ptable->ptab_l1_nidents);
+ }
return (false);
+ }
table = (uint64_t *)ptable->ptab_vaddr;
/* We have an second level table */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 6:11 AM (8 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36004488
Default Alt Text
D41566.diff (1 KB)
Attached To
Mode
D41566: gicv3: Add logging for when its_device_alloc fails
Attached
Detach File
Event Timeline
Log In to Comment