[PATCH v2 0/5] Fix integer handling issues in k230_gsdma and k230_decomp_gzip

Tao Ding posted 5 patches 3 weeks ago
There is a newer version of this series
hw/dma/k230_gsdma.c                 | 4 ++++
hw/misc/k230_decomp_gzip.c          | 6 +++---
tests/qtest/k230-decomp-gzip-test.c | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
[PATCH v2 0/5] Fix integer handling issues in k230_gsdma and k230_decomp_gzip
Posted by Tao Ding 3 weeks ago
Hi, all

This series fixes integer overflow, truncation, and underflow issues
reported by Coverity in the K230 GZIP decompressor, its qtest, and GSDMA.
https://lore.kernel.org/qemu-devel/5fc57f49cea0ac3542128d0e2208edd6d7484f7e.camel@wdc.com/

Thanks.

The patchv1 series is posted in:
https://lore.kernel.org/qemu-devel/20261001022223.8633-1-dingtao0430@163.com/T

Changes in v1->v2:
- Split the original k230_decomp_gzip patch into three patches, one for
  each integer handling issue.
- Remove the modifications "ch" in patchv1 3/3, which is now patchv2 5/5.

Tao Ding (5):
  hw/misc: fix calculating output address overflow in k230_decomp_gzip
  hw/misc: fix calculating input address overflow in k230_decomp_gzip
  hw/misc: use hwaddr for the k230_decomp_gzip input address
  qtest: fix k230_decomp_gzip test integer handling issues
  hw/dma: fix k230_gsdma integer handling issues

 hw/dma/k230_gsdma.c                 | 4 ++++
 hw/misc/k230_decomp_gzip.c          | 6 +++---
 tests/qtest/k230-decomp-gzip-test.c | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)


base-commit: 0a1ebd448b38afaa118597cbb633dbec24ef74d3
-- 
2.43.0
Re: [PATCH v2 0/5] Fix integer handling issues in k230_gsdma and k230_decomp_gzip
Posted by Alistair Francis 1 week ago
On Fri, 2026-10-02 at 22:02 +0800, Tao Ding wrote:
> Hi, all
> 
> This series fixes integer overflow, truncation, and underflow issues
> reported by Coverity in the K230 GZIP decompressor, its qtest, and
> GSDMA.
> https://lore.kernel.org/qemu-devel/5fc57f49cea0ac3542128d0e2208edd6d7484f7e.camel@wdc.com/

What about 1685513?

Alistair

> 
> Thanks.
> 
> The patchv1 series is posted in:
> https://lore.kernel.org/qemu-devel/20261001022223.8633-1-dingtao0430@163.com/T
> 
> Changes in v1->v2:
> - Split the original k230_decomp_gzip patch into three patches, one
> for
>   each integer handling issue.
> - Remove the modifications "ch" in patchv1 3/3, which is now patchv2
> 5/5.
> 
> Tao Ding (5):
>   hw/misc: fix calculating output address overflow in
> k230_decomp_gzip
>   hw/misc: fix calculating input address overflow in k230_decomp_gzip
>   hw/misc: use hwaddr for the k230_decomp_gzip input address
>   qtest: fix k230_decomp_gzip test integer handling issues
>   hw/dma: fix k230_gsdma integer handling issues
> 
>  hw/dma/k230_gsdma.c                 | 4 ++++
>  hw/misc/k230_decomp_gzip.c          | 6 +++---
>  tests/qtest/k230-decomp-gzip-test.c | 2 +-
>  3 files changed, 8 insertions(+), 4 deletions(-)
> 
> 
> base-commit: 0a1ebd448b38afaa118597cbb633dbec24ef74d3
Re: [PATCH v2 0/5] Fix integer handling issues in k230_gsdma and k230_decomp_gzip
Posted by Tao Ding 5 days, 10 hours ago
CID 1685513 appears to be an existing issue rather than one introduced by my patch.
I’m also not familiar with this part of the code, so it may be better handled by the relevant maintainer.

On 10/16/2026 10:06 AM, Alistair Francis wrote:

> On Fri, 2026-10-02 at 22:02 +0800, Tao Ding wrote:
>> Hi, all
>>
>> This series fixes integer overflow, truncation, and underflow issues
>> reported by Coverity in the K230 GZIP decompressor, its qtest, and
>> GSDMA.
>> https://lore.kernel.org/qemu-devel/5fc57f49cea0ac3542128d0e2208edd6d7484f7e.camel@wdc.com/
> What about 1685513?
>
> Alistair
>
>> Thanks.
>>
>> The patchv1 series is posted in:
>> https://lore.kernel.org/qemu-devel/20261001022223.8633-1-dingtao0430@163.com/T
>>
>> Changes in v1->v2:
>> - Split the original k230_decomp_gzip patch into three patches, one
>> for
>>    each integer handling issue.
>> - Remove the modifications "ch" in patchv1 3/3, which is now patchv2
>> 5/5.
>>
>> Tao Ding (5):
>>    hw/misc: fix calculating output address overflow in
>> k230_decomp_gzip
>>    hw/misc: fix calculating input address overflow in k230_decomp_gzip
>>    hw/misc: use hwaddr for the k230_decomp_gzip input address
>>    qtest: fix k230_decomp_gzip test integer handling issues
>>    hw/dma: fix k230_gsdma integer handling issues
>>
>>   hw/dma/k230_gsdma.c                 | 4 ++++
>>   hw/misc/k230_decomp_gzip.c          | 6 +++---
>>   tests/qtest/k230-decomp-gzip-test.c | 2 +-
>>   3 files changed, 8 insertions(+), 4 deletions(-)
>>
>>
>> base-commit: 0a1ebd448b38afaa118597cbb633dbec24ef74d3