All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 1/2] libnftables: drop gmp_init() and mp_set_memory_functions()
Date: Tue, 19 Sep 2023 15:42:40 +0200	[thread overview]
Message-ID: <ZQmlUExigKwdqDI6@calendula> (raw)
In-Reply-To: <20230919123621.2770734-1-thaller@redhat.com>

On Tue, Sep 19, 2023 at 02:36:16PM +0200, Thomas Haller wrote:
> Setting global handles for libgmp via mp_set_memory_functions() is very
> ugly. When we don't use mini-gmp, then potentially there are other users
> of the library in the same process, and every process fighting about the
> allocation functions is not gonna work.
> 
> It also means, we must not reset the allocation functions after somebody
> already allocated GMP data with them. Which we cannot ensure, as we
> don't know what other parts of the process are doing.
> 
> It's also unnecessary. The default allocation functions for gmp and
> mini-gmp already abort the process on allocation failure ([1], [2]),
> just like our xmalloc().
> 
> Just don't do this.

Applied, thanks

      parent reply	other threads:[~2023-09-19 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 12:36 [PATCH nft 1/2] libnftables: drop gmp_init() and mp_set_memory_functions() Thomas Haller
2023-09-19 12:36 ` [PATCH nft 2/2] libnftables: move init-once guard inside xt_init() Thomas Haller
2023-09-19 13:42   ` Pablo Neira Ayuso
2023-09-19 13:42 ` Pablo Neira Ayuso [this message]

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=ZQmlUExigKwdqDI6@calendula \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=thaller@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.