Re: [PATCHES] uaccess misc

2020-05-29 Thread Linus Torvalds
On Fri, May 29, 2020 at 4:54 PM Linus Torvalds
 wrote:
>
> My only complaint was that kvm thing that I think should have gone even 
> further.

Oh... And the cc list looks a bit odd.

You cc'd fsdevel, but none of the patches were really to any
filesystem code (ok, the pselect and binfmt thing is in fs/, but
that's kind of incidental and more of a "we split core system calls up
by area too" than any "it's filesystem code").

The kvm patch didn't have anybody from kvm-land cc'd, for example. I
added some to my "this shouldn't use double underscores" reply, but..

  Linus


Re: [PATCHES] uaccess misc

2020-05-29 Thread Linus Torvalds
On Fri, May 29, 2020 at 4:26 PM Al Viro  wrote:
>
> The stuff that doesn't fit anywhere else.  Hopefully
> saner marshalling for weird 7-argument syscalls (pselect6()),

That looked fine to me, btw. Looks like an improvement even outside
the "avoid __get_user()" and double STAC/CLAC issue.

> low-hanging fruit in several binfmt, unsafe_put_user-based
> x86 cp_stat64(), etc. - there's really no common topic here.

My only complaint was that kvm thing that I think should have gone even further.

   Linus


[PATCHES] uaccess misc

2020-05-29 Thread Al Viro
The stuff that doesn't fit anywhere else.  Hopefully
saner marshalling for weird 7-argument syscalls (pselect6()),
low-hanging fruit in several binfmt, unsafe_put_user-based
x86 cp_stat64(), etc. - there's really no common topic here.

BTW, after that series there's no more __clear_user()
callers outside of arch/* and damn few in arch/*, other than
clear_user() instances themselves...

Branch is uaccess.misc, based at uaccess.base.


Al Viro (9):
  pselect6() and friends: take handling the combined 6th/7th args into 
helper
  binfmt_elf: don't bother with __{put,copy_to}_user()
  binfmt_elf_fdpic: don't use __... uaccess primitives
  binfmt_flat: don't use __put_user()
  x86: switch cp_stat64() to unsafe_put_user()
  TEST_ACCESS_OK _never_ had been checked anywhere
  user_regset_copyout_zero(): use clear_user()
  x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user()
  bpf: make bpf_check_uarg_tail_zero() use check_zeroed_user()

 arch/x86/include/asm/pgtable_32.h |   7 ---
 arch/x86/kernel/sys_ia32.c|  40 --
 arch/x86/kvm/hyperv.c |   2 +-
 fs/binfmt_elf.c   |  14 ++---
 fs/binfmt_elf_fdpic.c |  31 +++
 fs/binfmt_flat.c  |  22 +---
 fs/select.c   | 112 ++
 include/linux/regset.h|   2 +-
 kernel/bpf/syscall.c  |  25 ++---
 9 files changed, 134 insertions(+), 121 deletions(-)