lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1123331339.2730971237374916174.JavaMail.root@spooler8-g27.priv.proxad.net>
Date:	Wed, 18 Mar 2009 12:15:16 +0100 (CET)
From:	porte64@...e.fr
To:	linux-kernel@...r.kernel.org
Subject: on circular files and an extension to truncate()

Hello,

How about extending the truncate() system call to enable
truncating files from the beginning also ?
This would be useful to help handle history files (logs ...).

One step further -- and i guess many people have already
thought about this:
Circular files could be introduced. I mean files whose
size remains fixed when written to, with the data wrapping
in a circular fashion. This would typically require an
additionnal position parameter ("cursor offset") in userland
stat_t structures.

So circular files would be a sub-category of regular files,
where the write() system call has special handling and updates
the cursor offset.

One advantage of such an implementation is that is would not
depend on the filesystem, and would help in many applications
in which big amounts of data is copied to another file.

I have poor knowledge of the linux kernel so i cannot see
if this suggestion has annoying side-effects and/or
poses compatibility issues.

However, the weaker idea of implementing truncate() with the
possibility to discard data at the beginning of files, then
extending the file, would help a lot.

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ