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: <1cc4d995-efeb-9d15-446f-475e63154a2d@csgroup.eu>
Date:   Fri, 22 Sep 2023 09:14:40 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Ryan Roberts <ryan.roberts@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        Helge Deller <deller@....de>,
        Nicholas Piggin <npiggin@...il.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
        "David S. Miller" <davem@...emloft.net>,
        Arnd Bergmann <arnd@...db.de>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Muchun Song <muchun.song@...ux.dev>,
        SeongJae Park <sj@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Christoph Hellwig <hch@...radead.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Peter Xu <peterx@...hat.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Qi Zheng <zhengqi.arch@...edance.com>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to
 take vma



Le 22/09/2023 à 10:41, Ryan Roberts a écrit :
> On 22/09/2023 09:10, Christophe Leroy wrote:
>>
>>
>>> I'm happy to take your proposed approach if that's your preference. Another
>>> option is to use a dummy VMA, as I have done in the core code, for the one call
>>> site that calls set_huge_pte_at() with init_mm:
>>>
>>> struct vm_area_struct vma = TLB_FLUSH_VMA(&init_mm, 0);
>>>
>>> This is an existing macro that creates a dummy vma with vma->vm_mm filled in.
>>> Then I pass &vma to the function.
>>
>> I don't like that, I prefer the solution I proposed. We already have a
>> couple places where powerpc do things based on whether vma is NULL or not.
>>
>>>
>>> Or yet another option would be to keep the mm param as is in set_huge_pte_at(),
>>> and add a size param to the function. But then all call sites have the burden of
>>> figuring out the size of the huge pte (although I think most know already).
>>
>> Indeed.
>>
>> arch_make_huge_pte() used to take a vma until commit 79c1c594f49a
>> ("mm/hugetlb: change parameters of arch_make_huge_pte()").
>>
>> Should we try and have the same approach ? Or is it irrelevant ?
> 
> See [1]; I'm going to rework to pass mm + size parameter since the current
> approach will break riscv.

Can you pass a shift parameter instead of a size, like 
arch_make_huge_pte() ? As far as I remember it is easier to handle a 
shift than a size.

Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ