linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Yang Shi <shy828301@gmail.com>
Cc: hughd@google.com, sunhao.th@gmail.com, willy@infradead.org,
	kirill.shutemov@linux.intel.com, songliubraving@fb.com,
	andrea.righi@canonical.com, akpm@linux-foundation.org,
	stable@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [stable 5.10 PATCH] mm: khugepaged: skip huge page collapse for special files
Date: Thu, 4 Nov 2021 09:19:01 +0100	[thread overview]
Message-ID: <YYOXdQbeNGHb0ewM@kroah.com> (raw)
In-Reply-To: <20211103202258.3564-1-shy828301@gmail.com>

On Wed, Nov 03, 2021 at 01:22:58PM -0700, Yang Shi wrote:
> commit a4aeaa06d45e90f9b279f0b09de84bd00006e733 upstream.
> 
> The read-only THP for filesystems will collapse THP for files opened
> readonly and mapped with VM_EXEC.  The intended usecase is to avoid TLB
> misses for large text segments.  But it doesn't restrict the file types
> so a THP could be collapsed for a non-regular file, for example, block
> device, if it is opened readonly and mapped with EXEC permission.  This
> may cause bugs, like [1] and [2].
> 
> This is definitely not the intended usecase, so just collapse THP for
> regular files in order to close the attack surface.
> 
> [shy828301@gmail.com: fix vm_file check [3]]

Now queued up, thanks.

greg k-h


      reply	other threads:[~2021-11-04  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 20:22 Yang Shi
2021-11-04  8:19 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YYOXdQbeNGHb0ewM@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrea.righi@canonical.com \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shy828301@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=stable@vger.kernel.org \
    --cc=sunhao.th@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox