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>] [day] [month] [year] [list]
Date:	Wed, 25 Jan 2012 09:37:05 +0800
From:	"Li Wang" <liwang@...t.edu.cn>
To:	ecryptfs@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re:[PATCH 1/3] eCryptfs: Make truncate path killable

Hi Tyler,
    Is it more polite to invoke cond_resched() at the beginning/end of the potentially long-time loop?

Cheers,
Li Wang





---------- Origin message ----------
>From:"Tyler Hicks" <tyhicks@...onical.com>
>To:ecryptfs@...r.kernel.org, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
>Subject:[PATCH 1/3] eCryptfs: Make truncate path killable
>Date:2012-01-21 06:35:05

ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
page, zeroes out the appropriate portions, and then encrypts the page
before writing it to the lower filesystem. It was unkillable and due to
the lack of sparse file support could result in tying up a large portion
of system resources, while encrypting pages of zeros, with no way for
the truncate operation to be stopped from userspace.

This patch adds the ability for ecryptfs_write() to detect a pending
fatal signal and return as gracefully as possible. The intent is to
leave the lower file in a useable state, while still allowing a user to
break out of the encryption loop. If a pending fatal signal is detected,
the eCryptfs inode size is updated to reflect the modified inode size
and then -EINTR is returned.

Signed-off-by: Tyler Hicks <tyhicks@...onical.com>
Cc: <stable@...r.kernel.org>
---
fs/ecryptfs/read_write.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ