amd64_edac making improper assumptions?

From: Jan Beulich
Date: Fri Sep 18 2009 - 09:02:34 EST


Doug, Borislav,

the sizing of pvt_lookup[] and mci_lookup[] is done based on a config
setting (CONFIG_NODES_SHIFT), and the indexing happens using the
raw value read from hardware without any bounds checking. Hence,
running a kernel with e.g. !CONFIG_NUMA on a multi-socket system
would happily access other than the first and only array element.

Likewise, the use of rdmsr_on_cpu() doesn't seem to do what is
intended when !CONFIG_NUMA.

Also, assuming you can use cpumask_of_node() directly on the
node ID read from hardware seems bogus (even in general, but
namely again when MAX_NUMNODES is less than the actual number
of nodes).

Thanks for your explanation,
Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/