Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4168545pxk; Tue, 29 Sep 2020 16:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh4yUGaeFtsFWHadZonXqk59rz2nyopSTKbWEoyIddiBzi9UzMqj8gurmhH9loJB2K2J0y X-Received: by 2002:aa7:d5c2:: with SMTP id d2mr6162823eds.234.1601423451506; Tue, 29 Sep 2020 16:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601423451; cv=none; d=google.com; s=arc-20160816; b=qWkuOLb5clNIc/ngYMr5dawn69AC7NFczaemtitaBjYr8BrMKgxOveZnzrAaGUFlVQ iKQpVT2hRJaX0WbboBBRNiONIqXw7RYzs6UckW1aJRiGCEwOZKC4DXrpYGkIQCI5gHFP Vw7cRu3DeFU93DjWciOS5Ao3bHI1jvKbteQicKwYBtUKYh+Rb6S5AJUcfRneaSxeJ82n dX9iUj5ETSNwzVtOqhstnyCeq9gTu8Zsr5zBuszc6bq92XQ3PwhHgn4Hawpkr+WVzdMV bN0AJ/lw35fd2+vyElmptzzajhG1IJyaV9JHoz6V0znRlGHz2ZzD1A+RWTsAc9QSo4oQ ZEew== 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=RQifAxVHKsD6JhQMcQamozD7w96uGfXLXKzBaesv/FI=; b=xSZazbNCbuNVKJNf/J9I+6JOptZTUbkDpv4VEs+WWiRi6v98i5FounUM85Te8Hpn3L eAh4jDSapos5usDtvcfvACGP6uR63iyUSjR1gmH831MNur870R6lSAlUXa2DAxw9ElQN Km7oQoAI2XLF55Hz0K6om1jlHwtkLJIUv+TogSashhFwvcR2uaCcrK5AQTTCedYY+k7N sW9qzmiwH9FAFL9NgWtGUkoSQKnodUaALoIBLf8ZBpT9e/jP8Lm57QVAy39ABwMLceml v8DDbD5LSc3E+GAP7X2hp1zyaYugcGBy45se4fnTONA80iF72zKD17YZ34ygHCerKB6i JQMA== 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 k12si3576323ejx.712.2020.09.29.16.50.28; Tue, 29 Sep 2020 16:50:51 -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 S1729059AbgI2XrR (ORCPT + 99 others); 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