Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp522124ybh; Wed, 15 Jul 2020 08:11:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+q6ZdWTsNbhyTqQIxcOpwscOYhvav3SIwGN3WeooBU/s4NmnVyX98PtaL2kqClDH7OTR5 X-Received: by 2002:a05:6402:1803:: with SMTP id g3mr35549edy.377.1594825874253; Wed, 15 Jul 2020 08:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594825874; cv=none; d=google.com; s=arc-20160816; b=lQmbU1+ul1FiyJtUCTvbBz4xHkq7ST0E2/XW46Lr3y1Na2YNYhqarOZ9u0fIo/GQNl VzKZCsjuKJWLYUnsnl8wMvpei9HRoY4v0pcZmYb5N3ZFnSSq4nC+OvrCM8i8IOMUxH// sI8TNDza4k6k7LofpqF+Yhyk3GbSVxN7SSyQkwvVWqB8VCt36MTrkDbkxfpH9pNA9Joh ZbVwo361p4j7Qcu6GDamF8Ey0D9wRHTer6FYmZIEA3y9ANBo9Wyj1qOlBzlwnlszFbYM LDQMNQGftmb9FaNX83dIuEs9f2GdNypo1K7nzIZ8TjYJDItiZsVv8RqjfRa5HRimXHgl tDZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1fvLIJmOwRL614IRTzUzRvcpKzmvu8HEJzgWfAQOOkY=; b=mVpATTNVncTyskBZR3beTBVF7YS3GWRtE8UGWXzizYr7Ps8LzPNX+5plVOEXZVZnUy C9vvFELv6JqjkdEgF0kHf+Si8c3qxNSYm97HKg7mAQJtuwpKGwlSt4auPNzxNGJz2uG+ ijILK+oai4gmQRdV2KuMrDjTFDCMXh2uUz8EhvnK0epqZAgKJrTDwh/4a2yjzvxGI4+8 sncNWFgROPe+2B9XcDtdRW6tqwP0fm8Ze8eDUHZoct6bi04ZomxyxjN0nUieKK9GmFbp TRZ3L1xMpJT/52HNeMaEgBYBm/I8PNPg5aPVDAyqKqf3TFC2FFHSYWZjUA2D1vauqjPb v4/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fVZs4NzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si1394210edy.264.2020.07.15.08.10.50; Wed, 15 Jul 2020 08:11:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fVZs4NzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726160AbgGOOvJ (ORCPT + 99 others); Wed, 15 Jul 2020 10:51:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20484 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725792AbgGOOvJ (ORCPT ); Wed, 15 Jul 2020 10:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594824668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1fvLIJmOwRL614IRTzUzRvcpKzmvu8HEJzgWfAQOOkY=; b=fVZs4NzD0/nBlnXJ5nUj3UP0A5KJVL+7L92eQK5O5kiryslDj5QZX6nPnpGO3VufUN7zEQ 3PxpSDDvcCGod3fEq+1bykvq1TidvkTtD9iGC+ABbk6IWPz8100exfbEZm7HXFFx1IUzaX /jlA2DmO6WM5its6KJeDHyoKezSEMiE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-kLxQ-1JiOTihBG6m4jD4VA-1; Wed, 15 Jul 2020 10:51:06 -0400 X-MC-Unique: kLxQ-1JiOTihBG6m4jD4VA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5DA74107ACCA; Wed, 15 Jul 2020 14:51:02 +0000 (UTC) Received: from dcbz.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8603860BF1; Wed, 15 Jul 2020 14:50:51 +0000 (UTC) From: Adrian Reber To: Christian Brauner , Eric Biederman , Pavel Emelyanov , Oleg Nesterov , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nicolas Viennot , =?UTF-8?q?Micha=C5=82=20C=C5=82api=C5=84ski?= , Kamil Yurtsever , Dirk Petersen , Christine Flood , Casey Schaufler Cc: Mike Rapoport , Radostin Stoyanov , Adrian Reber , Cyrill Gorcunov , Serge Hallyn , Stephen Smalley , Sargun Dhillon , Arnd Bergmann , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, selinux@vger.kernel.org, Eric Paris , Jann Horn , linux-fsdevel@vger.kernel.org Subject: [PATCH v5 0/6] capabilities: Introduce CAP_CHECKPOINT_RESTORE Date: Wed, 15 Jul 2020 16:49:48 +0200 Message-Id: <20200715144954.1387760-1-areber@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is v5 of the 'Introduce CAP_CHECKPOINT_RESTORE' patchset. The changes to v4 are: * split into more patches to have the introduction of CAP_CHECKPOINT_RESTORE and the actual usage in different patches * reduce the /proc/self/exe patch to only be about CAP_CHECKPOINT_RESTORE Adrian Reber (5): capabilities: Introduce CAP_CHECKPOINT_RESTORE pid: use checkpoint_restore_ns_capable() for set_tid pid_namespace: use checkpoint_restore_ns_capable() for ns_last_pid proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE selftests: add clone3() CAP_CHECKPOINT_RESTORE test Nicolas Viennot (1): prctl: Allow checkpoint/restore capable processes to change exe link fs/proc/base.c | 8 +- include/linux/capability.h | 6 + include/uapi/linux/capability.h | 9 +- kernel/pid.c | 2 +- kernel/pid_namespace.c | 2 +- kernel/sys.c | 12 +- security/selinux/include/classmap.h | 5 +- tools/testing/selftests/clone3/Makefile | 4 +- .../clone3/clone3_cap_checkpoint_restore.c | 203 ++++++++++++++++++ 9 files changed, 236 insertions(+), 15 deletions(-) create mode 100644 tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c base-commit: d31958b30ea3b7b6e522d6bf449427748ad45822 -- 2.26.2