Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248076
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 04/20] x86: Rewrite copy_siginfo_{to,from}_user32 |
| Date | 2015-10-15 20:50 +0200 |
| Message-ID | <qjVLb-6zi-9@gated-at.bofh.it> (permalink) |
| References | <qjBt7-20C-3@gated-at.bofh.it> <qjBt8-20C-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
OOH ;) I'll try to look at this patch and the changes in the generic
code later. A couple of nits right now.
Please CC x86 maintainers, not only x86@kernel.org.
Please do not remove get/put_user_ex from this code. And this reminds
me that we can improve *user_try/*user_catch ...
On 10/14, Amanieu d'Antras wrote:
>
> -int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)
> +int copy_siginfo_to_user32(struct compat_siginfo __user *to, const siginfo_t *from)
> {
> - int err = 0;
> + int err, si_code;
> bool ia32 = test_thread_flag(TIF_IA32);
>
> - if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
> + if (!access_ok(VERIFY_WRITE, to, sizeof(siginfo_t)))
Why? This looks wrong.
> + if (from->si_code < 0) {
> + err |= __copy_to_user(to->_sifields._pad, from->_sifields._pad, SI_PAD_SIZE * sizeof(int))
> + ? -EFAULT : 0;
> + return err;
I think you should split this patch. And this change (don't interpet,
just copy) should go as a separate change.
> + switch (from->si_code & __SI_MASK) {
> + case __SI_KILL:
I agree, this looks better than ">> 16", but I'd suggest a separate
change too.
[...snip...]
the rest looks unreviewable because you didn't split it and because
you removed try/catch ;) The same for copy-from-user.
Please help us to understand these changes and make the more reviewable
patches if possible. Personally I think you have a point.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 04/20] x86: Rewrite copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
Re: [PATCH 04/20] x86: Rewrite copy_siginfo_{to,from}_user32 kbuild test robot <lkp@intel.com> - 2015-10-15 00:50 +0200
Re: [PATCH 04/20] x86: Rewrite copy_siginfo_{to,from}_user32 Oleg Nesterov <oleg@redhat.com> - 2015-10-15 20:50 +0200
Re: [PATCH 04/20] x86: Rewrite copy_siginfo_{to,from}_user32 "Amanieu d'Antras" <amanieu@gmail.com> - 2015-10-15 21:00 +0200
csiph-web