qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: P J P <ppandit@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Leon Alrae <leon.alrae@imgtec.com>, Li Qiang <liqiang6-s@360.cn>,
	Qemu Developers <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending
Date: Wed, 8 Jun 2016 14:38:02 +0800	[thread overview]
Message-ID: <5757BD4A.4070904@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1606071029410.30819@wniryva>



On 2016年06月07日 13:02, P J P wrote:
> +-- On Fri, 3 Jun 2016, P J P wrote --+
> | +-- On Thu, 2 Jun 2016, Peter Maydell wrote --+
> | | >      case MIPSNET_TX_DATA_COUNT:
> | | > -       s->tx_count = (val <= MAX_ETH_FRAME_SIZE) ? val : 0;
> | | > +        s->tx_count = (val < MAX_ETH_FRAME_SIZE) ? val : MAX_ETH_FRAME_SIZE;
> | | >          s->tx_written = 0;
> | |
> | | This is a behaviour change -- the register will now read
> | | back as MAX_ETH_FRAME_SIZE rather than 0 if written with
> | | an overlarge value.
> |
> |   IIUC, 's->tx_count' indicates expected packet data length to be processed.
> | Maybe if this value was zero, packet was not to be sent; not sure.
> |
> | | Do we have any documentation on how this (simulated)
> | | device is supposed to behave in this case?
>
> @Jason: @Leon: ping...!
> --
> Prasad J Pandit / Red Hat Product Security Team
> 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

I could not find its docs, and the driver were even removed from linux 
kernel since it was no longer supported.

We need to fix this issue, but instead of changing the behavior, is it 
better the add a check in MIPSNET_TX_DATA_BUFFER?

Thanks

  reply	other threads:[~2016-06-08  6:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02  6:44 [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending P J P
2016-06-02  9:28 ` Peter Maydell
2016-06-02 19:45   ` P J P
2016-06-07  5:02     ` P J P
2016-06-08  6:38       ` Jason Wang [this message]
2016-06-08  7:47         ` P J P
2016-06-13  8:35   ` Aurelien Jarno
2016-06-14  3:48     ` Jason Wang

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=5757BD4A.4070904@redhat.com \
    --to=jasowang@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=leon.alrae@imgtec.com \
    --cc=liqiang6-s@360.cn \
    --cc=peter.maydell@linaro.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.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).