xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Julien Grall <julien.grall@arm.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH for-4.10] common/multicall: Increase debugability for bad hypercalls
Date: Thu, 2 Nov 2017 14:03:52 +0000	[thread overview]
Message-ID: <7a8fc6fa-be12-7652-b6d0-c7809cf1b9a3@linaro.org> (raw)
In-Reply-To: <1509470332-5713-1-git-send-email-andrew.cooper3@citrix.com>

Hi Andrew,

On 31/10/17 17:18, Andrew Cooper wrote:
> While investigating an issue (in a new codepath I'd introduced, as it turns
> out), leaving interrupts disabled manifested as a subsequent op in the
> multicall failing a check_lock() test.
> 
> The codepath would have hit the ASSERT_NOT_IN_ATOMIC on the return-to-guest
> path, had it not hit the check_lock() first.
> 
> Call ASSERT_NOT_IN_ATOMIC() after each operation in the multicall, to make
> failures more obvious.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: George Dunlap <George.Dunlap@eu.citrix.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Tim Deegan <tim@xen.org>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Julien Grall <julien.grall@arm.com>
> 
> As with the related check_lock() patch, this only affects debug builds, so is
> a very low risk change for 4.10

Release-acked-by: Julien Grall <julien.grall@linaro.org>

With a couple of typos below.

> ---
>   xen/common/multicall.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/xen/common/multicall.c b/xen/common/multicall.c
> index c7af4e0..d98e59d 100644
> --- a/xen/common/multicall.c
> +++ b/xen/common/multicall.c
> @@ -66,6 +66,13 @@ do_multicall(
>   
>           disp = arch_do_multicall_call(mcs);
>   
> +        /*
> +         * In the unlikley event that a hypercall has left interrupts,

s/unlikley/unlikely/

> +         * spinlocks, or other things in a bad way, continuting the multicall

s/continuting/continuing/

> +         * will typically lead to far more subtle issues to debug.
> +         */
> +        ASSERT_NOT_IN_ATOMIC();
> +
>   #ifndef NDEBUG
>           {
>               /*
> 

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      parent reply	other threads:[~2017-11-02 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 17:18 [PATCH for-4.10] common/multicall: Increase debugability for bad hypercalls Andrew Cooper
2017-10-31 17:25 ` George Dunlap
2017-10-31 17:27 ` Wei Liu
2017-11-02 14:03 ` Julien Grall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a8fc6fa-be12-7652-b6d0-c7809cf1b9a3@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).