lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170720092307.6xslahuaclmsiffe@gmail.com>
Date:   Thu, 20 Jul 2017 11:23:07 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     bp@...en8.de, bp@...e.de, aryabinin@...tuozzo.com,
        lwoodman@...hat.com, pbonzini@...hat.com, hpa@...or.com,
        brijesh.singh@....com, corbet@....net, peterz@...radead.org,
        torvalds@...ux-foundation.org, matt@...eblueprint.co.uk,
        dyoung@...hat.com, tglx@...utronix.de, riel@...hat.com,
        dvyukov@...gle.com, glider@...gle.com, thomas.lendacky@....com,
        mst@...hat.com, luto@...nel.org, linux-kernel@...r.kernel.org,
        rkrcmar@...hat.com, arnd@...db.de, toshi.kani@....com,
        konrad.wilk@...cle.com
Cc:     linux-tip-commits@...r.kernel.org
Subject: [PATCH] x86/boot: Fix memremap() related build failure


* tip-bot for Tom Lendacky <tipbot@...or.com> wrote:

> Commit-ID:  5997efb967565e858259401af394e8449629c1f0
> Gitweb:     http://git.kernel.org/tip/5997efb967565e858259401af394e8449629c1f0
> Author:     Tom Lendacky <thomas.lendacky@....com>
> AuthorDate: Mon, 17 Jul 2017 16:10:17 -0500
> Committer:  Ingo Molnar <mingo@...nel.org>
> CommitDate: Tue, 18 Jul 2017 11:38:02 +0200
> 
> x86/boot: Use memremap() to map the MPF and MPC data
> 
> The SMP MP-table is built by UEFI and placed in memory in a decrypted
> state. These tables are accessed using a mix of early_memremap(),
> early_memunmap(), phys_to_virt() and virt_to_phys(). Change all accesses
> to use early_memremap()/early_memunmap(). This allows for proper setting
> of the encryption mask so that the data can be successfully accessed when
> SME is active.

There's a build failure caused by this commit, with the attached (randconfig) 
config:

  drivers/sfi/sfi_core.c: In function ‘sfi_map_memory’:
  drivers/sfi/sfi_core.c:104:10: error: implicit declaration of function ‘memremap’ [-Werror=implicit-function-declaration]
  drivers/sfi/sfi_core.c:104:31: error: ‘MEMREMAP_WB’ undeclared (first use in this function)

This is a case of parasitic header dependencies: the sfi_core.c file indirectly 
includes <linux/io.h> for typical - but not all configs.

Including <linux/io.h> explicitly solves the build failure.

Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/sfi/sfi_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c
index d5ce53491efb..153b3f3cc795 100644
--- a/drivers/sfi/sfi_core.c
+++ b/drivers/sfi/sfi_core.c
@@ -68,6 +68,7 @@
 #include <linux/init.h>
 #include <linux/sfi.h>
 #include <linux/slab.h>
+#include <linux/io.h>
 
 #include "sfi_core.h"

View attachment "config" of type "text/plain" (83953 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ