From: Steve Grubb <sgrubb@redhat.com>
To: "Lucas C. Villa Real" <lucasvr@gobolinux.org>
Cc: linux-audit@redhat.com
Subject: Re: Handling -ENOBUFS
Date: Wed, 5 Nov 2008 17:05:27 -0500 [thread overview]
Message-ID: <200811051705.27282.sgrubb@redhat.com> (raw)
In-Reply-To: <2c03f9590811051256k3548a16i6ffc3060f54d11c8@mail.gmail.com>
On Wednesday 05 November 2008 15:56:30 Lucas C. Villa Real wrote:
> >> Looking the code at lib/netlink.c, I saw that audit_send() doesn't
> >> handle -ENOBUFS. Would it be possible to replace the condition from
> >> "while (retval < 0 && errno == EINTR)" to "while (retval < 0 && (errno
> >> == EINTR || errno == ENOBUFS))" to fix the problem when sending
> >> packets from userspace to kernel?
> >
> > Have you tried that? Does it fix the problem or just hang the utility?
>
> So far it didn't hang. However, just in case, I added a maximum number
> of retries (currently set to 64). I'm about to launch a new batch to
> stress the system once again, and then I'll be able to see if it works
> as expected.
If it works out, send a patch to the list and I'll pull it into the next
release.
> >> One interesting thing which I noticed is that 'auditctl -s' doesn't
> >> report that messages were lost,
> >
> > They weren't lost by the audit system so it doesn't know they didn't
> > arrive.
>
> Do you think it would make sense to add an extra member to struct
> sk_buff (a pointer to a callback function) and then have
> skb_queue_tail() signal if it failed to send a message? That would
> allow audit to keep track of such losses, as well as any other
> subsystem using netlink for communicating with userspace.
The network developers generally frown on anything getting added to sk_buff
since that affects overall system performance. You would probably want to
take this issue up with them on the net-dev mail list. I would be supportive
of anything that adds reliability. But they control the code base for that
part of the kernel.
-Steve
next prev parent reply other threads:[~2008-11-05 22:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-05 16:30 Handling -ENOBUFS Lucas C. Villa Real
2008-11-05 18:19 ` Steve Grubb
2008-11-05 20:56 ` Lucas C. Villa Real
2008-11-05 22:05 ` Steve Grubb [this message]
2008-11-06 14:16 ` Eric Paris
2008-11-10 21:25 ` Lucas C. Villa Real
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=200811051705.27282.sgrubb@redhat.com \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=lucasvr@gobolinux.org \
/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