Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1182185 > unrolled thread

Re: [PATCH 1/5] x86/vm86: Move userspace accesses to do_sys_vm86()

Started byAndy Lutomirski <luto@amacapital.net>
First post2015-07-11 18:40 +0200
Last post2015-07-11 18:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/5] x86/vm86: Move userspace accesses to do_sys_vm86() Andy Lutomirski <luto@amacapital.net> - 2015-07-11 18:40 +0200

#1182185 — Re: [PATCH 1/5] x86/vm86: Move userspace accesses to do_sys_vm86()

FromAndy Lutomirski <luto@amacapital.net>
Date2015-07-11 18:40 +0200
SubjectRe: [PATCH 1/5] x86/vm86: Move userspace accesses to do_sys_vm86()
Message-ID<pL5YJ-5pm-7@gated-at.bofh.it>
On Fri, Jul 10, 2015 at 10:09 PM, Brian Gerst <brgerst@gmail.com> wrote:
> Move the userspace accesses down into the common function in
> preparation for the next set of patches.
>

One thing I don't like about the current code that makes these patches
harder to review is the bizarre approach to copying.  If you changed
this:

> -       tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs,
> -                                      offsetof(struct kernel_vm86_struct, vm86plus) -
> -                                      sizeof(info.regs));

into a normal field-by-field get_user / copy_from_user (the latter for
the big regs struct) then it would be clear what the ABI is and it
would be much easier to read the patches and confirm that you aren't
accidentally changing the ABI.

You could also get rid of the constraint that certain fields in
apparently kernel-internal structs had to be in a certain order.

Other than that, patches 1-4 look good on cursory inspection.  I'll
look more carefully later.  I need to think about patch 5 more.

--Andy
--
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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web