All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: sparclinux@vger.kernel.org
Subject: return value of __copy_from_user_inatomic()
Date: Fri, 13 Dec 2013 19:04:55 +0000	[thread overview]
Message-ID: <52AB5A57.3010405@oracle.com> (raw)

We're seeing some failing test cases due to sparc64's
__copy_from_user_inatomic returning 1 on an incomplete copy rather than
the number of bytes not copied. This results in
iov_iter_copy_from_user_atomic returning the wrong value to
generic_perform_write().

xfstests generic/246 and LTP writev01 both fail on btrfs and nfs because
of this.

Commit 145e1c00 "sparc64: Fix __copy_{to,from}_user_inatomic defines."
changed the behavior by removing the call to the fixups in
__copy_from_user_inatomic and __copy_to_user_inatomic. I found the
reported problem here: https://lkml.org/lkml/2008/11/1/91 , but I don't
understand why the fixup is the problem. The bzero (memset in the code)
is called against the destination, which is a pagecache page, and the
faulting address is sanity-checked against the boundaries.

reverting commit 145e1c00 fixes those failing test cases, and I wasn't
able to recreate the dbench failure on tmpfs.

Thanks,
Dave

                 reply	other threads:[~2013-12-13 19:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52AB5A57.3010405@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=sparclinux@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 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.