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-next>] [day] [month] [year] [list]
Message-ID: <20200227151143.6a6edaf9@canb.auug.org.au>
Date:   Thu, 27 Feb 2020 15:11:43 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arjun Roy <arjunroy@...gle.com>,
        David Miller <davem@...emloft.net>
Subject: linux-next: build failure after merge of the akpm tree

Hi all,

After merging the akpm tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from include/linux/list.h:9:0,
                 from include/linux/smp.h:12,
                 from include/linux/kernel_stat.h:5,
                 from mm/memory.c:42:
mm/memory.c: In function 'insert_pages':
mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
   remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
                                         ^
include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
   (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                        ^
include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
  __builtin_choose_expr(__safe_cmp(x, y), \
                        ^~~~~~~~~~
include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
 #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                           ^~~~~~~~~~~~~
mm/memory.c:1522:26: note: in expansion of macro 'min_t'
  pages_to_write_in_pmd = min_t(unsigned long,
                          ^~~~~

Caused by patch

  "mm/memory.c: add vm_insert_pages()"

sparc32 does not implement pte_index at all :-(

I have added the following patch for today.  This may not be correct
or enough.

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Thu, 27 Feb 2020 14:57:49 +1100
Subject: [PATCH] arch/sparc: add a definition of pte_index for the 32 bit kernel

This is now needed for vm_insert_pages()

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 arch/sparc/include/asm/pgtable_32.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 6d6f44c0cad9..dc7a4d69cb18 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -326,6 +326,8 @@ static inline pmd_t *pmd_offset(pud_t * dir, unsigned long address)
 }
 
 /* Find an entry in the third-level page table.. */
+#define pte_index(address)	\
+	 ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 pte_t *pte_offset_kernel(pmd_t * dir, unsigned long address);
 
 /*
-- 
2.25.0

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ