Re: [PATCH 1/2] x86: fix panic when handling "mem={invalid}" param

From: H. Peter Anvin
Date: Fri Feb 04 2011 - 15:20:54 EST


On 02/04/2011 12:19 PM, Yinghai Lu wrote:
>>
>> All he looks at is when the value returned is zero. It wouldn't be zero
>> for any actual value, including mem=32M.
>>
>
> when user pass wrong parameter like less 128M, kernel will not boot either.
> Do we need to sanity check for that?
>

We could check for the value being smaller than the relocated value of
_end. That is probably the smallest *fixed* value we can assign.

-hpa

--
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/