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

Ananth N Mavinakayanahalli ananth at in.ibm.com
Wed Feb 11 15:20:41 AEDT 2015


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.

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

Ananth



More information about the Skiboot mailing list