lkml.org 
[lkml]   [2015]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/5] WIP: Add syscall unlinkat_s (currently x86* only)
    From
    Date
    On Tue, 2015-02-03 at 07:58 +0100, Alexander Holler wrote:
    > Am 03.02.2015 um 07:05 schrieb Al Viro:
    > > On Mon, Feb 02, 2015 at 06:05:09PM +0100, Alexander Holler wrote:
    > >> + if (inode) {
    > >> + // TODO:
    > >> + // if (inode is file and 's' flag is set)
    > >> + // secure = true;
    > >> + if (!secure)
    > >> + iput(inode); /* truncate the inode here */
    > >> + else {
    > >> + struct super_block *sb = inode->i_sb;
    > >> + if (sb->s_op->set_secure_delete)
    > >> + sb->s_op->set_secure_delete(sb, true);
    > >> + // TODO: We should fail if secure isn't supported,
    > >> + // look up how that's possible here.
    > >> + iput(inode); /* truncate the inode here */
    > >> + // TODO: check if sb is still valid after the inode is gone
    > >> + sync_filesystem(sb);
    > >> + if (sb->s_op->set_secure_delete)
    > >> + sb->s_op->set_secure_delete(sb, false);
    > >> + }
    > >
    > > Charming. Now, what exactly happens if two such syscalls overlap in time?
    >
    > What do you think will happen? I assume you haven't looked at how I've
    > implemented set_secure_delete(). CHarming.

    Chill, why don't you.



    \
     
     \ /
      Last update: 2015-02-03 09:41    [W:7.688 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site