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]
Date:   Wed, 11 Mar 2020 18:28:42 +0100
From:   Alexander Potapenko <glider@...gle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Mark Rutland <mark.rutland@....com>,
        Will Deacon <will.deacon@....com>,
        Catalin Marinas <catalin.marinas@....com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Reason to not use __GFP_ZERO in __alloc_zeroed_user_highpage() on ARM64?

Hi,

I've noticed that certain arches (alpha, ia64, m68k, s390, x86) have
__alloc_zeroed_user_highpage() defined as:

  alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vmaddr)

, whereas in other cases it is defined as
alloc_page_vma()+clear_user_page() (see
https://elixir.bootlin.com/linux/latest/source/include/linux/highmem.h#L182)

Is there a reason for this?

I'm asking because on ARM64 with init_on_alloc=1
__alloc_zeroed_user_highpage() appears to initialize the page twice.
Adding __GFP_ZERO and removing clear_user_page() seems to work (and
remove the double initialization), but I suppose this code was written
on purpose? Am I missing something?

Thanks,

-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ