The patch titled ecryptfs: Convert signed data types to unsigned data types has been added to the -mm tree. Its filename is ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ecryptfs: Convert signed data types to unsigned data types From: Mike Halcrow <mhalcrow@xxxxxxxxxx> Convert data types in structures in the header to be unsigned if they are supposed to ever only contain unsigned values. Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ecryptfs/ecryptfs_kernel.h | 46 ++++++++++++++++---------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff -puN fs/ecryptfs/ecryptfs_kernel.h~ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types fs/ecryptfs/ecryptfs_kernel.h --- 25/fs/ecryptfs/ecryptfs_kernel.h~ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types Fri May 26 13:47:55 2006 +++ 25-akpm/fs/ecryptfs/ecryptfs_kernel.h Fri May 26 13:47:55 2006 @@ -80,18 +80,18 @@ struct ecryptfs_session_key { #define ECRYPTFS_USERSPACE_SHOULD_TRY_TO_ENCRYPT 0x00000002 #define ECRYPTFS_CONTAINS_DECRYPTED_KEY 0x00000004 #define ECRYPTFS_CONTAINS_ENCRYPTED_KEY 0x00000008 - s32 flags; - s32 encrypted_key_size; - s32 decrypted_key_size; + u32 flags; + u32 encrypted_key_size; + u32 decrypted_key_size; u8 encrypted_key[ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES]; u8 decrypted_key[ECRYPTFS_MAX_KEY_BYTES]; }; struct ecryptfs_password { - s32 password_bytes; + u32 password_bytes; s32 hash_algo; - s32 hash_iterations; - s32 session_key_encryption_key_bytes; + u32 hash_iterations; + u32 session_key_encryption_key_bytes; #define ECRYPTFS_PERSISTENT_PASSWORD 0x01 #define ECRYPTFS_SESSION_KEY_ENCRYPTION_KEY_SET 0x02 u32 flags; @@ -104,15 +104,15 @@ struct ecryptfs_password { /* May be a password or a private key */ struct ecryptfs_auth_tok { - uint16_t version; /* 8-bit major and 8-bit minor */ + u16 version; /* 8-bit major and 8-bit minor */ #define ECRYPTFS_PASSWORD 0x00000001 #define ECRYPTFS_PRIVATE_KEY 0x00000002 #define ECRYPTFS_CONTAINS_SECRET 0x00000004 #define ECRYPTFS_EXPIRED 0x00000008 u32 flags; uid_t uid; - s64 creation_time; - s64 expiration_time; + u64 creation_time; + u64 expiration_time; union { struct ecryptfs_password password; /* Private key is in future eCryptfs releases */ @@ -143,7 +143,7 @@ struct ecryptfs_page_crypt_context { struct page *page; #define ECRYPTFS_PREPARE_COMMIT_MODE 0 #define ECRYPTFS_WRITEPAGE_MODE 1 - int mode; + unsigned int mode; union { struct file *lower_file; struct writeback_control *wbc; @@ -191,23 +191,22 @@ struct ecryptfs_crypt_stat { #define ECRYPTFS_ENCRYPT_IV_PAGES 0x00000040 #define ECRYPTFS_KEY_VALID 0x00000080 u32 flags; - int file_version; - int iv_bytes; - int num_keysigs; - int header_extent_size; - int num_header_extents_at_front; /* Number of header extents - * at the front of the file */ - int extent_size; /* Data extent size; default is 4096 */ - int key_size_bits; + unsigned int file_version; + unsigned int iv_bytes; + unsigned int num_keysigs; + unsigned int header_extent_size; + unsigned int num_header_extents_at_front; + unsigned int extent_size; /* Data extent size; default is 4096 */ + unsigned int key_size_bits; unsigned int extent_shift; unsigned int extent_mask; struct crypto_tfm *tfm; struct crypto_tfm *md5_tfm; /* Crypto context for generating * the initialization vectors */ - char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE]; + unsigned char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE]; unsigned char key[ECRYPTFS_MAX_KEY_BYTES]; unsigned char root_iv[ECRYPTFS_MAX_IV_BYTES]; - char keysigs[ECRYPTFS_MAX_NUM_KEYSIGS][ECRYPTFS_SIG_SIZE_HEX]; + unsigned char keysigs[ECRYPTFS_MAX_NUM_KEYSIGS][ECRYPTFS_SIG_SIZE_HEX]; struct mutex cs_mutex; }; @@ -234,8 +233,9 @@ struct ecryptfs_mount_crypt_stat { /* Pointers to memory we do not own, do not free these */ struct ecryptfs_auth_tok *global_auth_tok; struct key *global_auth_tok_key; - char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; - char global_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1]; + unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + + 1]; + unsigned char global_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1]; }; /* superblock private data. */ @@ -253,7 +253,7 @@ struct ecryptfs_file_info { /* auth_tok <=> encrypted_session_key mappings */ struct ecryptfs_auth_tok_list_item { - char encrypted_session_key[ECRYPTFS_MAX_KEY_BYTES]; + unsigned char encrypted_session_key[ECRYPTFS_MAX_KEY_BYTES]; struct list_head list; struct ecryptfs_auth_tok auth_tok; }; _ Patches currently in -mm which might be from mhalcrow@xxxxxxxxxx are ecryptfs-fs-makefile-and-fs-kconfig.patch ecryptfs-documentation.patch ecryptfs-makefile.patch ecryptfs-main-module-functions.patch ecryptfs-main-module-functions-uint16_t-u16.patch ecryptfs-header-declarations.patch ecryptfs-header-declarations-update.patch ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types.patch ecryptfs-header-declarations-remove-unnecessary-ifndefs.patch ecryptfs-superblock-operations.patch ecryptfs-dentry-operations.patch ecryptfs-file-operations.patch ecryptfs-file-operations-remove-null-==-syntax.patch ecryptfs-file-operations-remove-extraneous-read-of-inode-size-from-header.patch ecryptfs-file-operations-fix.patch ecryptfs-inode-operations.patch ecryptfs-mmap-operations.patch mark-address_space_operations-const-vs-ecryptfs-mmap-operations.patch ecryptfs-keystore.patch ecryptfs-crypto-functions.patch ecryptfs-debug-functions.patch ecryptfs-alpha-build-fix.patch ecryptfs-convert-assert-to-bug_on.patch ecryptfs-remove-unnecessary-null-checks.patch ecryptfs-rewrite-ecryptfs_fsync.patch ecryptfs-overhaul-file-locking.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html