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: <f79ee8f6-3fba-4c5f-9dc4-371906c529a8@gmail.com>
Date: Fri, 5 Jul 2024 23:52:30 +0200
From: Mirsad Todorovac <mtodorovac69@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
 Yuntao Wang <ytcoode@...il.com>, Breno Leitao <leitao@...ian.org>,
 Brian Gerst <brgerst@...il.com>, Masahiro Yamada <masahiroy@...nel.org>
Subject: [PROBLEM] ./arch/x86/include/asm/pgtable_32.h:59:5: error:
 "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]

Hi, all!

This is the result of testing randconfig with KCONFIG_SEED=0xEE7AB52F in next-20240703 vanilla tree on
Ubuntu 22.04 LTS. GCC used is gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0.

The particular error is as follows:

In file included from arch/x86/kernel/head_32.S:29:
./arch/x86/include/asm/pgtable_32.h:59:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]
   59 | #if PTRS_PER_PMD > 1
      |     ^~~~~~~~~~~~
cc1: all warnings being treated as errors

The erroneous line is here:

  50 /*
  51  * This is used to calculate the .brk reservation for initial pagetables.
  52  * Enough space is reserved to allocate pagetables sufficient to cover all
  53  * of LOWMEM_PAGES, which is an upper bound on the size of the direct map of
  54  * lowmem.
  55  *
  56  * With PAE paging (PTRS_PER_PMD > 1), we allocate PTRS_PER_PGD == 4 pages for
  57  * the PMD's in addition to the pages required for the last level pagetables.
  58  */
→ 59 #if PTRS_PER_PMD > 1
  60 #define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD)
  61 #else
  62 #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
  63 #endif

The PTRS_PER_PMD is defined here:

include/asm-generic/pgtable-nopmd.h:#define PTRS_PER_PMD	1

  13 /*
  14  * Having the pmd type consist of a pud gets the size right, and allows
  15  * us to conceptually access the pud entry that this pmd is folded into
  16  * without casting.
  17  */
  18 typedef struct { pud_t pud; } pmd_t;
  19 
  20 #define PMD_SHIFT       PUD_SHIFT
→ 21 #define PTRS_PER_PMD    1
  22 #define PMD_SIZE        (1UL << PMD_SHIFT)
  23 #define PMD_MASK        (~(PMD_SIZE-1))
  24 

I couldn't figure out how to get gcc -E output for this particular .S file.

Please find attached the .config ...

Best regards,
Mirsad Todorovac
View attachment ".config" of type "text/plain" (134537 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ