>> > Shouldn't these be compat_ptr(argv)? makes a difference on s390)
Indeed. The "compat_uptr_t __user *argv" is wrong, and it should be just
and then every time you turn it into a pointer, it should use
Then, since it's a pointer to an array of pointers, when you do that,
you should turn it into a pointer to "compat_uptr_t", so you actually
- user passes "compat_uptr_t"
- the kernel can turn that into "compat_uptr_t __user *" by doing
compat_uptr_t __user *pptr;
pptr = compat_ptr(argv);
- the kernel needs to fetch the individual entries with
compat_uptr_t cuptr = get_user(pptr);
- the kernel can then turn _those_ into the actual pointers to the string with
const char __user *str = compat_ptr(cuptr);
so you need two levels of compat_ptr() co>version.
> So, once again, this should not (and can not) be compat_ptr(argv) afaics.
It can be, and probably should. But the low-level s390 wrapper
function may have done one of the levels already. It probably
shouldn't, and we _should_ do the "compat_ptr()" thing a the generic C
level. That's what we do with all the other pointers, after all.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/