linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Anders Roxell <anders.roxell@linaro.org>,
	jmorris@namei.org, serge@hallyn.com
Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] apparmor: fix build error undefined reference to zlib_*
Date: Tue, 12 Feb 2019 02:53:56 -0800	[thread overview]
Message-ID: <2f189cdd-28fb-58a7-63ad-abe8ba185b3a@canonical.com> (raw)
In-Reply-To: <20190212094828.8429-1-anders.roxell@linaro.org>

On 2/12/19 1:48 AM, Anders Roxell wrote:
> With commit 876dd866c084 ("apparmor: Initial implementation of raw
> policy blob compression") and SECURITY_APPARMOR is set to '=y'
> ZLIB_DEFLATE must be enabled as well for the linker to see the symbols.
> 
> aarch64-linux-gnu-ld: security/apparmor/policy_unpack.o: in function `deflate_compress':
> ../security/apparmor/policy_unpack.c:1030: undefined reference to `zlib_deflate_workspacesize'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1030:(.text+0xe20): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflate_workspacesize'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1036: undefined reference to `zlib_deflateInit2'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1036:(.text+0xe60): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflateInit2'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1053: undefined reference to `zlib_deflate'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1053:(.text+0xec0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflate'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081: undefined reference to `zlib_deflateEnd'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081:(.text+0xf90): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflateEnd'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081: undefined reference to `zlib_deflateEnd'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081:(.text+0xfb4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflateEnd'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081: undefined reference to `zlib_deflateEnd'
> aarch64-linux-gnu-ld: ../security/apparmor/policy_unpack.c:1081:(.text+0xfd8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `zlib_deflateEnd'
> make[1]: *** [Makefile:1023: vmlinux] Error 1
> make[1]: Target 'Image' not remade because of errors.
> make: *** [Makefile:152: sub-make] Error 2
> make: Target 'Image' not remade because of errors.
> 
> Rework so when SECURITY_APPARMOR is set to '=y' ZLIB_INFLATE and ZLIB_DEFLATE gets
> selected, since both are used by the SECURITY_APPARMOR.
> 
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

yep thanks for the patch,

unfortunately this same fix landed in apparmor-next about 5 hours ago

> ---
>  security/apparmor/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig
> index 3de21f46c82a..99c35e22c119 100644
> --- a/security/apparmor/Kconfig
> +++ b/security/apparmor/Kconfig
> @@ -5,6 +5,8 @@ config SECURITY_APPARMOR
>  	select SECURITY_PATH
>  	select SECURITYFS
>  	select SECURITY_NETWORK
> +	select ZLIB_INFLATE
> +	select ZLIB_DEFLATE
>  	default n
>  	help
>  	  This enables the AppArmor security module.
> 


      reply	other threads:[~2019-02-12 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  9:48 [PATCH] apparmor: fix build error undefined reference to zlib_* Anders Roxell
2019-02-12 10:53 ` John Johansen [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=2f189cdd-28fb-58a7-63ad-abe8ba185b3a@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=anders.roxell@linaro.org \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).