[Intel-gfx] [PATCH 3/6] drm/i915: Check for integer truncation on the configuration of ttm place

2022-06-03 Thread Gwan-gyeong Mun
There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as we

[Intel-gfx] [PATCH 3/6] drm/i915: Check for integer truncation on the configuration of ttm place

2022-06-03 Thread Gwan-gyeong Mun
There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as we