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

2019-01-05 Thread Jiri Kosina
On Sat, 5 Jan 2019, Linus Torvalds 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? Thinking about i

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

2019-01-05 Thread Linus Torvalds
[ Crossed emails ] On Sat, Jan 5, 2019 at 12:12 PM Jiri Kosina 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 prese

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

2019-01-05 Thread Linus Torvalds
On Sat, Jan 5, 2019 at 11:46 AM Linus Torvalds wrote: > > Can we please just limit it to vma's that are either anonymous, or map > a file that the user actually owns? .. or slightly simpler: a file that the user opened for writing. IOW, some (TOTALLY UNTESTED!) patch like this? L

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

2019-01-05 Thread Jiri Kosina
On Sat, 5 Jan 2019, Linus Torvalds wrote: > > There are possibilities [1] how mincore() could be used as a converyor of > > a sidechannel information about pagecache metadata. > > Can we please just limit it to vma's that are either anonymous, or map > a file that the user actually owns? > > The

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

2019-01-05 Thread kbuild test robot
Hi Jiri, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20 next-20190103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jiri-

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

2019-01-05 Thread Linus Torvalds
On Sat, Jan 5, 2019 at 9:27 AM Jiri Kosina wrote: > > From: Jiri Kosina > > There are possibilities [1] how mincore() could be used as a converyor of > a sidechannel information about pagecache metadata. Can we please just limit it to vma's that are either anonymous, or map a file that the user

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

2019-01-05 Thread kbuild test robot
Hi Jiri, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20 next-20190103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jiri-

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

2019-01-05 Thread Vlastimil Babka
On 5.1.2019 20:24, Jiri Kosina wrote: > On Sat, 5 Jan 2019, Vlastimil Babka wrote: > >>> There are possibilities [1] how mincore() could be used as a converyor of >>> a sidechannel information about pagecache metadata. >>> >>> Provide vm.mincore_privileged sysctl, which makes it possible to minco

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

2019-01-05 Thread Jiri Kosina
On Sat, 5 Jan 2019, Vlastimil Babka wrote: > > There are possibilities [1] how mincore() could be used as a converyor of > > a sidechannel information about pagecache metadata. > > > > Provide vm.mincore_privileged sysctl, which makes it possible to mincore() > > start returning -EPERM in case

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

2019-01-05 Thread Vlastimil Babka
On 5.1.2019 18:27, Jiri Kosina wrote: > From: Jiri Kosina > > There are possibilities [1] how mincore() could be used as a converyor of > a sidechannel information about pagecache metadata. > > Provide vm.mincore_privileged sysctl, which makes it possible to mincore() > start returning -EPERM

<    1   2