[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whGmE4QVr6NbgHnrVGVENfM3s1y6GNbsfh8PcOg=6bpqw@mail.gmail.com>
Date: Sat, 5 Jan 2019 12:17:12 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jiri Kosina <jikos@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
linux-api@...r.kernel.org
Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged
[ Crossed emails ]
On Sat, Jan 5, 2019 at 12:12 PM Jiri Kosina <jikos@...nel.org> wrote:
>
> I am still not completely sure what to return in such cases though; we can
> either blatantly lie and always pretend that the pages are resident
That's what my untested patch did. Or maybe just claim they are all
not present?
And again, that patch was entirely untested, so it may be garbage and
have some fundamental problem. I also don't know exactly what rule
might make most sense, but "you can write to the file" certainly to me
implies that you also could know what parts of it are in-core.
Who actually _uses_ mincore()? That's probably the best guide to what
we should do. Maybe they open the file read-only even if they are the
owner, and we really should look at file ownership instead.
I tried to make that "can_do_mincore()" function easy to understand
and easy to just modify to some sane state.
Again, my patch is meant as a "perhaps something like this?" rather
than some "this is _exactly_ how it must be done". Take the patch as a
quick suggestion, not some final answer.
Linus
Powered by blists - more mailing lists