public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Tony Jones <tonyj@suse.de>
Cc: linux-audit@redhat.com
Subject: Re: PATCH: ausearch doesn't correcly act as a filter when no EOF on input
Date: Tue, 18 Nov 2008 10:29:56 -0500	[thread overview]
Message-ID: <200811181029.56205.sgrubb@redhat.com> (raw)
In-Reply-To: <20081118001753.GA10221@suse.de>

On Monday 17 November 2008 19:17:54 Tony Jones wrote:
> Issue is that tail -f never indicates EOF and if ausearch stdout is a pipe
> (versus a file), the output can remain queued in the pipebuf.

The general problem is a little bigger. ausearch can't tell when an event is 
complete. It assumes that the kernel serializes things - which it doesn't. 
With files, it flushes everything when it hits EOF. But pipes don't have 
that. The solution I was going to implement was to start a timer when the 
input is a pipe and timeout the currently accumulating event. Flushing the 
output if using a pipe looks like a good measure, too.


> Following patch fixes it, or a simpler patch could unconditionally flush
> stdout.

I'd rather not flush all the time otherwise the performance improvement of 
buffering is lost. I currently have ausearch completely tore apart to rework 
its event collection logic so that interlaced events are assembled correctly 
and completely. Maybe in a few days I can revisit this problem.


> I've not looked for similar issues elsewhere.

aureport shares much of the same IO design and the auparse library also does 
not use clock time to finish off events if the input is a pipe.

-Steve

  reply	other threads:[~2008-11-18 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-18  0:17 PATCH: ausearch doesn't correcly act as a filter when no EOF on input Tony Jones
2008-11-18 15:29 ` Steve Grubb [this message]
2008-11-19 18:26 ` Steve Grubb

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=200811181029.56205.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=tonyj@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox