All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrey Konovalov <andreyknvl@google.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Mathieu Laurendeau <mat.lau@laposte.net>, Bin Liu <b-liu@ti.com>,
	USB list <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	syzkaller <syzkaller@googlegroups.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Kostya Serebryany <kcc@google.com>,
	Cristopher Lameter <cl@linux.com>
Subject: Re: usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask
Date: Wed, 14 Dec 2016 17:18:23 +0100	[thread overview]
Message-ID: <20161214161823.GQ25573@dhcp22.suse.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1612141100280.2114-100000@iolanthe.rowland.org>

On Wed 14-12-16 11:13:11, Alan Stern wrote:
> On Wed, 14 Dec 2016, Michal Hocko wrote:
> 
> > On Tue 13-12-16 08:33:34, Alan Stern wrote:
> > > On Tue, 13 Dec 2016, Michal Hocko wrote:
[...]
> > > > Well, my point was that it is not really hard to imagine to deplete
> > > > larger contiguous memory blocks (say PAGE_ALLOC_COSTLY_ORDER). Those are
> > > > still causing the OOM killer and chances are that a controlled flood of
> > > > these requests could completely DoS the system.
> > > 
> > > Putting a limit on the total size of a single transfer would prevent 
> > > this.
> > 
> > Dunno, putting a limit to the user visible interface sounds wrong to me.
> 
> In practice, I think the data transfer sizes tend to be not very large.  
> But I could be wrong about that.

That is one part the other is whether a malicious user can abuse this to
DoS the kernel which is the point I am trying to make here. Depleting
non-costly high orders can be quite dangerious so allowing a free ticket
to them to arbitrary user in an arbitrary amount is definitely not good.
-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2016-12-14 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 20:31 usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask Andrey Konovalov
2016-12-12 20:32 ` Andrey Konovalov
2016-12-12 21:00   ` Alan Stern
2016-12-12 21:05   ` Michal Hocko
2016-12-12 21:12     ` Alan Stern
2016-12-13  8:04       ` Michal Hocko
2016-12-13 13:33         ` Alan Stern
2016-12-14  9:10           ` Michal Hocko
2016-12-14 16:13             ` Alan Stern
2016-12-14 16:18               ` Michal Hocko [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=20161214161823.GQ25573@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=andreyknvl@google.com \
    --cc=b-liu@ti.com \
    --cc=balbi@kernel.org \
    --cc=cl@linux.com \
    --cc=deepa.kernel@gmail.com \
    --cc=dvyukov@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kcc@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mat.lau@laposte.net \
    --cc=stern@rowland.harvard.edu \
    --cc=syzkaller@googlegroups.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.