linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] Use arch_make_folio_accessible() everywhere
Date: Fri, 15 Sep 2023 19:17:51 +0100	[thread overview]
Message-ID: <ZQSfz1Kx9/QhN64E@casper.infradead.org> (raw)
In-Reply-To: <20230915195450.1fd35f48@p-imbrenda>

On Fri, Sep 15, 2023 at 07:54:50PM +0200, Claudio Imbrenda wrote:
> On Fri, 15 Sep 2023 18:28:25 +0100
> "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote:
> 
> > We introduced arch_make_folio_accessible() a couple of years
> > ago, and it's in use in the page writeback path.  GUP still uses
> > arch_make_page_accessible(), which means that we can succeed in making
> > a single page of a folio accessible, then fail to make the rest of the
> > folio accessible when it comes time to do writeback and it's too late
> > to do anything about it.  I'm not sure how much of a real problem this is.
> > 
> > Switching everything around to arch_make_folio_accessible() also lets
> > us switch the page flag to be per-folio instead of per-page, which is
> > a good step towards dynamically allocated folios.
> 
> if I understand correctly, this will as a matter of fact move the
> security property from pages to folios.

Correct.

> this means that trying to access a page will (try to) make the whole
> folio accessible, even though that might be counterproductive.... 
> 
> and there is no way to simply split a folio
> 
> I don't like this

As I said in the cover letter, we already make the entire folio
accessible in the writeback path.  I suppose if you never write the
folio back, this is new ...

Anyway, looking forward to a more substantial discussion on Monday.


  reply	other threads:[~2023-09-15 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 17:28 Matthew Wilcox (Oracle)
2023-09-15 17:28 ` [PATCH 1/3] mm: Use arch_make_folio_accessible() in gup_pte_range() Matthew Wilcox (Oracle)
2023-09-15 17:28 ` [PATCH 2/3] mm: Convert follow_page_pte() to use a folio Matthew Wilcox (Oracle)
2023-09-15 17:28 ` [PATCH 3/3] s390: Convert arch_make_page_accessible() to arch_make_folio_accessible() Matthew Wilcox (Oracle)
2023-09-15 17:54 ` [PATCH 0/3] Use arch_make_folio_accessible() everywhere Claudio Imbrenda
2023-09-15 18:17   ` Matthew Wilcox [this message]
2023-09-18 11:01     ` Claudio Imbrenda

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=ZQSfz1Kx9/QhN64E@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.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