From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074Ab2ITNGS (ORCPT ); Thu, 20 Sep 2012 09:06:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249Ab2ITNGQ (ORCPT ); Thu, 20 Sep 2012 09:06:16 -0400 Date: Thu, 20 Sep 2012 09:05:45 -0400 From: Eric Paris To: Arnaldo Carvalho de Melo Cc: Al Viro , David Ahern , Frederic Weisbecker , Ingo Molnar , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian , Steven Rostedt , Thomas Gleixner , Linux Kernel Mailing List , jlayton@redhat.com Subject: Re: [PATCH 1/1] audit: Use a tracepoint for getname Message-ID: <20120920090545.465ca00d@redhat.com> In-Reply-To: <20120919225659.GA11325@ghostprotocols.net> References: <20120919225659.GA11325@ghostprotocols.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cc'ing Jeff Layton who has recently done a lot of getname work and I want to make sure he sees this. On Wed, 19 Sep 2012 15:56:59 -0700 Arnaldo Carvalho de Melo wrote: > Al, Eric, > > Was this considered before? Acceptable? > > - Arnaldo > > --- > > Instead of an explicit hook only for audit, use a tracepoint, so that > other users that need to know about filenames can hook there just like > audit. > @@ -978,6 +986,9 @@ static int __init audit_init(void) > else > audit_sock->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; > > + if (register_trace_getname(audit_getname, NULL)) > + audit_panic("cannot register getname tracepoint"); > + > skb_queue_head_init(&audit_skb_queue); > skb_queue_head_init(&audit_skb_hold_queue); > audit_initialized = AUDIT_INITIALIZED; I think we need to just use panic instead of audit_panic. This early at boot userspace would not have been able to tell the kernel that audit_panic == panic nor would the box die later if userspace ask for that functionality. Instead the box would run but audit would be broken, which customers who want audit_panic == panic would be most upset about. Otherwise, its good to me. -Eric