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: <20181008130106.GE6490@zn.tnic>
Date:   Mon, 8 Oct 2018 15:01:06 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Naresh Kamboju <naresh.kamboju@...aro.org>
Cc:     Ingo Molnar <mingo@...nel.org>, hpa@...or.com,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>, m.mizuma@...fujitsu.com,
        open list <linux-kernel@...r.kernel.org>, bhe@...hat.com,
        Peter Zijlstra <peterz@...radead.org>,
        linux-tip-commits@...r.kernel.org, lkft-triage@...ts.linaro.org,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [tip:x86/boot] x86/kaslr, ACPI/NUMA: Fix KASLR build error

On Mon, Oct 08, 2018 at 04:33:29PM +0530, Naresh Kamboju wrote:
> Linux next build for arm64 failed due to
> numa.c:34:10: fatal error: asm/kaslr.h: No such file or directory

Thanks for letting me know, I guess we could fix that with a weak
function:

---
 arch/x86/include/asm/kaslr.h | 2 --
 drivers/acpi/numa.c          | 4 +++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/kaslr.h b/arch/x86/include/asm/kaslr.h
index 95ef3fc01d12..db7ba2feb947 100644
--- a/arch/x86/include/asm/kaslr.h
+++ b/arch/x86/include/asm/kaslr.h
@@ -6,10 +6,8 @@ unsigned long kaslr_get_random_long(const char *purpose);
 
 #ifdef CONFIG_RANDOMIZE_MEMORY
 void kernel_randomize_memory(void);
-void kaslr_check_padding(void);
 #else
 static inline void kernel_randomize_memory(void) { }
-static inline void kaslr_check_padding(void) { }
 #endif /* CONFIG_RANDOMIZE_MEMORY */
 
 #endif
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 4408e37600ef..ba62004f4d86 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -32,7 +32,6 @@
 #include <linux/numa.h>
 #include <linux/nodemask.h>
 #include <linux/topology.h>
-#include <asm/kaslr.h>
 
 static nodemask_t nodes_found_map = NODE_MASK_NONE;
 
@@ -433,6 +432,9 @@ acpi_table_parse_srat(enum acpi_srat_type id,
 					    handler, max_entries);
 }
 
+/* To be overridden by architectures */
+void __init __weak kaslr_check_padding(void) { }
+
 int __init acpi_numa_init(void)
 {
 	int cnt = 0;
-- 
2.19.0.271.gfe8321ec057f

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ