Received: by 10.213.65.68 with SMTP id h4csp1309606imn; Wed, 4 Apr 2018 17:02:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx49T580BypsryF90SJCq1Yn7JUu6HxJS/KvjaNrTI4mtjPs1Ge7xU68eSFXFJzBEAty5nWP3 X-Received: by 10.99.135.67 with SMTP id i64mr13282134pge.346.1522886523129; Wed, 04 Apr 2018 17:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522886523; cv=none; d=google.com; s=arc-20160816; b=Lcz7hDfnayuWqgLZd2sMt+jcT9YIX67Ly/Pv0V/rupOEJKlo9vq3G5PIAgws0l6pKX jT409yKL3difeN3Vw/R0YghNYDaG1mgtEnwCFwN/iHYXbBq91xyurWW7N059WlJrTBCc trZuxRDZqy7e3EW6m5NVgThbYyrS/xXBztp2HQpVzusU2cyqxUVJtH9z6t6431uL+Ce9 +I/7fCmMe684QPRb4QjIk7zb4FjTrHCHoSf2/7/uqiqn6lysy5E5gupIS3a+mZ5xoNDH D/dxklqloht8hPN3q4jOWos2Bu3u+s0xa6ubFbJtpdeg9Wyc7v7JN5G/x1VnyQ0nkcyA mAIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=mNYyREsbsmK4E+Ghaerr9UsHZj5ahq67kFLi8oE9y4Y=; b=SU9cne5CeAbjbII5jJhuvvSM79nzrKXfFetzvs08FL+IMzqwqZFETWHkOoVsXm38Y0 AUZDN/POYmqcdnXL6uyY3oy7hQZlgyzO5+jVRwAJaEh86RT+FqYuUqEf0N29dg9jF2/6 wwW0LSKoyt3KflSxmN/EnKyjuUtLs/AEsiXdAF2PBMvxQzQOvfrxE2Ye/DRc+gyGXav/ lslEpzjTiYxnDA6QKdffp8aKttEvGIlsoYSelHQP+7MzSzydp5QJjIpIbVMs4JwCKZ6E bBMSWGhryMtipeZIsQ/sCiNto1H4THGeknxwfjvQ9LGx7ehVa1ajlUt8u7hDd0W9wnYO MO0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 35-v6si6996691pla.733.2018.04.04.17.01.49; Wed, 04 Apr 2018 17:02:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752688AbeDEAAU (ORCPT + 99 others); Wed, 4 Apr 2018 20:00:20 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:39828 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbeDEAAS (ORCPT ); Wed, 4 Apr 2018 20:00:18 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f3sKA-0001Tp-18; Wed, 04 Apr 2018 18:00:18 -0600 Received: from 67-3-145-25.omah.qwest.net ([67.3.145.25] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f3sK8-0006gG-9a; Wed, 04 Apr 2018 18:00:17 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Alexey Dobriyan Cc: alban.crequy@gmail.com, linux-kernel@vger.kernel.org References: <20180404174909.GB2540@avx2> Date: Wed, 04 Apr 2018 18:59:08 -0500 In-Reply-To: <20180404174909.GB2540@avx2> (Alexey Dobriyan's message of "Wed, 4 Apr 2018 20:49:09 +0300") Message-ID: <87k1tmed6b.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1f3sK8-0006gG-9a;;;mid=<87k1tmed6b.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=67.3.145.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+nHnl3DYLXyoJegb2k8iEmskhxhYZ9urY= X-SA-Exim-Connect-IP: 67.3.145.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa07.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TR_Symld_Words,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG, XMSolicitRefs_0,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 1.5 TR_Symld_Words too many words that have symbols inside * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4956] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Alexey Dobriyan X-Spam-Relay-Country: X-Spam-Timing: total 1152 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 3.5 (0.3%), b_tie_ro: 2.5 (0.2%), parse: 1.14 (0.1%), extract_message_metadata: 3.8 (0.3%), get_uri_detail_list: 1.26 (0.1%), tests_pri_-1000: 4.1 (0.4%), tests_pri_-950: 1.31 (0.1%), tests_pri_-900: 1.00 (0.1%), tests_pri_-400: 16 (1.4%), check_bayes: 15 (1.3%), b_tokenize: 4.4 (0.4%), b_tok_get_all: 5 (0.5%), b_comp_prob: 1.69 (0.1%), b_tok_touch_all: 2.2 (0.2%), b_finish: 0.67 (0.1%), tests_pri_0: 1106 (96.0%), check_dkim_signature: 0.53 (0.0%), check_dkim_adsp: 3.7 (0.3%), tests_pri_500: 6 (0.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] [RFC][WIP] namespace.c: Allow some unprivileged proc mounts when not fully visible X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexey Dobriyan writes: >> The only option I have seen proposed that might qualify as something >> general purpose and simple is a new filesystem that is just the process >> directories of proc. > > While "mount -t pid" and "mount -t sysctl" are decades overdue, I don't > think they cover everything. > > IIRC some gcc versions read /proc/meminfo on every invocation. Now > imagine such program doesn't have a fallback if /proc/ doesn't exist > (how many thousands such programs are there?) So user is going to ask > for /proc with just /proc/meminfo only. At this point it is back to > nearly full /proc. To avoid falling susceptible to the kinds of checks in fs_fully_visible we can only offer information about objects that root in the user namespace has privilege over. So "mount -t pid" good. A "/proc/meminfo" bad. Which in short means if "mount -t pid" isn't good enough. There really isn't anything the kernel can do. Eric