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]
Message-ID: <871toikt7c.fsf@openvz.org>
Date:	Tue, 02 Dec 2014 17:43:51 +0300
From:	Dmitry Monakhov <dmonakhov@...nvz.org>
To:	linux-kernel@...r.kernel.org
CC:	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] fs: make generic_block_fiemap sig-tolerant PING...

Andrew can you please get this patch. IMHO it is simple and clean.
BTW: W/o patch unprivileged may abuse system resources simply by spawning
wast number of unkilable busyloops (works on ext2/ext3):

truncate --size 1T test
for ((i=0;i<1024;i++))
do
        filefrag test > /dev/null &
done

> __generic_block_fiemap may spin very long time for large sparse files.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
> ---
>  fs/ioctl.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index 8ac3fad..6fbeb68 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -379,6 +379,11 @@ int __generic_block_fiemap(struct inode *inode,
>  				past_eof = true;
>  		}
>  		cond_resched();
> +		if (fatal_signal_pending(current)) {
> +			ret = -EINTR;
> +			break;
> +		}
> +
>  	} while (1);
>  
>  	/* If ret is 1 then we just hit the end of the extent array */
> -- 
> 1.7.1

Download attachment "signature.asc" of type "application/pgp-signature" (473 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ