Make OF interrupt tree parsing more strict
This patch fixes a bit of boundchecking in the new Open Firmware interrupt tree parsing code. It's important that it fails when things aren't correct in order to trigger fallback mecanisms that are necessary to make some machines work properly.
arch/powerpc/kernel/prom_parse.c +1 -1
@@ -881,7 +881,7 @@ intsize = *tmp;/* Check index */ -if (index * intsize >= intlen) +if ((index +1 ) * intsize > intlen)return -EINVAL ;/* Get new specifier and map it */
Quoted 6 lines · Benjamin Herrenschmidt
This patch fixes a bit of boundchecking in the new Open Firmware interrupt tree parsing code. It's important that it fails when things aren't correct in order to trigger fallback mecanisms that are necessary to make some machines work properly.
Signed-off-by Benjamin Herrenschmidt <[email protected]>
Oh, and I forgot here:
From: Segher Boessenkool <[email protected]>
Sorry about that !
Quoted 19 lines
Index:
linux-irq-work/arch/powerpc/kernel/prom_parse.c
===================================================================arch/powerpc/kernel/prom_parse.c +1
-1@@ -881,7 +881,7 @@ intsize = *tmp;/* Check index */ -if (index * intsize >= intlen) +if ((index +1 ) * intsize > intlen)return -EINVAL ;/* Get new specifier and map it */ _______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev