linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git pull] misc uaccess stuff
@ 2020-06-03 19:23 Al Viro
  2020-06-03 20:44 ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2020-06-03 19:23 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

	uaccess patches that really didn't fit anywhere else.
kvm_hv_set_msr() patch left as-is; __put_user() is by no means
final there, but that'll be dealt with along with other KVM
uaccess stuff next cycle.

The following changes since commit b44f687386875b714dae2afa768e73401e45c21c:

  drm/i915/gem: Replace user_access_begin by user_write_access_begin (2020-05-01 12:35:22 +1000)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git uaccess.misc

for you to fetch changes up to 4ec76a2b74c72ef9eed875ce63e27a5e7f8d80cc:

  bpf: make bpf_check_uarg_tail_zero() use check_zeroed_user() (2020-06-01 14:42:37 -0400)

----------------------------------------------------------------
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(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git pull] misc uaccess stuff
  2020-06-03 19:23 [git pull] misc uaccess stuff Al Viro
@ 2020-06-03 20:44 ` Nathan Chancellor
  2020-06-03 20:53   ` Al Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2020-06-03 20:44 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel

On Wed, Jun 03, 2020 at 08:23:06PM +0100, Al Viro wrote:
> 	uaccess patches that really didn't fit anywhere else.
> kvm_hv_set_msr() patch left as-is; __put_user() is by no means
> final there, but that'll be dealt with along with other KVM
> uaccess stuff next cycle.
> 
> The following changes since commit b44f687386875b714dae2afa768e73401e45c21c:
> 
>   drm/i915/gem: Replace user_access_begin by user_write_access_begin (2020-05-01 12:35:22 +1000)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git uaccess.misc
> 
> for you to fetch changes up to 4ec76a2b74c72ef9eed875ce63e27a5e7f8d80cc:
> 
>   bpf: make bpf_check_uarg_tail_zero() use check_zeroed_user() (2020-06-01 14:42:37 -0400)
> 
> ----------------------------------------------------------------
> 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

This patch breaks arm32:

$ make -sj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- allyesconfig fs/binfmt_elf_fdpic.o
...
In file included from ./include/linux/sched/task.h:11,
                 from ./include/linux/sched/signal.h:9,
                 from ./include/linux/rcuwait.h:6,
                 from ./include/linux/percpu-rwsem.h:7,
                 from ./include/linux/fs.h:34,
                 from fs/binfmt_elf_fdpic.c:11:
./include/linux/uaccess.h:149:1: note: declared here
  149 | copy_to_user(void __user *to, const void *from, unsigned long n)
      | ^~~~~~~~~~~~
fs/binfmt_elf_fdpic.c:612:7: error: too few arguments to function 'copy_to_user'
  612 |   if (copy_to_user(ent + nr, &v))    \
      |       ^~~~~~~~~~~~
fs/binfmt_elf_fdpic.c:659:2: note: in expansion of macro 'NEW_AUX_ENT'
  659 |  NEW_AUX_ENT(AT_EXECFN, bprm->exec);
      |  ^~~~~~~~~~~
...

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git pull] misc uaccess stuff
  2020-06-03 20:44 ` Nathan Chancellor
@ 2020-06-03 20:53   ` Al Viro
  2020-06-03 21:02     ` Al Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2020-06-03 20:53 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Linus Torvalds, linux-kernel

On Wed, Jun 03, 2020 at 01:44:39PM -0700, Nathan Chancellor wrote:
> > ----------------------------------------------------------------
> > 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
> 
> This patch breaks arm32:
> 
> $ make -sj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- allyesconfig fs/binfmt_elf_fdpic.o
> ...
> In file included from ./include/linux/sched/task.h:11,
>                  from ./include/linux/sched/signal.h:9,
>                  from ./include/linux/rcuwait.h:6,
>                  from ./include/linux/percpu-rwsem.h:7,
>                  from ./include/linux/fs.h:34,
>                  from fs/binfmt_elf_fdpic.c:11:
> ./include/linux/uaccess.h:149:1: note: declared here
>   149 | copy_to_user(void __user *to, const void *from, unsigned long n)
>       | ^~~~~~~~~~~~
> fs/binfmt_elf_fdpic.c:612:7: error: too few arguments to function 'copy_to_user'
>   612 |   if (copy_to_user(ent + nr, &v))    \
>       |       ^~~~~~~~~~~~
> fs/binfmt_elf_fdpic.c:659:2: note: in expansion of macro 'NEW_AUX_ENT'
>   659 |  NEW_AUX_ENT(AT_EXECFN, bprm->exec);
>       |  ^~~~~~~~~~~

Linus, consider that pull request withdrawn for now, please.  My apologies -
I'll push a fixed variant and resend after a week of having it sit in -next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git pull] misc uaccess stuff
  2020-06-03 20:53   ` Al Viro
@ 2020-06-03 21:02     ` Al Viro
  0 siblings, 0 replies; 4+ messages in thread
From: Al Viro @ 2020-06-03 21:02 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Linus Torvalds, linux-kernel

On Wed, Jun 03, 2020 at 09:53:32PM +0100, Al Viro wrote:
> On Wed, Jun 03, 2020 at 01:44:39PM -0700, Nathan Chancellor wrote:
> > > ----------------------------------------------------------------
> > > 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
> > 
> > This patch breaks arm32:
> > 
> > $ make -sj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- allyesconfig fs/binfmt_elf_fdpic.o
> > ...
> > In file included from ./include/linux/sched/task.h:11,
> >                  from ./include/linux/sched/signal.h:9,
> >                  from ./include/linux/rcuwait.h:6,
> >                  from ./include/linux/percpu-rwsem.h:7,
> >                  from ./include/linux/fs.h:34,
> >                  from fs/binfmt_elf_fdpic.c:11:
> > ./include/linux/uaccess.h:149:1: note: declared here
> >   149 | copy_to_user(void __user *to, const void *from, unsigned long n)
> >       | ^~~~~~~~~~~~
> > fs/binfmt_elf_fdpic.c:612:7: error: too few arguments to function 'copy_to_user'
> >   612 |   if (copy_to_user(ent + nr, &v))    \
> >       |       ^~~~~~~~~~~~
> > fs/binfmt_elf_fdpic.c:659:2: note: in expansion of macro 'NEW_AUX_ENT'
> >   659 |  NEW_AUX_ENT(AT_EXECFN, bprm->exec);
> >       |  ^~~~~~~~~~~
> 
> Linus, consider that pull request withdrawn for now, please.  My apologies -
> I'll push a fixed variant and resend after a week of having it sit in -next.

for-next regenerated and pushed; let's have it sit there for a week.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-03 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 19:23 [git pull] misc uaccess stuff Al Viro
2020-06-03 20:44 ` Nathan Chancellor
2020-06-03 20:53   ` Al Viro
2020-06-03 21:02     ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).