public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] Optimize select/poll by putting small data sets on the stack
Date: Wed, 4 Jan 2006 01:48:42 +0100	[thread overview]
Message-ID: <200601040148.42765.ak@suse.de> (raw)
In-Reply-To: <43BB1A29.7090102@cosmosbay.com>

On Wednesday 04 January 2006 01:43, Eric Dumazet wrote:

> And I would like to pinpoint that set_fd_set() implementation seems *buggy*
> :
>
> It should not use __copy_to_user() but the real one (copy_to_user())
> because the calling thread could have slept in do_select() and another
> thread played mm games during this sleep.

__ only skips the access_ok which checks the kernel/user boundary, and the 
kernel/user boundary doesn't change even while sleeping.

On very early 386s it did something more to work around a CPU bug, but that is 
racy on multithreaded processes in any case. Not really worth caring about.

Also I doubt any such machines are left in working condition. That old 
workaround code could be probably safely removed by now.

-Andi

      reply	other threads:[~2006-01-04  0:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 20:58 [PATCH] [RFC] Optimize select/poll by putting small data sets on the stack Andi Kleen
2006-01-03 22:14 ` Eric Dumazet
2006-01-03 23:05   ` Andi Kleen
2006-01-03 23:07   ` Eric Dumazet
2006-01-03 23:13     ` Andi Kleen
2006-01-03 22:22 ` Jesper Juhl
2006-01-03 23:07   ` Andi Kleen
2006-01-04  0:28 ` Arnd Bergmann
2006-01-04  0:33   ` Andi Kleen
2006-01-04  0:43   ` Eric Dumazet
2006-01-04  0:48     ` Andi Kleen [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=200601040148.42765.ak@suse.de \
    --to=ak@suse.de \
    --cc=arnd@arndb.de \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.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