[PATCH v2] Decode /dev/loop ioctls

Dmitry V. Levin ldv at altlinux.org
Wed Apr 18 16:15:51 UTC 2012


On Tue, Apr 17, 2012 at 10:19:31PM -0400, Mike Frysinger wrote:
> Needed to debug some losetup failures, and it's easier when you can see
> what the kernel is getting vs what you think you're sending, so add some
> decoders for those ioctls.

Applied, thanks.

[...]
> +		if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) {
> +			string_quote((void *) info.lo_encrypt_key, s, 0, LO_KEY_SIZE);
> +			tprintf(", encrypt_key=%s", s);
> +		}
[...]
> +		if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) {
> +			string_quote((void *) info64.lo_crypt_name, s, -1, LO_NAME_SIZE);
> +			tprintf(", crypt_name=%s", s);
> +			string_quote((void *) info64.lo_encrypt_key, s, 0, LO_KEY_SIZE);
> +			tprintf(", encrypt_key=%s", s);
> +		}

I'm not sure the LO_CRYPT_NONE case worth decoding even in verbose mode.
If the kernel ignores this data, what kind of help for debugging could
it be?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120418/56b6dad8/attachment.bin>


More information about the Strace-devel mailing list