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>] [day] [month] [year] [list]
Message-Id: <20210526135150.2332379-1-trix@redhat.com>
Date:   Wed, 26 May 2021 06:51:50 -0700
From:   trix@...hat.com
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        peterz@...radead.org, ira.weiny@...el.com,
        rafael.j.wysocki@...el.com, andriy.shevchenko@...ux.intel.com,
        jgross@...e.com
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Tom Rix <trix@...hat.com>
Subject: [PATCH] x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS

From: Tom Rix <trix@...hat.com>

Fixes this build error
from arch/x86/xen/platform-pci-unplug.c:11:
...
fixmap.h:103:48: error: ‘NR_CPUS’ undeclared here (not in a function)
  103 |  FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,

This block used to be conditional on CONFIG_X86_32 which also
included linux/threads.h which defines NR_CPUS as CONFIG_NR_CPUS.

Since CONFIG_NR_CPUS is already used fixmap.h, instead of including
linux/threads.h again, rename NR_CPUS to CONFIG_NR_CPUS.

Fixes: 14df32670291 ("x86: Support kmap_local() forced debugging")
Signed-off-by: Tom Rix <trix@...hat.com>
---
 arch/x86/include/asm/fixmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index d0dcefb5cc59d..4d1f5cc448b98 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -100,7 +100,7 @@ enum fixed_addresses {
 #endif
 #ifdef CONFIG_KMAP_LOCAL
 	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
-	FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,
+	FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * CONFIG_NR_CPUS) - 1,
 #ifdef CONFIG_PCI_MMCONFIG
 	FIX_PCIE_MCFG,
 #endif
-- 
2.26.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ