All of lore.kernel.org
 help / color / mirror / Atom feed
* return value of __copy_from_user_inatomic()
@ 2013-12-13 19:04 Dave Kleikamp
  0 siblings, 0 replies; only message in thread
From: Dave Kleikamp @ 2013-12-13 19:04 UTC (permalink / raw)
  To: sparclinux

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-13 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-13 19:04 return value of __copy_from_user_inatomic() Dave Kleikamp

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.