DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: huawei.xie@intel.com, dev@dpdk.org, vkaplans@redhat.com,
	mst@redhat.com, stephen@networkplumber.org
Subject: Re: [dpdk-dev] [PATCH v2] vhost: Add indirect descriptors support to the TX path
Date: Fri, 23 Sep 2016 09:33:01 +0200	[thread overview]
Message-ID: <769e962c-75f2-a283-54eb-72410565151a@redhat.com> (raw)
In-Reply-To: <20160923072915.GW23158@yliu-dev.sh.intel.com>



On 09/23/2016 09:29 AM, Yuanhan Liu wrote:
> On Fri, Sep 23, 2016 at 09:16:49AM +0200, Maxime Coquelin wrote:
>> +		if (vq->desc[desc_indexes[i]].flags & VRING_DESC_F_INDIRECT) {
>> +			if (unlikely(!(dev->features &
>> +					(1ULL << VIRTIO_RING_F_INDIRECT_DESC)))) {
>> +				RTE_LOG(ERR, VHOST_DATA,
>> +						"Indirect desc but feature not negotiated.\n");
>> +				break;
>> +			}
>
> I thought the alignment we got before was to follow linux kernel: check
> nested indirect only?
Right... I did the opposite..
Fixing this right now.

>
>> +
>> +			desc = (struct vring_desc *)gpa_to_vva(dev,
>> +					vq->desc[desc_indexes[i]].addr);
>
> I think we should check the desc addr here. Otherwise we may crash here
> if a malicious guest fills some bad addresses.
Good point!

Thanks,
Maxime
>
> 	--yliu
>

  reply	other threads:[~2016-09-23  7:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  7:16 Maxime Coquelin
2016-09-23  7:29 ` Yuanhan Liu
2016-09-23  7:33   ` Maxime Coquelin [this message]
2016-09-23 18:24 ` Stephen Hemminger
2016-09-23 18:31   ` Michael S. Tsirkin
2016-09-23 20:28     ` Stephen Hemminger
2016-09-25  1:02       ` Michael S. Tsirkin
2016-09-25  1:50         ` Stephen Hemminger
2016-09-25  1:53           ` Michael S. Tsirkin

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=769e962c-75f2-a283-54eb-72410565151a@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=mst@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=vkaplans@redhat.com \
    --cc=yuanhan.liu@linux.intel.com \
    /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).