All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Mike Galbraith <efault@gmx.de>, Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	jlayton@redhat.com
Subject: Re: [PATCH 1/1] audit: Use a tracepoint for getname
Date: Thu, 20 Sep 2012 08:11:36 -0700	[thread overview]
Message-ID: <20120920151136.GD11325@ghostprotocols.net> (raw)
In-Reply-To: <20120920090545.465ca00d@redhat.com>

Em Thu, Sep 20, 2012 at 09:05:45AM -0400, Eric Paris escreveu:
> cc'ing Jeff Layton who has recently done a lot of getname work and I
> want to make sure he sees this.

Thanks, will try with his patchset applied, but see below...
 
> On Wed, 19 Sep 2012 15:56:59 -0700
> Arnaldo Carvalho de Melo <acme@ghostprotocols.net> wrote:
> > @@ -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

I don't have an opinion on that matter, just used what is done on the 'true'
part of that other else, some lines above the register_trace_getname if:

        audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT,
                                           THIS_MODULE, &cfg);
        if (!audit_sock)
                audit_panic("cannot initialize netlink socket");
        else
                audit_sock->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT;

> 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

But then why audit_panic is called when netlink_kernel_create fails?

> broken, which customers who want audit_panic == panic would be most
> upset about.
> 
> Otherwise, its good to me.

Thanks!

- Arnaldo

      parent reply	other threads:[~2012-09-20 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 22:56 [PATCH 1/1] audit: Use a tracepoint for getname Arnaldo Carvalho de Melo
2012-09-20  7:10 ` Ingo Molnar
2012-09-20 13:05 ` Eric Paris
2012-09-20 13:32   ` Steven Rostedt
2012-09-20 15:11   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120920151136.GD11325@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eparis@redhat.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.