mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jamie Lokier <jamie@shareable.org>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, Ulrich Drepper <drepper@redhat.com>
Subject: Re: [patch] futex API cleanups, futex-api-cleanup-2.5.69-A2
Date: Tue, 20 May 2003 10:39:38 +1000	[thread overview]
Message-ID: <20030520010913.3300F2C05E@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 20 May 2003 00:33:53 +0100." <20030519233353.GD13706@mail.jlokier.co.uk>

In message <20030519233353.GD13706@mail.jlokier.co.uk> you write:
> Ingo Molnar wrote:
> > FUTEX_FD is an instant DoS, it allows the pinning of one page per file
> > descriptor, per thread. With a default limit of 1024 open files per
> > thread, and 256 threads (on a sane/conservative setup), this means 1 GB of
> > RAM can be pinned down by a normal unprivileged user.
> 
> The correct solution [;)] is EP_FUTEX - allow a futex to be specified
> as the source of an epoll event.

Hi Jamie!

No, you don't understand (or maybe you were being facetious 8).

A normal futex blocks: ie. you can only have one futex being slept on
per process, so pinning a page is probably fine.

The NGPT guys wanted to allow waiting on more than one futex per
process.  If you want to allow this through *any* mechanism, you have to:

1) Allocate something for each futex.  The normal case uses the stack,
   so never fails.

2) Control the number which can be used at once.

The current implementation needs a tighter #2.

Cheers,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-05-20  0:56 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19  9:31 [patch] futex requeueing feature, futex-requeue-2.5.69-D3 Ingo Molnar
2003-05-19 10:10 ` Christoph Hellwig
2003-05-19 10:16   ` Ingo Molnar
2003-05-19 11:49     ` Christoph Hellwig
2003-05-19 12:33       ` [patch] futex API cleanups, futex-api-cleanup-2.5.69-A2 Ingo Molnar
2003-05-19 12:51         ` Ingo Molnar
2003-05-19 14:47         ` bert hubert
2003-05-19 16:02           ` Ingo Molnar
2003-05-19 15:18         ` Linus Torvalds
2003-05-19 16:06           ` Ingo Molnar
2003-05-19 23:33             ` Jamie Lokier
2003-05-20  0:39               ` Rusty Russell [this message]
2003-05-20  1:14                 ` Davide Libenzi
2003-05-20  1:44                   ` Jamie Lokier
2003-05-20 16:54                     ` Davide Libenzi
2003-05-20 17:59                       ` Jamie Lokier
2003-05-21 23:56                         ` Davide Libenzi
2003-05-20  1:50                 ` Jamie Lokier
2003-05-20  0:15             ` Rusty Russell
2003-05-20  0:08   ` [patch] futex requeueing feature, futex-requeue-2.5.69-D3 Rusty Russell
2003-05-20  0:31     ` Valdis.Kletnieks
2003-05-19 10:23 ` Andrew Morton
2003-05-19 10:30   ` [patch] futex requeueing feature, futex-requeue-2.5.69-D4 Ingo Molnar
2003-05-20  0:04 ` [patch] futex requeueing feature, futex-requeue-2.5.69-D3 Rusty Russell
2003-05-20  0:40   ` Ulrich Drepper
2003-05-20  1:46     ` Rusty Russell
2003-05-20  2:11       ` Ulrich Drepper
2003-05-20  6:27       ` Ingo Molnar
2003-05-20  6:56         ` Christoph Hellwig
2003-05-20  8:57           ` Rusty Russell
2003-05-20  9:03             ` Ingo Molnar
2003-05-20  9:51               ` Christoph Hellwig
2003-05-20 12:56                 ` [patch] futex patches, futex-2.5.69-A2 Ingo Molnar
2003-05-20 14:08                   ` Christoph Hellwig
2003-05-20 16:02                     ` Ingo Molnar
2003-05-20 19:55                       ` Christoph Hellwig
2003-05-21  5:06                         ` Martin Schlemmer
2003-05-21  6:31                           ` Christoph Hellwig
2003-05-20 15:46                 ` [patch] futex requeueing feature, futex-requeue-2.5.69-D3 Linus Torvalds
2003-05-20  9:12           ` Ingo Oeser
2003-05-20 15:41           ` Linus Torvalds
2003-05-20  8:55         ` Rusty Russell
2003-05-20  6:19   ` Ingo Molnar

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=20030520010913.3300F2C05E@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=drepper@redhat.com \
    --cc=hch@infradead.org \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

Powered by JetHome