From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eugene Crosser <crosser@average.org>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: Suboptimal error handling in libnftables
Date: Thu, 2 Dec 2021 16:50:36 +0100 [thread overview]
Message-ID: <YajrTJdijegQCBgZ@salvia> (raw)
In-Reply-To: <ed4f2e2e-50c5-926a-305d-4cd1c7550392@average.org>
On Thu, Dec 02, 2021 at 03:03:04PM +0100, Eugene Crosser wrote:
> Hello Pablo,
>
> On 02/12/2021 14:54, Pablo Neira Ayuso wrote:
>
> >> 1. All read-from-the-socket functions should be run in a loop, repeating
> >> if return code is -1 and errno is EINTR. I.e. EINTR should not be
> >> treated as an error, but as a condition that requires retry.
> [...]> This missing EINTR handling for iface_cache_update() is a bug, would
> > you post a patch for this?
>
> I have a patch that is currently under our internal testing. Will post
> it here once I get the results of testing.
>
> >> There is another function that calls exit(), __netlink_abi_error(). I
> >> believe that even in such a harsh situation, exit() is not the right way
> >> to handle it.
> >
> > ABI breakage between kernel and userspace should not ever happen.
>
> Well, maybe at least use abort() then? It's better to have a dump with a
> stack trace than have the process silently terminate. Libnftables may be
> deep down the stack of dependencies, it can be hard to find the source
> of the problem from just an stderr message.
Please post a patch to use abort() in this ABI breakage case too.
Thanks.
next prev parent reply other threads:[~2021-12-02 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 13:16 Suboptimal error handling in libnftables Eugene Crosser
2021-12-02 13:54 ` Pablo Neira Ayuso
2021-12-02 14:03 ` Eugene Crosser
2021-12-02 15:50 ` Pablo Neira Ayuso [this message]
2021-12-06 16:58 ` Eugene Crosser
2021-12-06 19:56 ` Pablo Neira Ayuso
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=YajrTJdijegQCBgZ@salvia \
--to=pablo@netfilter.org \
--cc=crosser@average.org \
--cc=netfilter-devel@vger.kernel.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