[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net>
Date: Tue, 15 Jan 2019 21:25:38 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Josh Snyder <joshs@...flix.com>,
Dominique Martinet <asmadeus@...ewreck.org>,
Dave Chinner <david@...morbit.com>,
Jiri Kosina <jikos@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Jann Horn <jannh@...gle.com>,
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 Jan 15, 2019, at 9:00 PM, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
>> On Wed, Jan 16, 2019 at 12:42 PM Josh Snyder <joshs@...flix.com> wrote:
>>
>> For Netflix, losing accurate information from the mincore syscall would
>> lengthen database cluster maintenance operations from days to months. We
>> rely on cross-process mincore to migrate the contents of a page cache from
>> machine to machine, and across reboots.
>
> Ok, this is the kind of feedback we need, and means I guess we can't
> just use the mapping existence for mincore.
>
> The two other ways that we considered were:
>
> (a) owner of the file gets to know cache information for that file.
>
> (b) having the fd opened *writably* gets you cache residency information.
>
> Sadly, taking a look at happycache, you open the file read-only, so
> (b) doesn't work.
>
> Judging just from the source code, I can't tell how the user ownership
> works. Any input on that?
>
> And if you're not the owner of the file, do you have another
> suggestion for that "Yes, I have the right to see what's in-core for
> this file". Because the problem is literally that if it's some random
> read-only system file, the kernel shouldn't leak access patterns to
> it..
>
>
Something like CAP_DAC_READ_SEARCH might not be crazy.
Powered by blists - more mailing lists