Re: [PATCH] iommu/vt-d: Use kcalloc() instead of kzalloc()

2024-02-25 Thread Baolu Lu
On 2/12/24 1:51 AM, Erick Archer wrote: This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1]. Here the multiplication is obviously safe because DMAR_LATENCY_NUM is the number of latency types defined in the "latency_type" enum.

Re: [PATCH] iommu/vt-d: Use kcalloc() instead of kzalloc()

2024-02-12 Thread Gustavo A. R. Silva
On 2/11/24 11:51, Erick Archer wrote: This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1]. Here the multiplication is obviously safe because DMAR_LATENCY_NUM is the number of latency types defined in the "latency_type" enum.

Re: [PATCH] iommu/vt-d: Use kcalloc() instead of kzalloc()

2024-02-12 Thread Kees Cook
On Sun, Feb 11, 2024 at 06:51:43PM +0100, Erick Archer wrote: > This is an effort to get rid of all multiplications from allocation > functions in order to prevent integer overflows [1]. > > Here the multiplication is obviously safe because DMAR_LATENCY_NUM > is the number of latency types defined

[PATCH] iommu/vt-d: Use kcalloc() instead of kzalloc()

2024-02-11 Thread Erick Archer
This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1]. Here the multiplication is obviously safe because DMAR_LATENCY_NUM is the number of latency types defined in the "latency_type" enum. enum latency_type { DMAR_LATENCY_I