Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9929553ybi; Wed, 24 Jul 2019 12:31:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1RYCs9K3ozt3KmKmqBrRHNjnZgfSlMHCjXcUs3z27X9oeihh6nABZqvwwzzQ/mzvEw7qe X-Received: by 2002:a17:902:70c3:: with SMTP id l3mr85679439plt.92.1563996662022; Wed, 24 Jul 2019 12:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563996662; cv=none; d=google.com; s=arc-20160816; b=ZcNBmHUNXxZpa6vQPg5dlaFeXxYs79kIrH3c/BURZ3QtBckbuXjkmG362RDn3qCXtl 1SL4BbCqndKG3UFwg/VpjeElcmH9BaFsy01xC+1mOEMgO5M31hjM92KGXQ7JSrIVqzQG S3fXyNdziJ+RtFwR3pCtNjeR12cv6BQ3Y9R37boB2RCWlvey4uXiaDKLHJK+hkjKSoSr DeLzEAr+Hx3vuXplvrLui56hjQ1JxY7YLmdzrEZbKq4NYht87tosTbcn/r5k7bDKrUs4 0OZa1DhkGRPXPgj+BBbHtr2FYv/s3+lM2J1M6BxEVKoPaq4+M2L3EMVuX5iL3zHB4DBI 3QAA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QZuyDgdQAd/8dCWszGHICCOdItr1iBtL0UBvpaElBu4=; b=SEVxK7BsafHeNMNxri/XQA86tUfjc4Q6e27wE4BgLy6c9cCiFjBoD/R3SYT2KYicK0 SIRvAOiEYjEtMlh7uWv2hPa+tbp1eILJr6WpseiC4Wz+MyjLvIGEEtvDpnR4oDZDZOEy LOYo+wYxx/KJb/2E5Y9WmvilAVyi4yjSPA3pzUL0+q6mI1Kcypk+YhRoeCCnxacuaMDg 2TlIfkbCA5319CDXYHERDwZ5Aa0XEkUlW7UOjlJKL58UB1EBSQombZK6fVwnRrUEkorH v8nYSfWYGjum6Wr/8LWPtrOxzvT3gEf9M+M75Z3hRQxNGelD9NfRdZZFYGNTRTqvwCpv lEpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LE90IFfB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si16076237pgm.167.2019.07.24.12.30.47; Wed, 24 Jul 2019 12:31:02 -0700 (PDT) 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=@kernel.org header.s=default header.b=LE90IFfB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388188AbfGXT2L (ORCPT + 99 others); Wed, 24 Jul 2019 15:28:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:46280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728906AbfGXT2J (ORCPT ); Wed, 24 Jul 2019 15:28:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DEF9D218EA; Wed, 24 Jul 2019 19:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996488; bh=9199/2c0C0Q/3wQySMZfVrJHSf8dw7tU+Zrq49t6lHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LE90IFfBXB0kpk0ZMf9RODCs5YR3jyHsDtyOhCRVLditTwTADJ5rb66BfZbR1Q4cf y8keMlrVlkHvD38OaRPDPW7ogahSSuKNwkJm/Ud4Nh0aj/axRXZUkJ3B+4/MWIvrNY FnHZxbc7JbPTM/zpLPAT/8GeGIqiet2U+UJCZg40= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Nayna Jain , James Morris , Mimi Zohar , Sasha Levin Subject: [PATCH 5.2 113/413] integrity: Fix __integrity_init_keyring() section mismatch Date: Wed, 24 Jul 2019 21:16:44 +0200 Message-Id: <20190724191743.405361665@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8c655784e2cf59cb6140759b8b546d98261d1ad9 ] With gcc-4.6.3: WARNING: vmlinux.o(.text.unlikely+0x24c64): Section mismatch in reference from the function __integrity_init_keyring() to the function .init.text:set_platform_trusted_keys() The function __integrity_init_keyring() references the function __init set_platform_trusted_keys(). This is often because __integrity_init_keyring lacks a __init annotation or the annotation of set_platform_trusted_keys is wrong. Indeed, if the compiler decides not to inline __integrity_init_keyring(), a warning is issued. Fix this by adding the missing __init annotation. Fixes: 9dc92c45177ab70e ("integrity: Define a trusted platform keyring") Signed-off-by: Geert Uytterhoeven Reviewed-by: Nayna Jain Reviewed-by: James Morris Signed-off-by: Mimi Zohar Signed-off-by: Sasha Levin --- security/integrity/digsig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index 4582bc26770a..868ade3e8970 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -69,8 +69,9 @@ int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen, return -EOPNOTSUPP; } -static int __integrity_init_keyring(const unsigned int id, key_perm_t perm, - struct key_restriction *restriction) +static int __init __integrity_init_keyring(const unsigned int id, + key_perm_t perm, + struct key_restriction *restriction) { const struct cred *cred = current_cred(); int err = 0; -- 2.20.1