Skip to contentSkip to conversation

netfilter is not a filesystem

DISCUSSION Andrew Morton 4 participants 4 messages Feb 10, 2011 – Feb 14, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw
Quoted 4 lines · On Thu, 10 Feb 2011 21:55:26 GMT [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=28862

Summary: /proc/net/ip_conntrack: no space left on device
systematically

This is why I'm forever nagging people to not just grab some errno because its name happens to sound similar to the error you just detected.

Yes, it superficially seems nice and logical for netfilter to use ENOSPC when it runs out of space. But when that error code propagates up to the user, they see "no space left on device" and will then run "df" and wonder what the hell happened to their computer.

The kernel makes this mistake a *lot*. EFBIG in the rtc drivers? Really?

maintainer
#2 lore raw

From: Andrew Morton <[email protected]>
Date: Thu, 10 Feb 2011 14:11:19 -0800

Quoted 11 lines
Quoted 4 lines · On Thu, 10 Feb 2011 21:55:26 GMT [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=28862

Summary: /proc/net/ip_conntrack: no space left on device
systematically

This is why I'm forever nagging people to not just grab some errno because its name happens to sound similar to the error you just detected.

Quoted 6 lines

Yes, it superficially seems nice and logical for netfilter to use ENOSPC when it runs out of space. But when that error code propagates up to the user, they see "no space left on device" and will then run "df" and wonder what the hell happened to their computer.

The kernel makes this mistake a *lot*. EFBIG in the rtc drivers? Really?

We are in this conundrum because the granularity of errors which can be indicated by errno signalling is very low.

And one way people handle this is to use all sorts of different types of errno values to indicate the different cases.

Also, one can argue that it is erroneous for userspace to assume that error codes are not context dependent. They most certainly are.

#3 lore raw
In reply to Andrew Morton
Quoted 10 lines · Andrew Morton
Quoted 4 lines · On Thu, 10 Feb 2011 21:55:26 GMT [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=28862

Summary: /proc/net/ip_conntrack: no space left on device
systematically

This is why I'm forever nagging people to not just grab some errno because its name happens to sound similar to the error you just detected.

Today my brain has thrown an -EMIXEDMESSAGES:

https://lkml.org/lkml/2011/2/10/172

Sorry, couldn't resist,

Richard

#4 lore raw
In reply to Andrew Morton

Am 10.02.2011 23:11, schrieb Andrew Morton:

Quoted 8 lines
Quoted 4 lines · On Thu, 10 Feb 2011 21:55:26 GMT [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=28862

Summary: /proc/net/ip_conntrack: no space left on device
systematically

Quoted 8 lines

This is why I'm forever nagging people to not just grab some errno because its name happens to sound similar to the error you just detected.

Yes, it superficially seems nice and logical for netfilter to use ENOSPC when it runs out of space. But when that error code propagates up to the user, they see "no space left on device" and will then run "df" and wonder what the hell happened to their computer.

In this case this seems to be a simple bug, the seq_file callbacks want to indicate that the current buffer is full, using an incorrect code. I'm not sure why ENOSPC is used, this probably has never worked (and strangely nobody seems to have noticed).

This bug is probably present in more parts of netfilter, I'll do an audit and fix up all similar problems.