linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] exec fixes for v5.11-rc1
@ 2020-12-15 22:59 Eric W. Biederman
  2020-12-16  3:32 ` Linus Torvalds
  2020-12-16  3:44 ` pr-tracker-bot
  0 siblings, 2 replies; 4+ messages in thread
From: Eric W. Biederman @ 2020-12-15 22:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-fsdevel


Please pull the exec-for-v5.11 branch from the git tree:

   git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-for-v5.11

   HEAD: 9ee1206dcfb9d56503c0de9f8320f7b29c795867 exec: Move io_uring_task_cancel after the point of no return

This set of changes ultimately fixes the interaction of posix file lock
and exec.  Fundamentally most of the change is just moving where
unshare_files is called during exec, and tweaking the users of
files_struct so that the count of files_struct is not unnecessarily
played with.

Along the way fcheck and related helpers were renamed to more accurately
reflect what they do.

There were also many other small changes that fell out, as this is the
first time in a long time much of this code has been touched.


There is a minor conflict with parallel changes to the bpf task_iter
code.  The changes don't fundamentally conflict but both are removing
code from same areas of the same function.


Benchmarks haven't turned up any practical issues but Al Viro has
observed a possibility for a lot of pounding on task_lock.  So I have
some changes in progress to convert put_files_struct to always rcu free
files_struct.  That wasn't ready for the merge window so that will have
to wait until next time.


Eric W. Biederman (28):
      exec: Don't open code get_close_on_exec
      exec: Move unshare_files to fix posix file locking during exec
      exec: Simplify unshare_files
      exec: Remove reset_files_struct
      kcmp: In kcmp_epoll_target use fget_task
      bpf: In bpf_task_fd_query use fget_task
      proc/fd: In proc_fd_link use fget_task
      file: Rename __fcheck_files to files_lookup_fd_raw
      file: Factor files_lookup_fd_locked out of fcheck_files
      file: Replace fcheck_files with files_lookup_fd_rcu
      file: Rename fcheck lookup_fd_rcu
      file: Implement task_lookup_fd_rcu
      proc/fd: In tid_fd_mode use task_lookup_fd_rcu
      kcmp: In get_file_raw_ptr use task_lookup_fd_rcu
      file: Implement task_lookup_next_fd_rcu
      proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu
      bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu
      proc/fd: In fdinfo seq_show don't use get_files_struct
      file: Merge __fd_install into fd_install
      file: In f_dupfd read RLIMIT_NOFILE once.
      file: Merge __alloc_fd into alloc_fd
      file: Rename __close_fd to close_fd and remove the files parameter
      file: Replace ksys_close with close_fd
      file: Rename __close_fd_get_file close_fd_get_file
      file: Remove get_files_struct
      exec: Move unshare_files and guarantee files_struct.count is correct
      coredump: Document coredump code exclusively used by cell spufs
      exec: Move io_uring_task_cancel after the point of no return

 Documentation/filesystems/files.rst          |   8 +-
 arch/powerpc/platforms/cell/spufs/coredump.c |   2 +-
 drivers/android/binder.c                     |   2 +-
 fs/autofs/dev-ioctl.c                        |   5 +-
 fs/binfmt_elf.c                              |   2 +
 fs/coredump.c                                |   6 +-
 fs/exec.c                                    |  39 ++++-----
 fs/file.c                                    | 124 +++++++++++++--------------
 fs/io_uring.c                                |   2 +-
 fs/locks.c                                   |  14 +--
 fs/notify/dnotify/dnotify.c                  |   2 +-
 fs/open.c                                    |   2 +-
 fs/proc/fd.c                                 |  48 ++++-------
 include/linux/fdtable.h                      |  40 +++++----
 include/linux/syscalls.h                     |  12 ---
 kernel/bpf/syscall.c                         |  20 +----
 kernel/bpf/task_iter.c                       |  44 +++-------
 kernel/fork.c                                |  12 +--
 kernel/kcmp.c                                |  29 ++-----
 19 files changed, 161 insertions(+), 252 deletions(-)

Eric

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

* Re: [GIT PULL] exec fixes for v5.11-rc1
  2020-12-15 22:59 [GIT PULL] exec fixes for v5.11-rc1 Eric W. Biederman
@ 2020-12-16  3:32 ` Linus Torvalds
  2020-12-16 14:35   ` Eric W. Biederman
  2020-12-16  3:44 ` pr-tracker-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2020-12-16  3:32 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Linux Kernel Mailing List, linux-fsdevel

On Tue, Dec 15, 2020 at 3:00 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> There is a minor conflict with parallel changes to the bpf task_iter
> code.  The changes don't fundamentally conflict but both are removing
> code from same areas of the same function.

Ok, that was somewhat confusing.

I think I got it right, but I'd appreciate you giving my resolution a
second look. Just to be safe.

              Linus

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

* Re: [GIT PULL] exec fixes for v5.11-rc1
  2020-12-15 22:59 [GIT PULL] exec fixes for v5.11-rc1 Eric W. Biederman
  2020-12-16  3:32 ` Linus Torvalds
@ 2020-12-16  3:44 ` pr-tracker-bot
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2020-12-16  3:44 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Linus Torvalds, linux-kernel, linux-fsdevel

The pull request you sent on Tue, 15 Dec 2020 16:59:55 -0600:

> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-for-v5.11

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/faf145d6f3f3d6f2c066f65602ba9d0a03106915

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

* Re: [GIT PULL] exec fixes for v5.11-rc1
  2020-12-16  3:32 ` Linus Torvalds
@ 2020-12-16 14:35   ` Eric W. Biederman
  0 siblings, 0 replies; 4+ messages in thread
From: Eric W. Biederman @ 2020-12-16 14:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, linux-fsdevel

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Tue, Dec 15, 2020 at 3:00 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>>
>> There is a minor conflict with parallel changes to the bpf task_iter
>> code.  The changes don't fundamentally conflict but both are removing
>> code from same areas of the same function.
>
> Ok, that was somewhat confusing.
>
> I think I got it right, but I'd appreciate you giving my resolution a
> second look. Just to be safe.

I have read through the merge commit and everything looks correct.

Eric


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

end of thread, other threads:[~2020-12-16 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 22:59 [GIT PULL] exec fixes for v5.11-rc1 Eric W. Biederman
2020-12-16  3:32 ` Linus Torvalds
2020-12-16 14:35   ` Eric W. Biederman
2020-12-16  3:44 ` pr-tracker-bot

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