public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* copy_mount_options()
@ 2004-08-20 20:01 David S. Miller
  2004-08-20 20:10 ` copy_mount_options() Andrew Morton
  2004-08-20 23:15 ` copy_mount_options() Benjamin Herrenschmidt
  0 siblings, 2 replies; 12+ messages in thread
From: David S. Miller @ 2004-08-20 20:01 UTC (permalink / raw)
  To: linux-arch


So the sparc64 user copy bug I fixed recently is pretty
much present on every platform.

Basically, copy_mount_options() requires exact byte granularity
to exception reporting from copy_from_user().  If you don't
do this it can break things like busybox's mount().

Even reporting on a word boundary is illegal.  On sparc64
it was quite poignant because we can report on a 64-byte
boundary for large copies because that is the granularity
of the load/store we use.

Other platforms will need to fix this.  I recommend a two
stage exception handling scheme.  Basically, on the first
exception, you merely note that an exception occurred
and you retry the user copy a byte at a time until you
hit the exact address that fails.  You cannot optimize
this to just check a page at a time, because copy_mount_options
wants all the data to be there.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-08-22 11:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-20 20:01 copy_mount_options() David S. Miller
2004-08-20 20:10 ` copy_mount_options() Andrew Morton
2004-08-20 21:11   ` copy_mount_options() David S. Miller
2004-08-20 21:31     ` copy_mount_options() Andrew Morton
2004-08-20 21:40       ` copy_mount_options() David S. Miller
2004-08-20 22:47         ` copy_mount_options() Andrew Morton
2004-08-20 23:18           ` copy_mount_options() Anton Blanchard
2004-08-20 23:51             ` copy_mount_options() David S. Miller
2004-08-21  0:07               ` copy_mount_options() Andrew Morton
2004-08-21  7:50                 ` copy_mount_options() Rusty Russell
2004-08-20 23:15 ` copy_mount_options() Benjamin Herrenschmidt
2004-08-22 11:50   ` copy_mount_options() Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox