Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638660
| From | Phil Elwell <phil@raspberrypi.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: vc04_services: Fix bulk cache maintenance |
| Date | 2017-05-10 10:50 +0200 |
| Message-ID | <tFvtL-6TH-9@gated-at.bofh.it> (permalink) |
| References | <tDmbf-28q-3@gated-at.bofh.it> <tDtcJ-6Nc-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/05/2017 18:51, Stefan Wahren wrote:
>
>> Phil Elwell <phil@raspberrypi.org> hat am 4. Mai 2017 um 11:58 geschrieben:
>>
>>
>> vchiq_arm supports transfers less than one page and at arbitrary
>> alignment, using the dma-mapping API to perform its cache maintenance
>> (even though the VPU drives the DMA hardware). Read (DMA_FROM_DEVICE)
>> operations use cache invalidation for speed, falling back to
>> clean+invalidate on partial cache lines, with writes (DMA_TO_DEVICE)
>> using flushes.
>>
>> If a read transfer has ends which aren't page-aligned, performing cache
>> maintenance as if they were whole pages can lead to memory corruption
>> since the partial cache lines at the ends (and any cache lines before or
>> after the transfer area) will be invalidated. This bug was masked until
>> the disabling of the cache flush in flush_dcache_page().
>>
>> Honouring the requested transfer start- and end-points prevents the
>> corruption.
>>
>> Fixes: cf9caf192988 ("staging: vc04_services: Replace dmac_map_area with dmac_map_sg")
>> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
>
> Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
> Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
>
> In order to clarify the context of this issue:
>
> http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-April/006149.html
Thanks, Stefan.
Is there no feedback other on this patch? It's been in the rpi-4.11.y downstream
branch for a week now with favourable results - see issue
https://github.com/raspberrypi/linux/issues/1977 and pr
https://github.com/raspberrypi/linux/pull/1987.
Phil
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: vc04_services: Fix bulk cache maintenance Phil Elwell <phil@raspberrypi.org> - 2017-05-04 12:30 +0200
Re: [PATCH] staging: vc04_services: Fix bulk cache maintenance Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-04 20:00 +0200
Re: [PATCH] staging: vc04_services: Fix bulk cache maintenance Phil Elwell <phil@raspberrypi.org> - 2017-05-10 10:50 +0200
Re: [PATCH] staging: vc04_services: Fix bulk cache maintenance Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-10 11:10 +0200
Re: [PATCH] staging: vc04_services: Fix bulk cache maintenance Phil Elwell <phil@raspberrypi.org> - 2017-05-10 11:20 +0200
csiph-web