From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v4] xmalloc: add support for checking the pool integrity Date: Wed, 17 Dec 2014 10:11:13 +0000 Message-ID: <549156C1.5000708@citrix.com> References: <1418758405-32200-1-git-send-email-mdontu@bitdefender.com> <549095E3.30202@citrix.com> <5490BAE4.5070108@linaro.org> <5490BFBD.7010809@citrix.com> <5490C22F.4020505@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5490C22F.4020505@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , =?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/14 23:37, Julien Grall wrote: > > > 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? Introducing a new bugframe is precicely what I meant by "this doesn't look hard". x86 currently has one more bugframe than arm, being BUGFRAME_run_fn. At this point, run_in_exception_handler() effectively becomes common. ~Andrew