From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753286AbcGKWJi (ORCPT ); Mon, 11 Jul 2016 18:09:38 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:53390 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbcGKWJg (ORCPT ); Mon, 11 Jul 2016 18:09:36 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Topi Miettinen Cc: linux-kernel@vger.kernel.org, mladek@suse.com, luto@kernel.org, serge@hallyn.com, keescook@chromium.org, Paul Moore , Eric Paris , Tejun Heo , Li Zefan , Johannes Weiner , Serge Hallyn , linux-audit@redhat.com (moderated list:AUDIT SUBSYSTEM), cgroups@vger.kernel.org (open list:CONTROL GROUP (CGROUP)), linux-security-module@vger.kernel.org (open list:CAPABILITIES) References: <1468235672-3745-1-git-send-email-toiwoton@gmail.com> Date: Mon, 11 Jul 2016 16:57:03 -0500 In-Reply-To: <1468235672-3745-1-git-send-email-toiwoton@gmail.com> (Topi Miettinen's message of "Mon, 11 Jul 2016 14:14:31 +0300") Message-ID: <87vb0bbzyo.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1bMjOM-0004yx-TI;;;mid=<87vb0bbzyo.fsf@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19lC9CPzt1Rd8N79BkvzwQuqbuDUbIz0Qk= X-SA-Exim-Connect-IP: 67.3.204.119 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 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.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Topi Miettinen X-Spam-Relay-Country: X-Spam-Timing: total 351 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 3.4 (1.0%), b_tie_ro: 2.5 (0.7%), parse: 0.63 (0.2%), extract_message_metadata: 2.3 (0.6%), get_uri_detail_list: 0.85 (0.2%), tests_pri_-1000: 3.4 (1.0%), tests_pri_-950: 1.18 (0.3%), tests_pri_-900: 0.99 (0.3%), tests_pri_-400: 18 (5.1%), check_bayes: 17 (4.8%), b_tokenize: 5 (1.4%), b_tok_get_all: 6 (1.7%), b_comp_prob: 1.69 (0.5%), b_tok_touch_all: 2.3 (0.7%), b_finish: 0.68 (0.2%), tests_pri_0: 308 (87.9%), check_dkim_signature: 0.44 (0.1%), check_dkim_adsp: 88 (25.0%), tests_pri_500: 3.9 (1.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] capabilities: audit capability use 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Topi Miettinen writes: > There are many basic ways to control processes, including capabilities, > cgroups and resource limits. However, there are far fewer ways to find > out useful values for the limits, except blind trial and error. > > Currently, there is no way to know which capabilities are actually used. > Even the source code is only implicit, in-depth knowledge of each > capability must be used when analyzing a program to judge which > capabilities the program will exercise. > > Generate an audit message at system call exit, when capabilities are used. > This can then be used to configure capability sets for services by a > software developer, maintainer or system administrator. > > Test case demonstrating basic capability monitoring with the new > message types 1330 and 1331 and how the cgroups are displayed (boot to > rdshell): You totally miss the interactions with the user namespace so this won't give you the information you are aiming for. Eric