Subject: Re: [PATCH v2] netlink, audit: prevent false ENOBUFS on timeout expiry

From: Jakub Kicinski <[email-masked]>
Date: Thu, 28 May 2026 16:29:01 -0700

On Thu, 28 May 2026 18:40:44 -0400 Steve Grubb wrote:
> > > (3) A new NETLINK_F_RECV_NO_ENOBUFS socket flag doesn't exist in stable
> > > kernels where this bug is actively impacting users  
> > 
> > Which commit are you referring to? Isn't that flag itself ancient?  
> 
> You're right, it is. I see how this flag would fix the pathological behavior 
> that was reported. But as I have looked at this suggestion, there seems to be 
> one wrinkle. User space should not need to know that the audit code in the 
> kernel has this retry mechanism. 

It's not about the retry mechanism, at least in my mind - I read 
your reply as "user space should not know that there was congestion".
Why? It's not very useful, I get that, but user space can just clear
the congestion signal and keep going.

> It seems like the audit subsystem should set the flag on auditd's
> socket at registration time in auditd_set(). The kernel is the right
> place for this because it's the kernel that manages the retry/ hold
> queues and sets the sk_sndtimeo that triggers the overrun path -
> auditd has no knowledge of these internals.

We have to carry this code somewhere, either in user space or in 
the kernel. I'd prefer not to carry it in the kernel.