Re: [PATCH] parisc: Fix access fault handling in pa_memcpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 27, 2017 at 05:47:02PM +0200, Helge Deller wrote:
> pa_memcpy() is the major memcpy implementation in the parisc kernel which is
> used to do any kind of userspace/kernel memory copies.
> 
> Al Viro noticed various bugs in the implementation of pa_mempcy(), most notably
> that in case of faults it may report back to have copied more bytes than it
> actually did.
> 
> Fixing those bugs is quite hard in the C-implementation, because the compiler
> is messing around with the registers and we are not guaranteed that specific
> variables are always in the same processor registers. This makes proper fault
> handling complicated.
> 
> This patch implements pa_memcpy() in assembler. That way we have correct fault
> handling and adding a 64-bit copy routine was quite easy.

Hmm...  Is there any point trying to fall back from store fault to byte
copy?  Note that in copy_dstaligned() dst *is* aligned, so if the word
store fails, there's no realistic chance of having a byte store succeed.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux