* [POWERPC] Make OF interrupt tree parsing more strict
@ 2006-07-10 6:42 Benjamin Herrenschmidt
2006-07-10 9:24 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2006-07-10 6:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev list, Linus Torvalds, Paul Mackerras
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 <benh@kernel.crashing.org>
Index: linux-irq-work/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:39:08.000000000 +1000
+++ linux-irq-work/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:43:51.000000000 +1000
@@ -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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [POWERPC] Make OF interrupt tree parsing more strict
2006-07-10 6:42 [POWERPC] Make OF interrupt tree parsing more strict Benjamin Herrenschmidt
@ 2006-07-10 9:24 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2006-07-10 9:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev list, Linus Torvalds, Paul Mackerras
On Mon, 2006-07-10 at 16:42 +1000, Benjamin Herrenschmidt wrote:
> 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 <benh@kernel.crashing.org>
Oh, and I forgot here:
From: Segher Boessenkool <segher@kernel.crashing.org>
Sorry about that !
> Index: linux-irq-work/arch/powerpc/kernel/prom_parse.c
> ===================================================================
> --- linux-irq-work.orig/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:39:08.000000000 +1000
> +++ linux-irq-work/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:43:51.000000000 +1000
> @@ -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
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-10 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 6:42 [POWERPC] Make OF interrupt tree parsing more strict Benjamin Herrenschmidt
2006-07-10 9:24 ` Benjamin Herrenschmidt
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).