[Unionfs] copyup being interrupted by a signal?

Shaya Potter spotter at cs.columbia.edu
Wed Mar 8 21:48:45 EST 2006


On Wed, 2006-03-08 at 21:38 -0500, Josef Sipek wrote:
> On Mon, Mar 06, 2006 at 07:14:34PM -0500, Shaya Potter wrote:
> > would it be sane to disable signals for the duration of copyup?
> 
> I think that it doesn't really make sense since:
> 
> 1) You can't really defend against DOS attacks anyway

well, one can minimize the entry points.

> 2) What if I accidentally run something like:
> 
> echo bar >> foo
> 
> where foo is a 1GB file, but I realized that I really wanted to run:
> 
> echo bar >> foobar
> 
> disabling signals would prevent me from ctrl-c'ing the process - I would
> have to wait for 1GB of data to be read and written to disk. You can DOS
> a non-unionfs system just as easily - imagine if signals were disabled:

so is an easy answer to that, to not block any other signal that would
cause the kernel to not retry the syscall (i.e SIGINT).  i.e. if the
signal would return an err (of any sorts, ERETRY or perhaps something
else) to userspace, don't block it, but if it would never see userspace,
block it until copyup finishes?




More information about the unionfs mailing list