mainlining shenanigans
Go to file
Eric W. Biederman 3977e285ee exec: Remove the recomputation of bprm->cred
Recomputing the uids, gids, capabilities, and related flags each time a
new bprm->file is set is error prone and unnecessary.

This set of changes splits per_clear temporarily into two separate
variables.  This is the last change necessary to ensure that
everything that is computed from brpm->file in bprm->cred is
recomputed every time a new bprm->file is set.  Then the code is
refactored to compute bprm->cred from bprm->file when the final
brpm->file is known, removing the need for recomputation entirely.

Doing this in two steps should allow anyone who has problems later to
bisect and tell if it was the semantic change or the refactoring that
caused them problems.

Eric W. Biederman (2):
      exec: Add a per bprm->file version of per_clear
      exec: Compute file based creds only once

 fs/binfmt_misc.c              |  2 +-
 fs/exec.c                     | 57 ++++++++++++++++++-------------------------
 include/linux/binfmts.h       |  9 ++-----
 include/linux/lsm_hook_defs.h |  2 +-
 include/linux/lsm_hooks.h     | 22 +++++++++--------
 include/linux/security.h      |  9 ++++---
 security/commoncap.c          | 22 +++++++++--------
 security/security.c           |  4 +--
 8 files changed, 59 insertions(+), 68 deletions(-)

Merge branch 'exec-norecompute-v2' into exec-next
2020-05-31 15:02:36 -05:00
arch exec: Remove recursion from search_binary_handler 2020-05-21 10:16:57 -05:00
block blk-iocost: Fix error on iocost_ioc_vrate_adj 2020-04-21 09:49:36 -06:00
certs .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
crypto x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2 2020-04-09 00:12:48 +09:00
Documentation exec: Rename flush_old_exec begin_new_exec 2020-05-07 16:55:47 -05:00
drivers USB fixes for 5.7-rc3 2020-04-26 11:22:01 -07:00
fs exec: Compute file based creds only once 2020-05-29 22:00:54 -05:00
include exec: Compute file based creds only once 2020-05-29 22:00:54 -05:00
init Kbuild updates for v5.7 (2nd) 2020-04-11 09:46:12 -07:00
ipc ipc/util.c: sysvipc_find_ipc() should increase position index 2020-04-10 15:36:22 -07:00
kernel exec: Teach prepare_exec_creds how exec treats uids & gids 2020-05-20 14:44:21 -05:00
lib lib/mpi: Fix building for powerpc with clang 2020-04-24 13:14:59 +10:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm mm: check that mm is still valid in madvise() 2020-04-24 13:28:03 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-24 19:17:30 -07:00
samples vmalloc: fix remap_vmalloc_range() bounds checks 2020-04-21 11:11:56 -07:00
scripts Kbuild fixes for v5.7 2020-04-24 10:39:32 -07:00
security exec: Compute file based creds only once 2020-05-29 22:00:54 -05:00
sound sound fixes for 5.7-rc3 2020-04-24 10:27:43 -07:00
tools selftests/exec: Add binfmt_script regression test 2020-05-21 10:24:39 -05:00
usr kbuild: fix comment about missing include guard detection 2020-04-11 12:09:48 +09:00
virt KVM: Pass kvm_init()'s opaque param to additional arch funcs 2020-03-31 10:48:03 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2020-04-18 13:49:33 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.mailmap mailmap: Add Sedat Dilek (replacement for expired email address) 2020-04-11 09:28:34 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Hand MIPS over to Thomas 2020-02-24 22:43:18 -08:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS Staging/IIO driver fixes for 5.7-rc3 2020-04-26 11:12:30 -07:00
Makefile Linux 5.7-rc3 2020-04-26 13:51:02 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.