[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix bit fields extraction and prevent overflow
From: |
Peter Maydell |
Subject: |
Re: [PATCH] fix bit fields extraction and prevent overflow |
Date: |
Thu, 25 Apr 2024 20:25:46 +0100 |
On Wed, 24 Apr 2024 at 19:13, Alexandra Diupina <adiupina@astralinux.ru> wrote:
>
> Add a type cast and use extract64() instead of extract32()
> to avoid integer overflow on addition. Fix bit fields
> extraction according to documentation.
The commit message here says we make the handling of the
address_extension fields match the documentation, and the
version of the fixes to this function in the patch
"[PATCH v2 RFC] fix host-endianness bug and prevent overflow"
did that, but here we seem to have gone back to not changing
the shift amounts.
We also need to extract all 16 bits of the address_extension
fields, not just 12, according to the datasheet.
thanks
-- PMM
- Re: [PATCH RFC] prevent overflow in xlnx_dpdma_desc_get_source_address(), (continued)
- Re: [PATCH RFC] prevent overflow in xlnx_dpdma_desc_get_source_address(), Peter Maydell, 2024/04/23
- [PATCH v2 RFC] fix host-endianness bug and prevent overflow, Alexandra Diupina, 2024/04/24
- Re: [PATCH v2 RFC] fix host-endianness bug and prevent overflow, Peter Maydell, 2024/04/24
- [PATCH] fix host-endianness bug, Alexandra Diupina, 2024/04/24
- Re: [PATCH] fix host-endianness bug, Peter Maydell, 2024/04/25
- [PATCH v2] fix host-endianness bug, Alexandra Diupina, 2024/04/25
- Re: [PATCH v2] fix host-endianness bug, Philippe Mathieu-Daudé, 2024/04/25
- [PATCH v3] fix endianness bug, Alexandra Diupina, 2024/04/25
- Re: [PATCH v3] fix endianness bug, Richard Henderson, 2024/04/25
- [PATCH] fix bit fields extraction and prevent overflow, Alexandra Diupina, 2024/04/24
- Re: [PATCH] fix bit fields extraction and prevent overflow,
Peter Maydell <=