[Skiboot] [PATCH 05/15] libc/string: Add memcpy_ci
bsingharora at gmail.com
Fri Sep 16 16:14:08 AEST 2016
On 14/09/16 19:17, Stewart Smith wrote:
> Balbir Singh <bsingharora at gmail.com> writes:
>>> + unsigned long int destp = (long int) destpp;
>>> + unsigned long int srcp = (long int) srcpp;
>>> + /* copy just a few bytes to make dst aligned */
>>> + i = len % block;
>> I would do some basic sanity tests around len, like
>> is len > RAM size?
> We could re-use opal_addr_valid() in a bunch of libc actually.. perhaps
> just leading to an assert()?
> Odds are if you're passing an invalid pointer into memcpy() the best
> thing to do is set fire to everything rather than limp and continue?
More information about the Skiboot