All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <achender@linux.vnet.ibm.com>
To: djwong@us.ibm.com
Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [Ext4 Secure Delete 1/7v4] ext4: Secure Delete: Add new EXT4_SECRM_RANDOM_FL flag
Date: Fri, 07 Oct 2011 10:14:20 -0700	[thread overview]
Message-ID: <4E8F336C.1060708@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111007170255.GE12447@tux1.beaverton.ibm.com>

On 10/07/2011 10:02 AM, Darrick J. Wong wrote:
> On Fri, Oct 07, 2011 at 12:10:59AM -0700, Allison Henderson wrote:
>> This patch adds a new attribute flag EXT4_SECRM_RANDOM_FL.
>> During a secure delete, this flag will cause blocks to be
>> overwritten with random data instead of zeros.
>>
>> Signed-off-by: Allison Henderson<achender@linux.vnet.ibm.com>
>> ---
>> :100644 100644 e717dfd... db54ce4... M	fs/ext4/ext4.h
>>   fs/ext4/ext4.h |    9 ++++++---
>>   1 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
>> index e717dfd..db54ce4 100644
>> --- a/fs/ext4/ext4.h
>> +++ b/fs/ext4/ext4.h
>> @@ -350,17 +350,18 @@ struct flex_groups {
>>   #define EXT4_EXTENTS_FL			0x00080000 /* Inode uses extents */
>>   #define EXT4_EA_INODE_FL	        0x00200000 /* Inode used for large EA */
>>   #define EXT4_EOFBLOCKS_FL		0x00400000 /* Blocks allocated beyond EOF */
>> +#define EXT4_SECRM_RANDOM_FL		0x10000000 /* Use random data instead of zeros */
>>   #define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */
>>
>> -#define EXT4_FL_USER_VISIBLE		0x004BDFFF /* User visible flags */
>> -#define EXT4_FL_USER_MODIFIABLE		0x004B80FF /* User modifiable flags */
>> +#define EXT4_FL_USER_VISIBLE		0x104BDFFF /* User visible flags */
>> +#define EXT4_FL_USER_MODIFIABLE		0x104B80FF /* User modifiable flags */
>
> Is there a reason why this #define is 0x104BDFFF instead of a bunch of flags
> or'd together in a manner similar to the one below it?
>
> --D

That's a really good suggestion, and I dont see any reason why it needs 
to be a hard number like that.  I will definitely add that in if we 
decide to keep the EXT4_SECRM_RANDOM_FL flag.  Thx!

>>
>>   /* Flags that should be inherited by new inodes from their parent. */
>>   #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_FL |\
>>   			   EXT4_SYNC_FL | EXT4_IMMUTABLE_FL | EXT4_APPEND_FL |\
>>   			   EXT4_NODUMP_FL | EXT4_NOATIME_FL |\
>>   			   EXT4_NOCOMPR_FL | EXT4_JOURNAL_DATA_FL |\
>> -			   EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL)
>> +			   EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL | EXT4_SECRM_RANDOM_FL)
>>
>>   /* Flags that are appropriate for regular files (all but dir-specific ones). */
>>   #define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL))
>> @@ -407,6 +408,7 @@ enum {
>>   	EXT4_INODE_EXTENTS	= 19,	/* Inode uses extents */
>>   	EXT4_INODE_EA_INODE	= 21,	/* Inode used for large EA */
>>   	EXT4_INODE_EOFBLOCKS	= 22,	/* Blocks allocated beyond EOF */
>> +	EXT4_INODE_SECRM_RANDOM = 28,   /* Use random data instead of zeros */
>>   	EXT4_INODE_RESERVED	= 31,	/* reserved for ext4 lib */
>>   };
>>
>> @@ -453,6 +455,7 @@ static inline void ext4_check_flag_values(void)
>>   	CHECK_FLAG_VALUE(EXTENTS);
>>   	CHECK_FLAG_VALUE(EA_INODE);
>>   	CHECK_FLAG_VALUE(EOFBLOCKS);
>> +	CHECK_FLAG_VALUE(SECRM_RANDOM);
>>   	CHECK_FLAG_VALUE(RESERVED);
>>   }
>>
>> --
>> 1.7.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>


  reply	other threads:[~2011-10-07 17:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07  7:10 [Ext4 Secure Delete 0/7 v4] Ext4 secure delete Allison Henderson
2011-10-07  7:10 ` [Ext4 Secure Delete 1/7v4] ext4: Secure Delete: Add new EXT4_SECRM_RANDOM_FL flag Allison Henderson
2011-10-07 17:02   ` Darrick J. Wong
2011-10-07 17:14     ` Allison Henderson [this message]
2011-10-07  7:11 ` [Ext4 Secure Delete 2/7v4] ext4: Secure Delete: Add ext4_ind_hole_lookup function Allison Henderson
2011-10-07 17:47   ` Darrick J. Wong
2011-10-07 23:10     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 3/7v4] ext4: Secure Delete: Add secure delete functions Allison Henderson
2011-10-07 17:19   ` Allison Henderson
2011-10-07 18:07   ` Darrick J. Wong
2011-10-07 23:08     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 4/7v4] ext4: Secure Delete: Secure delete file data Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 5/7v4] ext4: Secure Delete: Secure delete directory entry Allison Henderson
2011-10-07 17:22   ` Darrick J. Wong
2011-10-07 17:59     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 6/7v4] ext4: Secure Delete: Secure delete meta data blocks Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 7/7v4] ext4/jbd2: Secure Delete: Secure delete journal blocks Allison Henderson
2011-10-07 18:35   ` Darrick J. Wong
2011-10-07 19:31     ` Sunil Mushran
2011-10-07 19:54     ` Eric Sandeen
2011-10-07 20:14       ` Allison Henderson
2011-10-07 19:55     ` Allison Henderson
2011-10-07 20:58       ` Darrick J. Wong
2011-10-08  0:06         ` Allison Henderson
2011-10-10 19:47   ` Jonathan Corbet
2011-10-10 23:35     ` Allison Henderson
2011-10-10 23:41       ` Jonathan Corbet
2011-10-11  0:54         ` Allison Henderson
2011-10-10 20:00   ` Jonathan Corbet
2011-10-10 23:36     ` Allison Henderson
2011-10-07 15:21 ` [Ext4 Secure Delete 0/7 v4] Ext4 secure delete Andreas Dilger
2011-10-07 17:07   ` Allison Henderson
2011-10-10 17:20     ` Allison Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8F336C.1060708@linux.vnet.ibm.com \
    --to=achender@linux.vnet.ibm.com \
    --cc=djwong@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.