linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: Re: [RFC] [PATCH]kanoj-mm15-2.3.10 Fix ia32 SMP/clone pte races
Date: Thu, 15 Jul 1999 18:09:56 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.9907151804120.1146-100000@penguin.transmeta.com> (raw)
In-Reply-To: <199907160024.RAA11667@google.engr.sgi.com>


On Thu, 15 Jul 1999, Kanoj Sarcar wrote:
> 
> Note that an alternate solution to the ia32 SMP pte race is to change 
> PAGE_SHARED in include/asm-i386/pgtable.h to not drop in _PAGE_RW.

That is imho preferable to the "freeze_range" thing.

However, the _most_ preferable solution is probably just to update the
page tables with locked read-modify-write operations. Not fun, but not
horrible either. We'll have to change some of the interfaces, but it's
probably not too bad.

Note that for "unmap()" and for a lot of the special cases, I don't care
about the race at all. If some thread writes to the mapping at the same
time as it is being unmapped, tough luck. If we lose the dirty bit it's
not our problem: a program that races on unmap gets what it deserves, I
don't think there is any valid use of that race.

It's not a security issue, it's more an issue of what to do in situations
that can not happen with well-behaved applications anyway. My opinion is
that if we screw badly behaved programs, that is not a problem (the same
way that anything that passes in a bad pointer to a system call is
immediately undefined behaviour: we return EFAULT just to be polite, that
does NOT imply that we actually do anything sane).

So we do need to handle some of the cases, but others might as well just
be left racy.

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-07-16  1:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-16  0:24 Kanoj Sarcar
1999-07-16  1:09 ` Linus Torvalds [this message]
1999-07-16 18:20   ` Kanoj Sarcar

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=Pine.LNX.4.10.9907151804120.1146-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.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