[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0o9ahce.fsf@all.your.base.are.belong.to.us>
Date: Fri, 11 Aug 2023 14:33:53 +0200
From: Björn Töpel <bjorn@...nel.org>
To: Alexandre Ghiti <alex@...ti.fr>,
Alexandre Ghiti <alexghiti@...osinc.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Alan Kao <alankao@...estech.com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Bo YU <tsu.yubo@...il.com>, Aurelien Jarno <aurelien@...el32.net>
Subject: Re: [PATCH -fixes] riscv: uaccess: Return the number of bytes
effectively copied
Alexandre Ghiti <alex@...ti.fr> writes:
> On 11/08/2023 13:03, Alexandre Ghiti wrote:
>> It was reported that the riscv kernel hangs while executing the test
>> in [1].
>>
>> Indeed, the test hangs when trying to write a buffer to a file. The
>> problem is that the riscv implementation of raw_copy_from_user() does not
>> return the number of bytes written when an exception happens and is fixed
>> up.
>
>
> I'll respin another version as the changelog and the title are
> incorrect: the uaccess routines should not return the number of bytes
> copied but actually the number of bytes not copied (this is what this
> patch implements).
>
> I'll wait for feedbacks before doing so!
Yikes! Nice catch.
Functions like fault_in_readable() will fail horribly w/o this. I wonder
why we haven't seen this problem more?
Feel free to add my RB to your next spin!
Reviewed-by: Björn Töpel <bjorn@...osinc.com>
Powered by blists - more mailing lists