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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 May 2012 09:31:17 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Venkatraman S <svenkatr@...com>
Cc:	linux-mmc@...r.kernel.org, cjb@...top.org, linux-mm@...ck.org,
	linux-fsdevel@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, arnd.bergmann@...aro.org,
	alex.lemberg@...disk.com, ilan.smith@...disk.com,
	lporzio@...ron.com, rmk+kernel@....linux.org.uk
Subject: Re: [PATCH v2 01/16] FS: Added demand paging markers to filesystem

On Thu, May 03, 2012 at 07:53:00PM +0530, Venkatraman S wrote:
> From: Ilan Smith <ilan.smith@...disk.com>
> 
> Add attribute to identify demand paging requests.
> Mark readpages with demand paging attribute.
> 
> Signed-off-by: Ilan Smith <ilan.smith@...disk.com>
> Signed-off-by: Alex Lemberg <alex.lemberg@...disk.com>
> Signed-off-by: Venkatraman S <svenkatr@...com>
> ---
>  fs/mpage.c                |    2 ++
>  include/linux/bio.h       |    7 +++++++
>  include/linux/blk_types.h |    2 ++
>  3 files changed, 11 insertions(+)
> 
> diff --git a/fs/mpage.c b/fs/mpage.c
> index 0face1c..8b144f5 100644
> --- a/fs/mpage.c
> +++ b/fs/mpage.c
> @@ -386,6 +386,8 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
>  					&last_block_in_bio, &map_bh,
>  					&first_logical_block,
>  					get_block);
> +			if (bio)
> +				bio->bi_rw |= REQ_RW_DMPG;

Have you thought about the potential for DOSing a machine
with this? That is, user data reads can now preempt writes of any
kind, effectively stalling writeback and memory reclaim which will
lead to OOM situations. Or, alternatively, journal flushing will get
stalled and no new modifications can take place until the read
stream stops.

This really seems like functionality that belongs in an IO
scheduler so that write starvation can be avoided, not in high-level
data read paths where we have no clue about anything else going on
in the IO subsystem....

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
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