Hi Chris, -----Original Message----- From: dri-devel <[email protected]> On Behalf Of Chris Wilson Sent: Wednesday, February 10, 2021 4:15 PM To: Ram Moon, AnandX <[email protected]>; Jani Nikula <[email protected]>; Auld, Matthew <[email protected]>; Surendrakumar Upadhyay, TejaskumarX <[email protected]>; Ursulin, Tvrtko <[email protected]>; [email protected]; [email protected] Cc: Ram Moon, AnandX <[email protected]> Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: Add a check for object size for corner cases
Quoting Anand Moon (2021-02-10 07:59:29) > Add check for object size to return appropriate error -E2BIG or > -EINVAL to avoid WARM_ON and successful return for some testcase. No. You miss the point of having those warnings. We need to inspect the code to remove the last remaining "int pagenum", and then we can remove the GEM_WARN_ON((sz) >> PAGE_SHIFT > INT_MAX). These are not emitted for users, only for us to motivate us into finally fixing the code. -Chris Yes, I got your point these check are meant to catch up integer overflow. I have check with the IGT testcase case _gem_create_ and _gem_userptr_blits_ which fails pass size *-1ull << 32* left shift and *0~* which leads to integer overflow ie _negative_ size passed to create i915_gem_create via ioctl this leads to GM_WARN_ON. Can we drop these testcase so that we don't break the kernel ? Thanks -Anand _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
