Re: [PATCH] drm/i915: prevent integer overflow in query_engine_info()

2022-09-06 Thread Tvrtko Ursulin
Hi Dan, On 01/09/2022 16:38, Dan Carpenter wrote: This code uses struct_size() but it stores the result in an int so the integer overflow checks are not effective. Record the types as size_t to prevent the size from being truncated. Fixes: bf3c50837506 ("drm/i915/query: Use struct_size()

Re: [Intel-gfx] [PATCH] drm/i915: prevent integer overflow in query_engine_info()

2022-09-01 Thread Andrzej Hajda
On 01.09.2022 17:38, Dan Carpenter wrote: This code uses struct_size() but it stores the result in an int so the integer overflow checks are not effective. Record the types as size_t to prevent the size from being truncated. Fixes: bf3c50837506 ("drm/i915/query: Use struct_size() helper")

[PATCH] drm/i915: prevent integer overflow in query_engine_info()

2022-09-01 Thread Dan Carpenter
This code uses struct_size() but it stores the result in an int so the integer overflow checks are not effective. Record the types as size_t to prevent the size from being truncated. Fixes: bf3c50837506 ("drm/i915/query: Use struct_size() helper") Signed-off-by: Dan Carpenter --- I do not know