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>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Nov 2020 18:03:20 +0800
From:   yulei zhang <yulei.kernel@...il.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Naoya Horiguchi <naoya.horiguchi@....com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        Xiao Guangrong <xiaoguangrong.eric@...il.com>,
        Wanpeng Li <kernellwp@...il.com>,
        Haiwei Li <lihaiwei.kernel@...il.com>,
        Yulei Zhang <yuleixzhang@...cent.com>,
        Xiao Guangrong <gloryxiao@...cent.com>
Subject: Re: [PATCH 01/35] fs: introduce dmemfs module

On Thu, Nov 12, 2020 at 7:09 AM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> On Wed, Nov 11, 2020 at 04:53:00PM +0800, yulei zhang wrote:
>
> > > ... same here, seeing that you only call that thing from the next two functions
> > > and you do *not* provide ->mknod() as a method (unsurprisingly - what would
> > > device nodes do there?)
> > >
> >
> > Thanks for pointing this out. we may need support the mknod method, otherwise
> > the dev is redundant  and need to be removed.
>
> I'd suggest turning that into (static) __create_file(....) with
>
> static int dmemfs_create(struct inode *dir, struct dentry *dentry,
>                          umode_t mode, bool excl)
> {
>         return __create_file(dir, dentry, mode | S_IFREG);
> }
>
> static int dmemfs_mkdir(struct inode *dir, struct dentry *dentry,
>                          umode_t mode)
> {
>         return __create_file(dir, dentry, mode | S_IFDIR);
> }
>
> (i.e. even inc_nlink() of parent folded into that).
>
> [snip]
>
> > Yes, we seperate the full implementation for dmemfs_file_mmap into
> > patch 05/35, it
> > will assign the interfaces to handle the page fault.
>
> It would be less confusing to move the introduction of ->mmap() to that patch,
> then.

Thanks for the suggestion. will refactor the patches accordingly.

Powered by blists - more mailing lists