MALI: Fix 32bit apps w/ legacy r4p0 userspace libraries
Turns out that the r4p0 user space libs doesn't initialize the upper 32-bits when sending 32-bit pointers in u64s to kbase in ioctls. Older kbase would pass the u64 through a u32 cast, forcing the upper bits to 0, but that had been lost in r6p0. Fix from Ørjan Eide <orjan.eide@arm.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
@@ -474,11 +474,19 @@ copy_failed:
|
||||
case KBASE_FUNC_JOB_SUBMIT:
|
||||
{
|
||||
struct kbase_uk_job_submit *job = args;
|
||||
char __user *user_buf;
|
||||
|
||||
if (sizeof(*job) != args_size)
|
||||
goto bad_size;
|
||||
|
||||
if (kbase_jd_submit(kctx, u64_to_user_ptr(job->addr),
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (kbase_ctx_flag(kctx, KCTX_COMPAT))
|
||||
user_buf = compat_ptr(job->addr);
|
||||
else
|
||||
#endif
|
||||
user_buf = u64_to_user_ptr(job->addr);
|
||||
|
||||
if (kbase_jd_submit(kctx, user_buf,
|
||||
job->nr_atoms,
|
||||
job->stride,
|
||||
false) != 0)
|
||||
|
||||
Reference in New Issue
Block a user