Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4168785pxk; Tue, 29 Sep 2020 16:51:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHLgmmUC0DzDF7F9GsMjmlil1svWIWEeh0up1LUTGem05yGEN7akcdjYjvw9cvEDSFqV/5 X-Received: by 2002:a05:6402:1148:: with SMTP id g8mr6115642edw.271.1601423484421; Tue, 29 Sep 2020 16:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601423484; cv=none; d=google.com; s=arc-20160816; b=zIesFnFt/6r8kc2iG2gwEhLno8vZ5a3AjkDLapSHEEjey/1Hj4z/Zhckdv/CWdFvim DdLFAp3YQCAIEJhSZhkfzMw7R1qZyRNl18k7v/h+mTd/xZ+3Yluwi3mokPs83fp8dKRa QTg+2VkSiC/2RJBNpaUl1DHUANb0TAkyyHR2vcZft8uRZWWSAhGuO2EkqA/bKhQ9pg6v Sp7On7VycQZWIHJMAwYjKneS+wDwRtD5uzUUU68l4JmWgSvzP2mqmahjozaPiuRq9Owm aK7qma514kfqty8XhzDJKm8uItx/qNNdxQ4Gzgzw7FN7teSfJ4Pom7rnMG7FBzwRJNrc EM2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=QnD3o3J1sUFsgHKGImjEGRjxZIFNVEmjCW7+AQER4m4=; b=0xeWwTJtZMk8rByx+KDnSOnqv6ieov7F65tsqXcAzkIccTuIvXPv7qj77pDmvSoNg0 uo04BQfKuy/ilY+7DW/bm2k1+dfReYikqaEV23ba6pHXC5di5aiLOXS+8HUuVVKWj/qm Sceqwl3EgETaDQf5x69FeqlcUjlFIiaKVd8lraOIYg1HDM994G7Gv9P25SwD2FBLYowi RiJKZWLr7j3uxw7DwljWvNEB2PRG7ld5Mx2j7iEpafxiU2ATUJ02YRqXOKj5AspITzcn xqqRtaX5MINLDycG06n2NNaRFzKhm0Rv8AZvMssS2dD2OfQQWeP8XjTsFfsfOSN9SZhb 7+EQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn25si3912269edb.268.2020.09.29.16.51.01; Tue, 29 Sep 2020 16:51:24 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729283AbgI2Xt3 (ORCPT + 99 others); Tue, 29 Sep 2020 19:49:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:47292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728192AbgI2Xt3 (ORCPT ); Tue, 29 Sep 2020 19:49:29 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 810B020897; Tue, 29 Sep 2020 23:49:26 +0000 (UTC) Date: Tue, 29 Sep 2020 19:49:24 -0400 From: Steven Rostedt To: Kees Cook Cc: kernel-hardening@lists.openwall.com, John Wood , Matthew Wilcox , Jonathan Corbet , Alexander Viro , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Luis Chamberlain , Iurii Zaikin , James Morris , "Serge E. Hallyn" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [RFC PATCH 3/6] security/fbfam: Use the api to manage statistics Message-ID: <20200929194924.31640617@oasis.local.home> In-Reply-To: <20200929194712.541c860c@oasis.local.home> References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-4-keescook@chromium.org> <202009101625.0E3B6242@keescook> <20200929194712.541c860c@oasis.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Sep 2020 19:47:12 -0400 Steven Rostedt wrote: > On Thu, 10 Sep 2020 16:33:38 -0700 > Kees Cook wrote: > > > > @@ -1940,6 +1941,7 @@ static int bprm_execve(struct linux_binprm *bprm, > > > task_numa_free(current, false); > > > if (displaced) > > > put_files_struct(displaced); > > > + fbfam_execve(); > > > > As mentioned in the other emails, I think this could trivially be > > converted into an LSM: all the hooks are available AFAICT. If you only > > want to introspect execve _happening_, you can use bprm_creds_for_exec > > which is called a few lines above. Otherwise, my prior suggestion ("the > > exec has happened" hook via brpm_cred_committing, etc). > > And if its information only, you could just register a callback to the > trace_sched_process_exec() tracepoint and do whatever you want then. > > The tracepoints are available for anyone to attach to. Not just tracing. > And there's also trace_sched_process_fork() and trace_sched_process_exit(). -- Steve