From patchwork Mon Jul 27 14:14:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Gladkov X-Patchwork-Id: 11686961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCA7114B7 for ; Mon, 27 Jul 2020 14:29:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF16420838 for ; Mon, 27 Jul 2020 14:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732060AbgG0OXV (ORCPT ); Mon, 27 Jul 2020 10:23:21 -0400 Received: from raptor.unsafe.ru ([5.9.43.93]:51896 "EHLO raptor.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732046AbgG0OXU (ORCPT ); Mon, 27 Jul 2020 10:23:20 -0400 Received: from comp-core-i7-2640m-0182e6.redhat.com (ip-89-102-33-211.net.upcbroadband.cz [89.102.33.211]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by raptor.unsafe.ru (Postfix) with ESMTPSA id BB28120479; Mon, 27 Jul 2020 14:15:40 +0000 (UTC) From: Alexey Gladkov To: LKML Cc: Linux FS Devel , Alexander Viro , Alexey Gladkov , "Eric W . Biederman" , Kees Cook Subject: [PATCH v1 0/2] proc: Relax check of mount visibility Date: Mon, 27 Jul 2020 16:14:09 +0200 Message-Id: <20200727141411.203770-1-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (raptor.unsafe.ru [5.9.43.93]); Mon, 27 Jul 2020 14:15:41 +0000 (UTC) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org If only the dynamic part of procfs is mounted (subset=pid), then there is no need to check if procfs is fully visible to the user in the new user namespace. Alexey Gladkov (2): proc: Relax check of mount visibility Show /proc/self/net only for CAP_NET_ADMIN fs/namespace.c | 27 ++++++++++++++++----------- fs/proc/proc_net.c | 6 ++++++ fs/proc/root.c | 16 +++++++++------- include/linux/fs.h | 1 + 4 files changed, 32 insertions(+), 18 deletions(-)