Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2225284ybi; Mon, 17 Jun 2019 00:46:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7bvZDi2mh2j+WIfCN21w6UVAM5xIrLbUXxRYbP/GpNwY0KCZ6Cojr0c3+vFuxrEu83HaQ X-Received: by 2002:a17:90a:ac0e:: with SMTP id o14mr25179939pjq.142.1560757604723; Mon, 17 Jun 2019 00:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560757604; cv=none; d=google.com; s=arc-20160816; b=YB+7QOkTF3f6hRloBUITS0eXTV/WVv1lYzL9YlzcOzlpnx6crWnDRgEhf4IZcqPZf3 45Er739xVP+Gh9otA1dmGj40X7ZBiqy1v4Zwz9SENYeuj9bEwGHsGr+EKFhK8Luc4SfL cduJbdOYzQ+zQGBakfnsN2HJZiKEF/L9dtHuRx9dujjGzdfJNFvHNKBloiZKdtOjoVwR FPbUrYxsVAfDY/KErK9Nap0XAeADThlU2BVOec3ia7RbtYvN8f9czs6JBXyC6t9Ghefn yqEqu6xBZwEgId74oVu0hX/YDOHDwFzayLyjti/T5gSJBT3TMm3HqD+MY68xtzuy6UWL uQsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=7akjFZ9NT7Gys7d51BqFkAjEg6MT5PzxSXV9nIjqYYI=; b=pxoNRFxLedDEhK4Lo8fex6XGEfukVJH/faY7qROsl/1IMw5YFPMNOZJiH/maAOj40m xb3D43Xad9GvMz3J/w75CM6qXP0zXva+OAhIndjQrEt220q8XPc8GeRSep2mJTGC0wZd liilPqzQl9seD0yMgfzVulUrADBPhg/51eelWXFHk5PHKErcQu6lRbn9ROVwMZId+ELl F0GBfbqxz1BicpamySgAk06E2EuP0pfA9Y8teH/ZA5wFf54Awl1qZbS2lZbfKANTM/h5 fpZJQBSaUyPM7CGxZ7YKiY48BOew8yK12d7a8Wd4f7ZZY8qIPRO2HZMuCsxwpV5x6rJF /wqw== ARC-Authentication-Results: i=1; mx.google.com; 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 9si9351275pfh.175.2019.06.17.00.46.29; Mon, 17 Jun 2019 00:46:44 -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; 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 S1727106AbfFQHpG (ORCPT + 99 others); Mon, 17 Jun 2019 03:45:06 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:48536 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfFQHpF (ORCPT ); Mon, 17 Jun 2019 03:45:05 -0400 Received: from ramsan ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id Rjkv2000S3XaVaC06jkvPh; Mon, 17 Jun 2019 09:45:03 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hcmJy-0000To-Bl; Mon, 17 Jun 2019 09:44:54 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hcmJy-0003Ms-AA; Mon, 17 Jun 2019 09:44:54 +0200 From: Geert Uytterhoeven To: Nayna Jain , Mimi Zohar , James Morris , "Serge E . Hallyn" Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] integrity: Fix __integrity_init_keyring() section mismatch Date: Mon, 17 Jun 2019 09:44:52 +0200 Message-Id: <20190617074452.12901-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 4582bc26770a34a7..868ade3e89702ba7 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.17.1