From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4] xmalloc: add support for checking the pool integrity Date: Tue, 16 Dec 2014 23:37:19 +0000 Message-ID: <5490C22F.4020505@linaro.org> References: <1418758405-32200-1-git-send-email-mdontu@bitdefender.com> <549095E3.30202@citrix.com> <5490BAE4.5070108@linaro.org> <5490BFBD.7010809@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5490BFBD.7010809@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , =?UTF-8?B?TWloYWkgRG9uyJt1?= , xen-devel@lists.xen.org Cc: keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, jbeulich@suse.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org On 16/12/2014 23:26, Andrew Cooper wrote: > On 16/12/2014 23:06, Julien Grall wrote: >> Hi, >> >> On 16/12/2014 20:28, Andrew Cooper wrote: >>> I suspect you also would be better, and certainly more brief, with >>> "run_in_exception_handler(show_stack)" instead, which will just print a >>> stack trace, but nothing more. >> >> FIY, run_in_exception_handler doesn't exists on ARM. >> >> Regards, >> > > In which case it even more lucky that __bug() and __warn() are orphaned > functions, as they don't work correctly on arm. Even more reason to > remove them. > > It doesn't look like run_in_exception_handler() would be hard to add to > arm at all. It already has broadly similar bug/warn/assert infrastructure. It's more difficult than you think. For ARM we had to use a different infrastructure than x86 to setup the BUG_FRAME. This is because %c is not correctly support on most ARM compiler today. So I don't think it worth to spend time on it just for one call. How about introducing dump_stack() which would call run_in_exception_handler() on x86 and something different (maybe a new BUG_FRAME type) on ARM? Regards, -- Julien Grall