Re: Zeroing data blocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually I want the option for writing both random bits and zeroes to
the data blocks.
I wanted to know about how I can write them to the data blocks.
I tried the following at the user space:
char *data;
memset(data, 0, 4096);
fprintf(fp, "%s", data);

The program causes a segfault when I am trying to write the zeroed
buffer onto a file.
Could you let me know how I can access the data blocks directly using
inode->i_blocks? I could not find the API which could use this field
for accessing the data blocks.

Thanks,
Avinash.


On 7/9/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
On Sat, 2006-07-08 at 18:56 -0700, Avinash Ramanath wrote:
> I am trying to zero data blocks whenever an unlink is invoked as part
> of a secure delete filesystem.
[
Hi,

just a question... how secure do you want to be?
(just asking because zeros might not be the best pattern when protecting
against government type use :)

> I tried to zero the file by writing a buffer (of file size) with
> zeroes onto the file.

that's not so nice since there is no guarantee that the filesystem or
the disk won't remap the data blocks underneath you...




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux