[Top][All Lists]

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

Re: af_alg: Fail in continuable manner on Linux/powerpc64le

From: Pádraig Brady
Subject: Re: af_alg: Fail in continuable manner on Linux/powerpc64le
Date: Sun, 24 Jun 2018 20:04:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 24/06/18 19:32, Bruno Haible wrote:
> This fixes the error message reported by Assaf Gordon on non-seekable
> input.
> Four approaches come to mind for fixing this:
>  1) Change the afalg_stream signature, adding an argument where the function
>     can store read but not yet processed input.
>  2) Change the afalg_stream signature, passing it the fallback computation
>     function as argument. So that afalg_stream can invoke this function on
>     read input that it could not process itself.
>  3) Try the first send() with 1 byte only, because upon failure it can be
>     pushed back onto the stream.
>  4) Try the first send() with the number of bytes returned by freadptr,
>     instead of fread().
> The first two approaches would be a major code change, for just a little
> particular case. I prefer the third approach.

For reference a quick search suggests this bug may have been:
and was noticed by Assaf on a 3.10 kernel.

3) Seems like the best approach.
I'd have a slight reservation on perf impact of I/O
aligned 1 byte over natural boundaries.

Then implementation looks sound.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]