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: <e1f78a33-18bb-bd6e-eede-e5e86758a4d0@deltatee.com>
Date:   Tue, 13 Aug 2019 10:49:51 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Paul Walmsley <paul.walmsley@...ive.com>
Cc:     Greentime Hu <green.hu@...il.com>, Rob Herring <robh@...nel.org>,
        Albert Ou <aou@...s.berkeley.edu>,
        Andrew Waterman <andrew@...ive.com>,
        Palmer Dabbelt <palmer@...ive.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Stephen Bates <sbates@...thlin.com>,
        Olof Johansson <olof@...om.net>, greentime.hu@...ive.com,
        linux-riscv@...ts.infradead.org,
        Michael Clark <michaeljclark@....com>,
        Christoph Hellwig <hch@....de>, linux-mm@...r.kernel.org
Subject: Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

On 2019-08-13 10:39 a.m., Paul Walmsley wrote:
> On Tue, 13 Aug 2019, Logan Gunthorpe wrote:
> 
>> On 2019-08-13 12:04 a.m., Greentime Hu wrote:
>>
>>> Every architecture with mmu defines their own pfn_valid().
>>
>> Not true. Arm64, for example just uses the generic implementation in
>> mmzone.h. 
> 
> arm64 seems to define their own:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/Kconfig#n899

Oh, yup. My mistake.

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/mm/init.c#n235
> 
> While there are many architectures which have their own pfn_valid(); 
> oddly, almost none of them set HAVE_ARCH_PFN_VALID ?

Yes, much of this is super confusing. Seems HAVE_ARCH_PFN_VALID only
matters if SPARSEMEM is set. So risc-v probably doesn't need to set it
and we just need a #ifdef !CONFIG_FLATMEM around the pfn_valid
definition like other arches.

Logan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ