From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 604BEC47423 for ; Tue, 29 Sep 2020 23:47:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 191B520897 for ; Tue, 29 Sep 2020 23:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729126AbgI2XrR (ORCPT ); Tue, 29 Sep 2020 19:47:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:45688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728192AbgI2XrQ (ORCPT ); Tue, 29 Sep 2020 19:47:16 -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 E17E7206DC; Tue, 29 Sep 2020 23:47:13 +0000 (UTC) Date: Tue, 29 Sep 2020 19:47:12 -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: <20200929194712.541c860c@oasis.local.home> In-Reply-To: <202009101625.0E3B6242@keescook> References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-4-keescook@chromium.org> <202009101625.0E3B6242@keescook> 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 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. -- Steve