Re: [PATCH] eCryptfs: Fix dentry handling on create error, unlink,and inode destroy

From: Andrew Morton
Date: Tue Jan 08 2008 - 17:43:46 EST


On Tue, 8 Jan 2008 15:58:07 -0600
Michael Halcrow <mhalcrow@xxxxxxxxxx> wrote:

> > > rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry,
> > > directory_inode->i_sb, 0);
> >
> > Will this cause an undesirable log storm if the underlying fs runs
> > out of space?
>
> When you're bumping up against the end of your storage space, you will
> get a lot more that just this message in your logs. There are printk's
> in ecryptfs_write_lower(), ecryptfs_encrypt_page(), ecryptfs_write(),
> and ecryptfs_write_metadata_to_contents() that will get pretty
> noisy. Is it worth wrapping those in a higher level of verbosity?

The consequences of this can actually be pretty harmful. syslogd typically
does sychronous writes so a random full disk can cause a seek storm over on
the log disk and a runaway ecryptfs-using application could pretty quickly
exhaust the space on the log disk.

So I'd suggest that sometime you go through the fs and find any such
user-triggerable printks and fix them up. The most robust way of fixing
them up would be to delete them, or make them dependent on
CONFIG_ECRYPTFS_DEBUG. Fiddling with the facility levels would help, but
it just lessens the probability rather than fixing it completely.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/