All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: Mikko Rapeli <mikko.rapeli@linaro.org>
Cc: yocto-patches@lists.yoctoproject.org,
	Sathishkumar Duraisamy <sathishkumar.d.cbe@gmail.com>,
	Khem Raj <raj.khem@gmail.com>,
	Max Krummenacher <max.krummenacher@toradex.com>
Subject: Re: [meta-security][PATCH v2] systemd: disable linker GCS warning on aarch64
Date: Wed, 7 May 2025 14:47:55 -0400	[thread overview]
Message-ID: <20250507184755.GA21647@localhost> (raw)
In-Reply-To: <20250507150247.1408201-1-mikko.rapeli@linaro.org>

On Wed 2025-05-07 @ 06:02:47 PM, Mikko Rapeli wrote:
> openssl asm code is missing GCS branch protections and
> linker throws a warning which currently fails the build.
> Ignore the warning for now since some branch protection
> is still applied and only GCS is missing. Works around:

This only solves the problem for one specific use-case (i.e. when someone is
using meta-security) but leaves build issues for everyone else.

A patch that solves the root cause of the issue (in systemd) would be better.

> 
> .../recipe-sysroot/usr/lib/libcrypto.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
> collect2: error: ld returned 1 exit status
> 
> Cc: Sathishkumar Duraisamy <sathishkumar.d.cbe@gmail.com>
> Cc: Khem Raj <raj.khem@gmail.com>
> Cc: Max Krummenacher <max.krummenacher@toradex.com>
> Cc: Trevor Woerner <twoerner@gmail.com>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta-tpm/recipes-core/systemd/systemd_%.bbappend | 3 +++
>  1 file changed, 3 insertions(+)
> 
> v2: switched from meson.build patching to LDFLAGS since that works
>     as suggested by Khem Raj and tested correctly by Trevor Woerner,
>     tested on genericarm64 machine with swtpm on qemu
> 
> v1: https://lists.yoctoproject.org/g/yocto-patches/message/1524
> 
> diff --git a/meta-tpm/recipes-core/systemd/systemd_%.bbappend b/meta-tpm/recipes-core/systemd/systemd_%.bbappend
> index c53b1e8..deb9164 100644
> --- a/meta-tpm/recipes-core/systemd/systemd_%.bbappend
> +++ b/meta-tpm/recipes-core/systemd/systemd_%.bbappend
> @@ -1,3 +1,6 @@
> +# workaround to GCS branch protection warning treated as error from openssl/libcrypto
> +LDFLAGS:append:aarch64 = " ${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', '-Wl,-z,gcs-report-dynamic=none', '', d)}"
> +
>  PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'tpm2', '', d)}"
>  
>  # for encrypted filesystems
> -- 
> 2.43.0
> 


  reply	other threads:[~2025-05-07 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 15:02 [meta-security][PATCH v2] systemd: disable linker GCS warning on aarch64 Mikko Rapeli
2025-05-07 18:47 ` Trevor Woerner [this message]
2025-05-19 14:38 ` Mikko Rapeli

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=20250507184755.GA21647@localhost \
    --to=twoerner@gmail.com \
    --cc=max.krummenacher@toradex.com \
    --cc=mikko.rapeli@linaro.org \
    --cc=raj.khem@gmail.com \
    --cc=sathishkumar.d.cbe@gmail.com \
    --cc=yocto-patches@lists.yoctoproject.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 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.