linux-stable/arch/s390/kernel
Linus Torvalds 83fa805bcb threads-v5.6
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCXjFo8wAKCRCRxhvAZXjc
 omaGAQDVwCHQekqxp2eC8EJH4Pkt+Bn1BLrA25stlTo93YBPHgEAsPVUCRNcrZAl
 VncYmxCfpt3Yu0S/MTVXu5xrRiIXPQk=
 =uqTN
 -----END PGP SIGNATURE-----

Merge tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux

Pull thread management updates from Christian Brauner:
 "Sargun Dhillon over the last cycle has worked on the pidfd_getfd()
  syscall.

  This syscall allows for the retrieval of file descriptors of a process
  based on its pidfd. A task needs to have ptrace_may_access()
  permissions with PTRACE_MODE_ATTACH_REALCREDS (suggested by Oleg and
  Andy) on the target.

  One of the main use-cases is in combination with seccomp's user
  notification feature. As a reminder, seccomp's user notification
  feature was made available in v5.0. It allows a task to retrieve a
  file descriptor for its seccomp filter. The file descriptor is usually
  handed of to a more privileged supervising process. The supervisor can
  then listen for syscall events caught by the seccomp filter of the
  supervisee and perform actions in lieu of the supervisee, usually
  emulating syscalls. pidfd_getfd() is needed to expand its uses.

  There are currently two major users that wait on pidfd_getfd() and one
  future user:

   - Netflix, Sargun said, is working on a service mesh where users
     should be able to connect to a dns-based VIP. When a user connects
     to e.g. 1.2.3.4:80 that runs e.g. service "foo" they will be
     redirected to an envoy process. This service mesh uses seccomp user
     notifications and pidfd to intercept all connect calls and instead
     of connecting them to 1.2.3.4:80 connects them to e.g.
     127.0.0.1:8080.

   - LXD uses the seccomp notifier heavily to intercept and emulate
     mknod() and mount() syscalls for unprivileged containers/processes.
     With pidfd_getfd() more uses-cases e.g. bridging socket connections
     will be possible.

   - The patchset has also seen some interest from the browser corner.
     Right now, Firefox is using a SECCOMP_RET_TRAP sandbox managed by a
     broker process. In the future glibc will start blocking all signals
     during dlopen() rendering this type of sandbox impossible. Hence,
     in the future Firefox will switch to a seccomp-user-nofication
     based sandbox which also makes use of file descriptor retrieval.
     The thread for this can be found at
     https://sourceware.org/ml/libc-alpha/2019-12/msg00079.html

  With pidfd_getfd() it is e.g. possible to bridge socket connections
  for the supervisee (binding to a privileged port) and taking actions
  on file descriptors on behalf of the supervisee in general.

  Sargun's first version was using an ioctl on pidfds but various people
  pushed for it to be a proper syscall which he duely implemented as
  well over various review cycles. Selftests are of course included.
  I've also added instructions how to deal with merge conflicts below.

  There's also a small fix coming from the kernel mentee project to
  correctly annotate struct sighand_struct with __rcu to fix various
  sparse warnings. We've received a few more such fixes and even though
  they are mostly trivial I've decided to postpone them until after -rc1
  since they came in rather late and I don't want to risk introducing
  build warnings.

  Finally, there's a new prctl() command PR_{G,S}ET_IO_FLUSHER which is
  needed to avoid allocation recursions triggerable by storage drivers
  that have userspace parts that run in the IO path (e.g. dm-multipath,
  iscsi, etc). These allocation recursions deadlock the device.

  The new prctl() allows such privileged userspace components to avoid
  allocation recursions by setting the PF_MEMALLOC_NOIO and
  PF_LESS_THROTTLE flags. The patch carries the necessary acks from the
  relevant maintainers and is routed here as part of prctl()
  thread-management."

* tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim
  sched.h: Annotate sighand_struct with __rcu
  test: Add test for pidfd getfd
  arch: wire up pidfd_getfd syscall
  pid: Implement pidfd_getfd syscall
  vfs, fdtable: Add fget_task helper
2020-01-29 19:38:34 -08:00
..
syscalls threads-v5.6 2020-01-29 19:38:34 -08:00
vdso64 s390/vdso: fix getcpu 2019-11-30 10:52:44 +01:00
.gitignore
alternative.c s390: add automatic detection of the spectre defense 2018-03-28 08:38:24 +02:00
asm-offsets.c s390/vdso: fix getcpu 2019-11-30 10:52:44 +01:00
audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
audit.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
base.S s390/base: remove unused s390_base_mcck_handler 2019-09-03 13:53:56 +02:00
cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_linux.c s390: use generic UID16 implementation 2019-01-18 09:33:18 +01:00
compat_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_ptrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_signal.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
cpcmd.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crash_dump.c memblock: memblock_phys_alloc(): don't panic 2019-03-12 10:04:01 -07:00
debug.c docs: s390: unify and update s390dbf kdocs at debug.c 2019-07-05 13:42:22 +02:00
diag.c s390/kernel: introduce .dma sections 2019-04-29 10:47:10 +02:00
dis.c s390/disassembler: don't hide instruction addresses 2019-11-12 11:24:10 +01:00
dumpstack.c sched/rt, s390: Use CONFIG_PREEMPTION 2019-12-08 14:37:35 +01:00
early.c s390: remove last diag 0x44 caller 2019-12-11 19:53:24 +01:00
early_printk.c s390/sclp: avoid using strncmp with hardcoded length 2019-08-29 15:34:58 +02:00
ebcdic.c s390: ebcdic: convert comments to UTF-8 2018-08-23 18:48:43 -07:00
entry.h s390: fix __EMIT_BUG() macro 2020-01-22 13:05:35 +01:00
entry.S sched/rt, s390: Use CONFIG_PREEMPTION 2019-12-08 14:37:35 +01:00
fpu.c s390: correct some inline assembly constraints 2019-04-17 10:40:57 +02:00
ftrace.c s390/ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR 2019-05-02 13:54:11 +02:00
guarded_storage.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
head64.S s390/head64: correct init_task stack setup 2019-11-30 10:52:45 +01:00
idle.c s390/idle: fix cpu idle time calculation 2019-10-31 17:26:48 +01:00
ima_arch.c s390/kexec_file: Disable kexec_load when IPLed secure 2019-04-29 10:44:03 +02:00
ipl.c s390/protvirt: avoid memory sharing for diag 308 set/store 2019-08-06 13:58:34 +02:00
ipl_vmparm.c s390/ipl: provide uapi header for list directed IPL 2019-04-26 12:34:05 +02:00
irq.c s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
jump_label.c s390/jump_label: remove unused structure definition 2019-06-07 10:10:10 +02:00
kdebugfs.c s390: no need to check return value of debugfs_create functions 2019-01-28 15:58:55 +01:00
kexec_elf.c kexec: Fix file verification on S390 2019-09-10 13:27:51 +01:00
kexec_image.c kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE 2019-08-19 21:54:15 -07:00
kprobes.c s390/kernel: introduce .dma sections 2019-04-29 10:47:10 +02:00
lgr.c s390: kernel: add SPDX identifiers to the remaining files 2017-11-24 15:37:12 +01:00
machine_kexec.c s390/kaslr: store KASLR offset for early dumps 2019-11-30 10:52:45 +01:00
machine_kexec_file.c Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
machine_kexec_reloc.c s390/kaslr: add support for R_390_GLOB_DAT relocation type 2019-10-22 17:55:51 +02:00
Makefile s390: remove compat vdso code 2019-12-01 12:48:49 +01:00
mcount.S s390 updates for the 5.6 merge window 2020-01-28 18:43:08 -08:00
module.c s390/module: avoid using strncmp with hardcoded length 2019-08-29 15:34:57 +02:00
nmi.c s390: simplify disabled_wait 2019-05-02 13:54:11 +02:00
nospec-branch.c s390 updates for the 5.2 merge window 2019-05-06 16:42:54 -07:00
nospec-sysfs.c s390: Convert IS_ENABLED uses to __is_defined 2019-04-11 13:36:53 +02:00
os_info.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_cpum_cf.c s390/cpumf: Adjust registration of s390 PMU device drivers 2019-11-20 17:16:01 +01:00
perf_cpum_cf_common.c s390/cpum_cf: move common functions into a separate file 2019-02-22 09:19:55 +01:00
perf_cpum_cf_diag.c s390/cpumf: Adjust registration of s390 PMU device drivers 2019-11-20 17:16:01 +01:00
perf_cpum_cf_events.c s390/cpumf: Add extended counter set definitions for model 8561 and 8562 2019-07-11 20:40:01 +02:00
perf_cpum_sf.c s390/cpum_sf: Use DIV_ROUND_UP 2020-01-22 13:05:35 +01:00
perf_event.c s390: add error handling to perf_callchain_kernel 2019-10-31 17:20:54 +01:00
perf_regs.c s390/perf: fix gcc 8 array-bounds warning 2018-07-02 11:24:54 +02:00
pgm_check.S s390: fix __EMIT_BUG() macro 2020-01-22 13:05:35 +01:00
process.c s390/process: avoid custom stack unwinding in get_wchan 2019-10-31 17:20:53 +01:00
processor.c processor: get rid of cpu_relax_yield 2019-06-15 12:25:55 +02:00
ptrace.c seccomp: simplify secure_computing() 2019-10-10 14:55:24 -07:00
reipl.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
relocate_kernel.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
runtime_instr.c s390/runtime_instrumentation: re-add signum system call parameter 2018-02-05 07:34:50 +01:00
setup.c TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
signal.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
smp.c s390: remove last diag 0x44 caller 2019-12-11 19:53:24 +01:00
stacktrace.c s390/livepatch: Implement reliable stack tracing for the consistency model 2019-11-30 10:52:48 +01:00
sthyi.c s390/sthyi: Fix machine name validity indication 2018-10-15 12:17:00 +02:00
suspend.c s390: unify linker symbols usage 2018-02-27 08:05:23 +01:00
swsusp.S s390: enforce CONFIG_SMP 2019-06-07 10:09:37 +02:00
sys_s390.c s390: autogenerate compat syscall wrappers 2019-01-18 09:33:19 +01:00
sysinfo.c s390: no need to check return value of debugfs_create functions 2019-01-28 15:58:55 +01:00
time.c s390/time: remove monotonic_clock() 2019-10-31 17:20:52 +01:00
topology.c s390/topology: avoid firing events before kobjs are created 2019-09-23 23:27:52 +02:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
traps.c s390: fix __EMIT_BUG() macro 2020-01-22 13:05:35 +01:00
unwind_bc.c s390/unwind: stop gracefully at user mode pt_regs in irq stack 2019-12-18 23:29:26 +01:00
uprobes.c s390/uprobes: implement arch_uretprobe_is_alive() 2018-04-23 07:57:16 +02:00
vdso.c s390: remove compat vdso code 2019-12-01 12:48:49 +01:00
vmlinux.lds.S vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA 2019-11-04 15:57:41 +01:00
vtime.c sched/cputime: Rename vtime_account_system() to vtime_account_kernel() 2019-10-09 12:39:25 +02:00