[PATCH V2] arm64: optimized copy_to_user and copy_from_user assembly code

Dr. Philipp Tomsich philipp.tomsich at theobroma-systems.com
Thu Dec 4 05:56:20 PST 2014


Craig/Steve/Dann,

trying to understand what went wrong and when, I just went back to my original mail (May 1st, 2013) providing the original optimized functions for an iperf run at APM… this had two separate error-handling paths for _to_user and _from_user, where the _to_user case didn’t zeroize.

I can’t quite track when these two paths were unified (or by who)… but I can confirm that only the _from_user path was designed to zeroize the buffer on error.

@Craig: I’ll also forward you the original files, which I had earlier sent to Dann on Jul 3rd 2014. This should provide a point-of-reference for resolving this.

Best,
Philipp.

> On 04 Dec 2014, at 13:27, Steve Capper <steve.capper at linaro.org> wrote:
> 
> On 3 December 2014 at 20:01, Craig Magina <craig.magina at canonical.com> wrote:
> [...]
>> 
>> Could you provide the steps you used to reproduce this issue? I have
>> already submitted an SRU to revert this patch, but would like to have
>> the method you used to reproduce it for testing. Thanks for reporting
>> this.
>> 
>> --
>> Craig Magina
> 
> Hi Craig,
> It's not easy to reproduce as the problem occurs when the kernel is
> copying memory to userspace and experiences a page fault.
> 
> I have come across it whilst running "perf record -a" on a system that
> is swapping.
> 
> Also, building source code under memory pressure (i.e. kernel compile
> just after the system has swapped out pages), gave me this problem
> too.
> 
> Cheers,
> --
> Steve




More information about the linux-arm-kernel mailing list