[Let's see if I can get through the rest without premature sends...]
On Wed, 12 Nov 2008 00:17:39 +0200
Izik Eidus <ieidus@xxxxxxxxxx> wrote:
Actually, it occurs to me that there's no sanity checks on any ofWell get_user_pages() run in context of the process, therefore it
the values passed in by ioctl(). What happens if the user tells
KSM to scan a bogus range of memory?
should fail in "bogus range of memory"
But it will fail in a totally silent and mysterious way. Doesn't it
seem better to verify the values when you can return a meaningful error
code to the caller?
The other ioctl() calls have the same issue; you can start the thread
with nonsensical values for the number of pages to scan and the sleep
time.