From: Eric Dumazet <eric.dumazet@gmail.com>
To: Zhu Yi <yi.zhu@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Shi, Alex" <alex.shi@intel.com>
Subject: Re: [RFC PATCH] accounting for socket backlog
Date: Mon, 01 Mar 2010 03:29:45 +0100 [thread overview]
Message-ID: <1267410585.9082.115.camel@edumazet-laptop> (raw)
In-Reply-To: <1267409827.23196.44.camel@debian>
Le lundi 01 mars 2010 à 10:17 +0800, Zhu Yi a écrit :
> On Fri, 2010-02-26 at 21:12 +0800, Eric Dumazet wrote:
> > Well, if you have one processor, and a process doesnt want to yield
> > the cpu (apart of sofirq of course that is filling the backlog while
> > your process tries to empty it), your machine is dead. This is
> > critical too :)
>
> If you only have one CPU, this won't happen. Because while the receiver
> is busy processing the backlog, no senders will have the chance to be
> scheduled to Tx more. And with the limited backlog, it won't take long
> for the receiver to finish processing all the frames in the backlog.
>
You focus on the case you Intel guys discovered the flaw, using loopback
interface. I am concerned with a DOS situation, when some bad guys on
your LAN sends a flood on your machine, using a real 10Gb NIC.
I was concerned by two things :
- One process being stuck forever in the __release_sock(), basically
stopping an application from performing progress. This is a DOS problem.
Our kernel is potentially affected. We probably should do something to
avoid this problem. But I am _not_ saying this should be done by your
patch, it is probably possible to address it in an independant patch.
- One process being stuck in __release_sock() and not yield to other
processes. This is not the case since we call the cond_resched_sofirq()
function that permits other high priority task to get the CPU.
One more point :
If you remember my previous mail, I suggested cleaning the len field in
__release_sock(). This way, you can provide a first patch, protocol
agnostic, then provide further patch for UDP V4, another patch for UDP
V6, etc... to have a clean path and make the resolution of the bugs more
self explaining and not as a whole and big patch.
Thanks
next prev parent reply other threads:[~2010-03-01 2:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 3:13 [RFC PATCH] accounting for socket backlog Zhu Yi
2010-02-25 8:31 ` David Miller
2010-02-26 2:44 ` Zhu Yi
2010-02-26 5:52 ` David Miller
2010-02-25 11:24 ` Eric Dumazet
2010-02-26 2:34 ` Zhu Yi
2010-02-26 13:12 ` Eric Dumazet
2010-03-01 2:17 ` Zhu Yi
2010-03-01 2:29 ` Eric Dumazet [this message]
2010-03-01 3:03 ` Zhu Yi
2010-03-01 3:12 ` Eric Dumazet
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=1267410585.9082.115.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=alex.shi@intel.com \
--cc=netdev@vger.kernel.org \
--cc=yi.zhu@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