Thread (148 messages) 148 messages, 20 authors, 2019-03-12

Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged

From: Jiri Kosina <jikos@kernel.org>
Date: 2019-01-16 21:41:22
Also in: linux-mm, lkml

On Wed, 16 Jan 2019, Matthew Wilcox wrote:
quoted
On Thu, 17 Jan 2019, Linus Torvalds wrote:
quoted
As I suggested earlier in the thread, the fix for RWF_NOWAIT might be
to just move the test down to after readahead.
Your patch 3/3 just removes the test.  Am I right in thinking that it
doesn't need to be *moved* because the existing test after !PageUptodate
catches it?
Exactly. It just initiates read-ahead for IOCB_NOWAIT cases as well, and 
if it's actually set, it'll be handled by the !PageUpdtodate case.
Of course, there aren't any tests for RWF_NOWAIT in xfstests.  Are there 
any in LTP?
Not in the released version AFAIK. I've asked the LTP maintainer (in our 
internal bugzilla) to take care of this thread a few days ago, but not 
sure what came out of it. Adding him (Cyril) to CC.
Some typos in the commit messages:
quoted
Another aproach (checking file access permissions in order to decide
"approach"
quoted
Subject: [PATCH 2/3] mm/mincore: make mincore() more conservative

The semantics of what mincore() considers to be resident is not completely
clearar, but Linux has always (since 2.3.52, which is when mincore() was
"clear"
quoted
initially done) treated it as "page is available in page cache".

That's potentially a problem, as that [in]directly exposes meta-information
about pagecache / memory mapping state even about memory not strictly belonging
to the process executing the syscall, opening possibilities for sidechannel
attacks.

Change the semantics of mincore() so that it only reveals pagecache information
for non-anonymous mappings that belog to files that the calling process could
"belong"
Thanks.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help