[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg5Kk+r36=jcGBaLUj+gjopjgiW5eyvkdMqvn0jFkD_iQ@mail.gmail.com>
Date: Sat, 5 Jan 2019 15:16:32 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jann Horn <jannh@...gle.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Michal Hocko <mhocko@...e.com>, Linux-MM <linux-mm@...ck.org>,
kernel list <linux-kernel@...r.kernel.org>,
Linux API <linux-api@...r.kernel.org>
Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged
On Sat, Jan 5, 2019 at 3:05 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> That would be nicer than my patch, simply because removing code is
> always nice. And arguably it's a better semantic anyway.
Yeah, I wonder why we did that thing where mincore() walks the page
tables, but if they are empty it looks in the page cache.
[... goes and looks in history ..]
It goes back to forever, it looks like. I can't find a reason.
Anyway, a removal patch would look something like the attached, I
think. That makes mincore() actually say how many pages are in _this_
mapping, not how many pages could be paged in without doing IO.
Hmm. Maybe we should try this first. Simplicity is always good.
Again, obviously untested.
Linus
View attachment "patch.diff" of type "text/x-patch" (2711 bytes)
Powered by blists - more mailing lists