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: <168444739205.404.4531976933473275474.tip-bot2@tip-bot2>
Date:   Thu, 18 May 2023 22:03:12 -0000
From:   "tip-bot2 for Arnd Bergmann" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Arnd Bergmann <arnd@...db.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Alexander Lobakin <aleksander.lobakin@...el.com>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/cleanups] x86/mm: Add early_memremap_pgprot_adjust() prototype

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     4d312ac057da57b4a844ec8af14236e74b652efe
Gitweb:        https://git.kernel.org/tip/4d312ac057da57b4a844ec8af14236e74b652efe
Author:        Arnd Bergmann <arnd@...db.de>
AuthorDate:    Tue, 16 May 2023 21:35:47 +02:00
Committer:     Dave Hansen <dave.hansen@...ux.intel.com>
CommitterDate: Thu, 18 May 2023 11:56:18 -07:00

x86/mm: Add early_memremap_pgprot_adjust() prototype

early_memremap_pgprot_adjust() is a __weak function with a local
prototype, but x86 has a custom implementation that does not
see the prototype, causing a W=1 warning:

arch/x86/mm/ioremap.c:785:17: error: no previous prototype for 'early_memremap_pgprot_adjust' [-Werror=missing-prototypes]

Move the declaration into the global linux/io.h header to avoid this.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
Link: https://lore.kernel.org/all/20230516193549.544673-19-arnd%40kernel.org
---
 include/linux/io.h | 5 +++++
 mm/internal.h      | 6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/linux/io.h b/include/linux/io.h
index 308f4f0..7304f2a 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -68,6 +68,11 @@ void *devm_memremap(struct device *dev, resource_size_t offset,
 		size_t size, unsigned long flags);
 void devm_memunmap(struct device *dev, void *addr);
 
+/* architectures can override this */
+pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr,
+					unsigned long size, pgprot_t prot);
+
+
 #ifdef CONFIG_PCI
 /*
  * The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and
diff --git a/mm/internal.h b/mm/internal.h
index 68410c6..e6029d9 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -179,12 +179,6 @@ extern unsigned long highest_memmap_pfn;
 #define MAX_RECLAIM_RETRIES 16
 
 /*
- * in mm/early_ioremap.c
- */
-pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr,
-					unsigned long size, pgprot_t prot);
-
-/*
  * in mm/vmscan.c:
  */
 bool isolate_lru_page(struct page *page);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ