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: <20211027135328.001e4582a9535e8e4be785bb@linux-foundation.org>
Date:   Wed, 27 Oct 2021 13:53:28 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Yang Shi <shy828301@...il.com>
Cc:     Song Liu <songliubraving@...com>, Hugh Dickins <hughd@...gle.com>,
        "sunhao.th@...il.com" <sunhao.th@...il.com>,
        Matthew Wilcox <willy@...radead.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        "andrea.righi@...onical.com" <andrea.righi@...onical.com>,
        Linux Memory Management List <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] mm: khugepaged: skip huge page collapse for special
 files

On Wed, 27 Oct 2021 13:44:37 -0700 Yang Shi <shy828301@...il.com> wrote:

> > > --- a/mm/khugepaged.c
> > > +++ b/mm/khugepaged.c
> > > @@ -445,22 +445,25 @@ static bool hugepage_vma_check(struct vm_area_struct *vma,
> > >       if (!transhuge_vma_enabled(vma, vm_flags))
> > >               return false;
> > >
> > > -     /* Enabled via shmem mount options or sysfs settings. */
> > > -     if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) {
> > > +     if (vma->vm_file)
> > >               return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff,
> > >                               HPAGE_PMD_NR);
> >
> > Am I misreading this? If we return here for vma->vm_file, the following
> > logic (shmem_file(), etc.) would be skipped, no?
> 
> Oh, yes, you are right. My mistake.
> 
> Andrew,
> 
> Could you please apply the below fix?

um, how well tested are these changes?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ