Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp697732pxa; Wed, 19 Aug 2020 12:18:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx8sDB+sQY634JCMxJyBqu3euy1N2UcNr3vZb89IhzeX5Cy4DzBkF1DsXMtOaEmn6BJw4P X-Received: by 2002:a50:bf01:: with SMTP id f1mr4053414edk.369.1597864715835; Wed, 19 Aug 2020 12:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597864715; cv=none; d=google.com; s=arc-20160816; b=TlBRZYtkDtOU+2aANHz3YeQmV81Z/ADlySB08jrfIpFmlxTk9dxuxyz01TAPLx57+h 7DDlDrQ8xguyyxcNsH/0DdXaom3Bx+VUoBz0wrHxqTcrQ2tGe0S9/zKmgEOmT2PhjJS1 FppQbyAnZfU2SIwnJEya3lAry8l/+ooxNxLRRdjbbHF2AZ47Y0H8D3TRAUN9iek/Fl0N YlY9GJ9Tuyw9Q6hO6Gl4bNtb/shiPKc584DjYx5OZKnrjLzHQJAbCdSSlpEpr5ASGKFh sySrDHBfbYdC56dCDKS1HW6Ica+0vUC0CwbrJs38ZXygo2mJ6YP6KSIh8Y0YRepTCs/i WX7w== 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; bh=5zSoEYQ5+weQ+2Q1VvM6766yhsowaA7eV/Cff9ht9wE=; b=eftVm8JtP1MfeoVl3oD2GveYpJwil9YhlyRlbU6L2goOfwZGBAICZ+DMd5Cd61IasK dApcKGUMrmNqBu9BMrm0AT2btKY+F8g7Esfg1nuqcPNBMY128wjwfJH2fvsaEsRt5h/T X8B765RB0ANdiu6nexyKoXgLqYovoUypv9Bc+cOcvvDDIMn6pGYXY2LRrbcQL79QTkZi GmMIaWQnELJm3eYClg5pxAP06W7oA4uOln117P7ylTauCuPLbh0eBAs/tt+L958dIY/k x6y/dG4V2pVpkxLsJPnmOJt0aKG4WuKhBP6rj0OQZkPIm9+K1yWhPWvJC3dz0zoUz8H1 Ru5Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si14824064ejg.401.2020.08.19.12.18.12; Wed, 19 Aug 2020 12:18:35 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726707AbgHSTPE (ORCPT + 99 others); Wed, 19 Aug 2020 15:15:04 -0400 Received: from raptor.unsafe.ru ([5.9.43.93]:48526 "EHLO raptor.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbgHSTPE (ORCPT ); Wed, 19 Aug 2020 15:15:04 -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 446D4203BD; Wed, 19 Aug 2020 19:15:00 +0000 (UTC) From: Alexey Gladkov To: LKML , Linux FS Devel , "Eric W . Biederman" Cc: Alexey Gladkov , Alexander Viro , Kees Cook Subject: [PATCH v2 0/2] proc: Relax check of mount visibility Date: Wed, 19 Aug 2020 21:14:48 +0200 Message-Id: <20200819191450.2550994-1-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (raptor.unsafe.ru [5.9.43.93]); Wed, 19 Aug 2020 19:15:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 | 8 ++++++++ fs/proc/root.c | 21 +++++++++++++++------ include/linux/fs.h | 1 + include/linux/proc_fs.h | 1 + 5 files changed, 41 insertions(+), 17 deletions(-) -- 2.25.4