All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bertrand Marquis <Bertrand.Marquis@arm.com>
To: Julien Grall <julien@xen.org>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH] xen/iommu: dt: Check the return value of xsm_deassign_dtdevice()
Date: Tue, 24 May 2022 07:54:49 +0000	[thread overview]
Message-ID: <A7BBA491-2CF9-4D4B-A7C3-56AB004EF842@arm.com> (raw)
In-Reply-To: <20220522165900.83104-1-julien@xen.org>

Hi Julien,

> On 22 May 2022, at 17:59, Julien Grall <julien@xen.org> wrote:
> 
> From: Julien Grall <jgrall@amazon.com>
> 
> xsm_deasign_dtdevice() will indicate whether the caller is allowed
> to issue the operation. So the return value has to be checked.
> 
> Spotted by clang static analyzer.
> 
> Fixes: fe36cccc483c ("xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device")
> Signed-off-by: Julien Grall <jgrall@amazon.com>

With the typo spotted by Michal solved (can be done on commit):
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> 
> ---
> 
> Platform device-passthrough is not security supported. Hence why this is
> sent directly to xen-devel.
> ---
> xen/drivers/passthrough/device_tree.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/passthrough/device_tree.c b/xen/drivers/passthrough/device_tree.c
> index 98f2aa0dad68..1c32d7b50cce 100644
> --- a/xen/drivers/passthrough/device_tree.c
> +++ b/xen/drivers/passthrough/device_tree.c
> @@ -269,6 +269,8 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d,
>             break;
> 
>         ret = xsm_deassign_dtdevice(XSM_HOOK, d, dt_node_full_name(dev));
> +        if ( ret )
> +            break;
> 
>         if ( d == dom_io )
>             return -EINVAL;
> -- 
> 2.32.0
> 
> 



  parent reply	other threads:[~2022-05-24  7:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-22 16:59 [PATCH] xen/iommu: dt: Check the return value of xsm_deassign_dtdevice() Julien Grall
2022-05-23  7:00 ` Michal Orzel
2022-05-23 20:01   ` Julien Grall
2022-05-24  7:54 ` Bertrand Marquis [this message]
2022-05-25  8:53   ` Julien Grall

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=A7BBA491-2CF9-4D4B-A7C3-56AB004EF842@arm.com \
    --to=bertrand.marquis@arm.com \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.