[Skiboot] [PATCH] Make abort() update sp attn area (like assert does)

Stewart Smith stewart at linux.vnet.ibm.com
Wed Feb 11 16:10:26 AEDT 2015


Ananth N Mavinakayanahalli <ananth at in.ibm.com> writes:
> On Wed, Feb 11, 2015 at 12:19:57PM +1100, Stewart Smith wrote:
>> Why not this patch instead? If no objections, I'll apply it. I do think
>> we could probably change some of our abort()s to be the assert of the
>> condition that fails though.
>
> This is a simpler approach, yes.

Cool, I'll merge.

>> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
>> ---
>>  core/utils.c          |    4 ++--
>>  libc/include/stdlib.h |    8 +++++++-
>>  2 files changed, 9 insertions(+), 3 deletions(-)
>> 
>> diff --git a/core/utils.c b/core/utils.c
>> index 1a81ae2..9c94ecc 100644
>> --- a/core/utils.c
>> +++ b/core/utils.c
>> @@ -26,10 +26,10 @@ unsigned long __stack_chk_guard = 0xdeadf00dbaad300d;
>>  void __noreturn assert_fail(const char *msg)
>>  {
>>  	prlog(PR_EMERG, "Assert fail: %s\n", msg);
>> -	abort();
>> +	_abort();
>
> You probably also need _abort() in the stack protector code.

I think it ends up being okay as we do want to update attn area then,
and now abort() will do that for us (previously it didn't).



More information about the Skiboot mailing list