Skip to contentSkip to conversation

ecryptfs log spew from EINTR

DISCUSSION Dave Hansen 2 participants 2 messages Mar 5, 2014 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

I have a little program that uses mmap() to copy files. Essentially:

	addr1 = mmap(fd1);
	addr2 = mmap(fd2);
	memcpy(addr1, addr2, len);

If these files are on ecryptfs and I interrupt the memcpy() with ^C, I consistently get this in dmesg:

ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
ecryptfs_readpage: Error decrypting page; rc = [-4]

-4 is, of course -EINTR because of the ^C. Should we be suppressing the message when we see EINTR?

#1 lore raw
Quoted 6 lines · Dave Hansen

I have a little program that uses mmap() to copy files. Essentially:

	addr1 = mmap(fd1);
	addr2 = mmap(fd2);
	memcpy(addr1, addr2, len);
Quoted 8 lines

If these files are on ecryptfs and I interrupt the memcpy() with ^C, I consistently get this in dmesg:

ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
ecryptfs_readpage: Error decrypting page; rc = [-4]

-4 is, of course -EINTR because of the ^C. Should we be suppressing the message when we see EINTR?

Yes. In fact, eCryptfs shouldn't print a KERN_ERR message at all in this situation. KERN_DEBUG at most. eCryptfs is too chatty in many cases.

I'd like to switch over to the pr_* functions and downgrade many log messages to pr_debug() at that time.

Tyler

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html