From patchwork Tue Feb 12 09:48:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 158132 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3626174jaa; Tue, 12 Feb 2019 01:48:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IaGEOY1ET8zd5tCkSnpnmP+6LySmywdgAaB+iAgBRgHTboQ4m8Vii0/wj7PicbqMOLlBkAG X-Received: by 2002:a62:380a:: with SMTP id f10mr3214970pfa.100.1549964928235; Tue, 12 Feb 2019 01:48:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549964928; cv=none; d=google.com; s=arc-20160816; b=WZUITfCUZtChnFwju4/yUpP3kxvrizOMkG5A7SVbalQkwn9il5o4kxOnTRDisE4gGe VO5po+VmK1Olll0eONKj+7JtEHw91Q8a2nE3XTN/fhzkQOgY5Ox8l9vUKGo62BhFqnBu F1jW6B37nnnhgqUwa9ua3CVSB0VLOVZ4CZGel4QrQ55xzizPIiYujMvIJgp6P6xYJ9b9 eG5THR1E4wfzZleCl13pbp4DaVAIPqUEJrtQldH7xPU9qQrN/hBR/n70HYgYnZPEt8XV nnFxFcEE24fmaGOfJYZddel1UZMVB3RsRr8lsx8E+9euLMBwvhoCFoW7Yt+3/pSOJPWE 2eqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=B5KwDzsMcCN5bKZ9gR266BQz8en1Dx9EG+wXdzylMa4=; b=EyHk7ORpjrgh/HSppUfuifFqlYrM+Zx4w15DjrLBpg7cQVCGpQdyqsBRysiSW99AIc 0vq7akRqbHXMlqE0DwYcUuAbkKMzpz2SjqL4U5zyjw5ecMhVh2HsCFIvUJQI3m5FyQAf zT3FIHwkKRXp2aW1yoFn0Cc2DCWexFSRZ2i2a1CyhbXnLoabHvNhF8v730dBQQZZDkXj jJzHr3VPSxiFe19ngSw9evOOCBLSq+cfvGuerITezMHBbU9yQ2zIh5b5rX1kpo+M+JTz ur5QPz/rrg4DIa8fSil188LAz+RrF6AqrCV7gW3IDlGYrnpm1waN0YQS8GTJfjGKxslI ixWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FA5bIk4f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si13300999pll.297.2019.02.12.01.48.47; Tue, 12 Feb 2019 01:48:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FA5bIk4f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728272AbfBLJsp (ORCPT + 31 others); Tue, 12 Feb 2019 04:48:45 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:43146 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728032AbfBLJso (ORCPT ); Tue, 12 Feb 2019 04:48:44 -0500 Received: by mail-lj1-f194.google.com with SMTP id o1-v6so1620234ljc.10 for ; Tue, 12 Feb 2019 01:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B5KwDzsMcCN5bKZ9gR266BQz8en1Dx9EG+wXdzylMa4=; b=FA5bIk4fzFWuchkxIOg4AeLhpmVs7OBfaWMW2sPfi7DpCClDGF4ofrz7loRZ3j/VzS Tk2pvtGZn/YZ24/gEOSv82HwpW3gVttqa4fWfyiUXThhgJeSEnhdeImfksKpNk+azSv8 a6Hxp2udYjXG4wWKrRiGD+Gw4xn5maRsN4/iKJ84T5DFgKb3RFmjWQ3VL+vmktGqGSdy UHZfdztxZ8/AMeqRAMoU8k2PQ7v3IlHC4bpCMlzLhSGJ4iybKO1FQZrCrLdE45JXlsDw TZ17rO2CawWEB/nAni0zWIEfYAgVS5c1f01QTIwo+fzv7V7XQEKP/HwGRu9C8U78YyHb km8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B5KwDzsMcCN5bKZ9gR266BQz8en1Dx9EG+wXdzylMa4=; b=K0jjjMx8BJ9G/bDxVgr4Rv8yfWuEMtmsAqqNnyVAwSc312MlkJQrzQP7M8XU29BWo+ QadlC+Z+zRAqaoQGdvpMMYSbj/MvXOyPwFm5X118Uw2uVoEEap5XGsKxelQcIQFpce43 4jMV/nCHAytx8ZqaAQwPmhnh8lAgTAZl0unbPz0wNm6RMpQ/lhjgGyrVoEe61jKTdwUA CMTLLeAz72s3H5fWGqMQSZlfoPfwfbkkBCUYuqqmH9VPxa9WpXHuCHg5DnnWq4Ut3fbd 9UPzvWL8aZRJbqrGO2aKKPTsq2p65XjWm1MGkRsTp6Gv7r0DPtH7lhvlB4APSMkKU4vq iqfg== X-Gm-Message-State: AHQUAuZxbm+nbo3bPjGUkpBg+Ka+A8o0b/2RStVE/nZaXLTENM+28Le+ 9BT0l5MVpXqlLBk+MTZXetKvVw== X-Received: by 2002:a2e:302:: with SMTP id 2-v6mr1733377ljd.137.1549964922602; Tue, 12 Feb 2019 01:48:42 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id n19sm2840660lfe.64.2019.02.12.01.48.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Feb 2019 01:48:42 -0800 (PST) From: Anders Roxell To: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] apparmor: fix build error undefined reference to zlib_* Date: Tue, 12 Feb 2019 10:48:28 +0100 Message-Id: <20190212094828.8429-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- security/apparmor/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 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.