All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-amarula@amarulasolutions.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 6/6] package/libopenssl: add new configuration options
Date: Sun, 23 Jun 2024 22:59:24 +0200	[thread overview]
Message-ID: <ZniMrEilTBNB_RvT@landeda> (raw)
In-Reply-To: <20240621161049.4085310-6-dario.binacchi@amarulasolutions.com>

Dario, All,

On 2024-06-21 18:10 +0200, Dario Binacchi spake thusly:
> The transition from version 1.1 to 3.0.9, and subsequently to 3.3.1,
> added new compilation options. This led to a significant increase in the
> size of the library. These options allow user to disable these features
> to obtain a smaller library size.
> 
> To ensure backward compatibility, all items are selected by default.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
[--SNIP--]
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL
> +	bool "enable thread pool"
> +	default y
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	help
> +	  Build with thread pool functionality. If enabled, OpenSSL
> +	  algorithms may use the thread pool to perform parallel
> +	  computation. This option in itself does not enable OpenSSL
> +	  to spawn new threads. Currently the only supported thread
> +	  pool mechanism is the default thread pool.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_DEFAULT_THREAD_POOL
> +	bool "enable default thread pool"
> +	default y
> +	depends on BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL
> +	help
> +	  Build with default thread pool functionality. If enabled,
> +	  OpenSSL may create and manage threads up to a maximum number
> +	  of threads authorized by the application. Supported on POSIX
> +	  compliant platforms.

I'm not sure I understand how those two play together...

If I understand correctly, BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL
only adds support for using a thread-pool, but ativates not such
thread-pool.

When thread-pool support is enabled, we then can also enable
BR2_PACKAGE_LIBOPENSSL_ENABLE_DEFAULT_THREAD_POOL, to actually add a
thread-pool implementation.

If only the first is enabled, I don;t see how that would be useful in
practice: the code has support for thread-pools but none is available,
and I doubt they might be added at runtime..

So, can't we have a single option enables the default thread-pool?

    config BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL
        bool "enabled thread-pool"
        default y
        depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          Build with thread pool functionality. If enabled, OpenSSL
          algorithms may use the thread pool to perform parallel
          computation. This option in itself does not enable OpenSSL
          to spawn new threads. Currently the only supported thread
          pool mechanism is the default thread pool.

And then in the .mk:

    $(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL),,no-thread-pool no-default-thread-pool)

Uness I missed something, in which case a bit more information might be
needed in the commit log; it may even warrant being in its own change,
separated from the other, uncontroversial, options.

Regards,
Yann E. MORIN.

>  endif # BR2_PACKAGE_LIBOPENSSL
> diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk
> index 89a9189bb851..ab8454657ebf 100644
> --- a/package/libopenssl/libopenssl.mk
> +++ b/package/libopenssl/libopenssl.mk
> @@ -107,6 +107,20 @@ define LIBOPENSSL_CONFIGURE_CMDS
>  			$(if $(BR2_PACKAGE_LIBOPENSSL_UNSECURE),,no-unit-test no-crypto-mdebug no-autoerrinit) \
>  			$(if $(BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE),,no-dynamic-engine ) \
>  			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP),,no-comp) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_ARGON2),,no-argon2) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_CACHED_FETCH),,no-cached-fetch) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_CMP),,no-cmp) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL),,no-thread-pool) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_DEFAULT_THREAD_POOL),,no-default-thread-pool) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_ECX),,no-ecx) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_LOADER_ENGINE),,no-loadereng) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_PADLOCK_ENGINE),,no-padlockeng) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_MODULE),,no-module) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_QUIC),,no-quic) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_SECURE_MEMORY),,no-secure-memory) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_SIV),,no-siv) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_SM2_PRECOMP_TABLE),,no-sm2-precomp) \
> +			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL_TRACE),,no-ssl-trace) \
>  			$(if $(BR2_STATIC_LIBS),zlib,zlib-dynamic) \
>  			$(if $(BR2_STATIC_LIBS),no-dso)
>  endef
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-06-23 20:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 16:10 [Buildroot] [PATCH 1/6] package/libopenssl: use $(RM) instead of rm Dario Binacchi
2024-06-21 16:10 ` [Buildroot] [PATCH 2/6] package/libopenssl: replace engines-1.1 to engines-3 Dario Binacchi
2024-07-08  6:52   ` Peter Korsgaard
2024-06-21 16:10 ` [Buildroot] [PATCH 3/6] package/libopenssl: use consistent logic Dario Binacchi
2024-07-08  6:53   ` Peter Korsgaard
2024-06-21 16:10 ` [Buildroot] [PATCH 4/6] package/libopenssl: use `no-apps' configuration option Dario Binacchi
2024-07-08  6:53   ` Peter Korsgaard
2024-06-21 16:10 ` [Buildroot] [PATCH 5/6] package/libopenssl: no-engine Dario Binacchi
2024-07-08  6:53   ` Peter Korsgaard
2024-06-21 16:10 ` [Buildroot] [PATCH 6/6] package/libopenssl: add new configuration options Dario Binacchi
2024-06-23 20:59   ` Yann E. MORIN [this message]
2024-06-23 20:47 ` [Buildroot] [PATCH 1/6] package/libopenssl: use $(RM) instead of rm Yann E. MORIN
2024-07-08  6:52 ` Peter Korsgaard

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=ZniMrEilTBNB_RvT@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=linux-amarula@amarulasolutions.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.