From: ebiederm@xmission.com (Eric W. Biederman)
To: Roman Zippel <zippel@fh-brandenburg.de>
Cc: linux-mm@kvack.org
Subject: Re: page locking and error handling
Date: 15 Feb 2001 16:37:59 -0700 [thread overview]
Message-ID: <m1ae7n7c14.fsf@frodo.biederman.org> (raw)
In-Reply-To: Roman Zippel's message of "Thu, 15 Feb 2001 19:50:09 +0100 (MET)"
Roman Zippel <zippel@fh-brandenburg.de> writes:
> Hi,
>
> On 15 Feb 2001, Eric W. Biederman wrote:
>
> > > - if copy_from_user() fails the page is set as not uptodate. AFAIK this
> > > assumes that the page->buffers are still uptodate, so previous writes
> > > are not lost.
> > If copy_from_user fails that invokes undefined behavior, and you just lost
> > your previous writes because you ``overwrote'' them.
>
> What about partial writes?
The important thing is if copy_from_user fails it is because of a buggy
user space app. Because the buggy app passed a bad memory area. So you
have undefined behavior, so you can do whatever is convenient.
The only case to worry about how do we keep from breaking kernel invariants.
I think it make break an invariant to set a mmaped page as not
uptodate, but I can't see any other problems with the interface.
Eric
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-02-15 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-15 15:02 Roman Zippel
2001-02-15 15:33 ` Eric W. Biederman
2001-02-15 18:50 ` Roman Zippel
2001-02-15 23:37 ` Eric W. Biederman [this message]
2001-02-16 18:20 ` Marcelo Tosatti
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=m1ae7n7c14.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=linux-mm@kvack.org \
--cc=zippel@fh-brandenburg.de \
/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