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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZoK4IiBOTPduEyN@debian>
Date:   Sun, 21 Nov 2021 17:01:20 +0800
From:   Calvin Zhang <calvinzhang.cool@...il.com>
To:     Mike Rapoport <rppt@...nel.org>
Cc:     Vineet Gupta <vgupta@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>, Guo Ren <guoren@...nel.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Nick Hu <nickhu@...estech.com>,
        Greentime Hu <green.hu@...il.com>,
        Vincent Chen <deanbo422@...il.com>,
        Dinh Nguyen <dinguyen@...nel.org>,
        Jonas Bonn <jonas@...thpole.se>,
        Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
        Stafford Horne <shorne@...il.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Rich Felker <dalias@...c.org>, Chris Zankel <chris@...kel.net>,
        Max Filippov <jcmvbkbc@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Arnd Bergmann <arnd@...db.de>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Vladimir Isaev <isaev@...opsys.com>,
        "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
        "Kirill A. Shutemov" <kirill.shtuemov@...ux.intel.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Marc Zyngier <maz@...nel.org>,
        David Brazdil <dbrazdil@...gle.com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Mark Rutland <mark.rutland@....com>,
        Souptick Joarder <jrdr.linux@...il.com>,
        Jinyang He <hejinyang@...ngson.cn>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Serge Semin <Sergey.Semin@...kalelectronics.ru>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Ley Foon Tan <ley.foon.tan@...el.com>,
        Andreas Oetken <andreas.oetken@...mens.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Christophe Leroy <christophe.leroy@....fr>,
        Zhang Yunkai <zhang.yunkai@....com.cn>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Markus Elfring <elfring@...rs.sourceforge.net>,
        Ganesh Goudar <ganeshgr@...ux.ibm.com>,
        "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
        Atish Patra <atish.patra@....com>,
        Anup Patel <anup.patel@....com>,
        Nick Kossifidis <mick@....forth.gr>,
        Alexandre Ghiti <alex@...ti.fr>,
        Vitaly Wool <vitaly.wool@...sulko.com>,
        Thierry Reding <treding@...dia.com>,
        Lee Jones <lee.jones@...aro.org>,
        Guo Ren <guoren@...ux.alibaba.com>,
        Alexander Sverdlin <alexander.sverdlin@...ia.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mauri Sandberg <sandberg@...lfence.com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        linux-snps-arc@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org,
        uclinux-h8-devel@...ts.sourceforge.jp, linux-mips@...r.kernel.org,
        openrisc@...ts.librecores.org, linuxppc-dev@...ts.ozlabs.org,
        linux-riscv@...ts.infradead.org, linux-sh@...r.kernel.org,
        linux-xtensa@...ux-xtensa.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 0/2] of: remove reserved regions count restriction

On Sun, Nov 21, 2021 at 08:43:47AM +0200, Mike Rapoport wrote:
>On Fri, Nov 19, 2021 at 03:58:17PM +0800, Calvin Zhang wrote:
>> The count of reserved regions in /reserved-memory was limited because
>> the struct reserved_mem array was defined statically. This series sorts
>> out reserved memory code and allocates that array from early allocator.
>> 
>> Note: reserved region with fixed location must be reserved before any
>> memory allocation. While struct reserved_mem array should be allocated
>> after allocator is activated. We make early_init_fdt_scan_reserved_mem()
>> do reservation only and add another call to initialize reserved memory.
>> So arch code have to change for it.
>
>I think much simpler would be to use the same constant for sizing
>memblock.reserved and reserved_mem arrays.
>
>If there is too much reserved regions in the device tree, reserving them in
>memblock will fail anyway because memblock also starts with static array
>for memblock.reserved, so doing one pass with memblock_reserve() and
>another to set up reserved_mem wouldn't help anyway.

Yes. This happens only if there are two many fixed reserved regions.
memblock.reserved can be resized after paging.

I also find another problem. Initializing dynamic reservation after
paging would fail to mark it no-map because no-map flag works when doing
direct mapping. This seems to be a circular dependency.

Thank You,
Calvin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ