lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Apr 2011 05:10:41 -0400
From:	Mike Frysinger <vapier@...too.org>
To:	Andrea Righi <andrea@...terlinux.com>
Cc:	Dave Chinner <david@...morbit.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org,
	linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC] [PATCH] drop_pagecache syscall

On Wed, Apr 27, 2011 at 05:01, Andrea Righi wrote:
> On Wed, Apr 27, 2011 at 10:14:53AM +1000, Dave Chinner wrote:
>> On Tue, Apr 26, 2011 at 11:35:27PM +0200, Andrea Righi wrote:
>> > This functionality can be used by all the applications that want to have a
>> > better control over the page cache management (for example to immediately drop
>> > pages that for sure will not be reused in the near future, without calling
>> > posix_fadvise() for all the files they've touched), or to provide a more fine
>> > grained debugging feature usable by the filesystem benchmarks.
>> >
>> > The system call does not require root privileges and it can be called by any
>> > unprivileged application. For example, we can write a userspace tool to run
>> > something like this:
>> >
>> >   $ drop-pagecache /path/file_or_dir
>>
>> That's a potential DOS vector, I think. Drop the pagecache in a hard
>> loop on the root fs of a busy server and watch it crawl...
>
> Yes, probably we could allow only the CAP_SYS_ADMIN tasks to execute
> this syscall.

if /proc/sys/vm/drop_caches has any checks other than file permission
checks (i.e. UID==0), it'd probably be better to copy those rather
than picking something different.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ