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: <3696666f-9b48-405c-a715-8adf927fd86e@app.fastmail.com>
Date:   Mon, 15 May 2023 14:13:28 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Dan Carpenter" <dan.carpenter@...aro.org>,
        "Naresh Kamboju" <naresh.kamboju@...aro.org>,
        Ricardo CaƱuelo <ricardo.canuelo@...labora.com>
Cc:     "open list" <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>, lkft-triage@...ts.linaro.org,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Linus Torvalds" <torvalds@...ux-foundation.org>,
        "Ard Biesheuvel" <ardb@...nel.org>, shuah <shuah@...nel.org>,
        "Anders Roxell" <anders.roxell@...aro.org>
Subject: Re: selftests: mincore: mincore_selftest fails only on qemu-armv7

On Mon, May 15, 2023, at 13:51, Dan Carpenter wrote:
> On Mon, May 15, 2023 at 03:29:02PM +0530, Naresh Kamboju wrote:
>> The selftests: mincore: mincore_selftest fails only on qemu-armv7 running
>
> tools/testing/selftests/mincore/mincore_selftest.c
>    139  TEST(check_huge_pages)
>    140  {
>    141          unsigned char vec[1];
>    142          char *addr;
>    143          int retval;
>    144          int page_size;
>    145  
>    146          page_size = sysconf(_SC_PAGESIZE);
>    147  
>    148          errno = 0;
>    149          addr = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
>    150                  MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
>    151                  -1, 0);
>    152          if (addr == MAP_FAILED) {
>    153                  if (errno == ENOMEM)
>
> On Armv7 is a 32bit machine so HUGETLB isn't enabled and the errno can
> be -EINVAL.  It's has returned this for 10 years.

I expected it to be enabled on 32-bit as well, but I see that
on normal ARMv7 without CONFIG_ARM_LPAE, it is indeed
always turned off, and the asm/pgtable-2level.h does not
define a way to use sections or supersections in user space:

arch/arm/Kconfig:       select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ