lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4056.1231523557@mini>
Date:	Fri, 09 Jan 2009 12:52:37 -0500
From:	Brad Parker <brad@...ltoe.com>
To:	linux-kernel@...r.kernel.org
Subject: copy_{to,from}_user


I have a question about copy_{to,from}_user.  

Most implementations I've seen do in-order copies and notice when an
exception occurs and report back the progress.  This is straight
forward.

(but to be honest, I have suspicions about how just how accurate those
reports are i.e. +/- 1-3 bytes on some architectures)

On some cpu's it is advantageous to do an out-of-order copy to take
advantage of various cache fill mechanisms.

The problem is that the out-of-order copy makes it impossible to know
where the exception occurred (in terms of progress).

Would it be permissible to have a version of copy_{to,from}_user which
does an out-of-order copy and when an exception occurs, restarts the
copy from the beginning using a simple in-order copy, to make it
possible to identify where the exception occurs?

The idea is that exceptions are rare and so the performance hit of doing
the "recopy" would be minimal and would provide the required accuracy.

-brad

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ