Greg Kurz 827b17c468 spapr: sanity check size of the CAS buffer
The CAS buffer is provided by SLOF. A broken SLOF could pass a silly
size: either smaller than the diff header, in which case the current
code will try to allocate 16 Exabytes of memory and g_malloc0() will
abort, or bigger than the maximum memory provisioned for SLOF (ie,
40 Megabytes), which doesn't make sense. Both cases indicate that
SLOF has a bug.

Let's print out an explicit error message and exit since rebooting as
we do with other errors would only result in a reset loop.

Signed-off-by: Greg Kurz <groug@kaod.org>
[dwg: Fix format specifier that broke 32-bit builds]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-10-17 10:34:00 +11:00
..
2016-10-04 13:28:07 +01:00
2017-10-15 05:54:40 +03:00
2017-08-02 18:30:13 -03:00
2017-10-15 05:54:40 +03:00
2016-01-29 15:07:25 +00:00
2017-09-21 16:36:56 +01:00
2017-09-27 11:35:59 +01:00
2017-10-13 07:34:33 -04:00
2017-08-30 18:23:25 +02:00