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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Oct 2017 23:40:24 +0100
From:   David Howells <dhowells@...hat.com>
To:     Jeff Layton <jlayton@...hat.com>
Cc:     dhowells@...hat.com, viro@...IV.linux.org.uk,
        linux-fsdevel@...r.kernel.org, mszeredi@...hat.com,
        linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/14] VFS: Add a sample program for fsopen/fsmount [ver #6]

Jeff Layton <jlayton@...hat.com> wrote:

> So to make sure I understand....
> 
> Suppose I want to do a bind mount with the new API. Would I do something
> like this?
> 
>     mfd = fsopen("???");
>     write(mfd, "s /path/to/old/mount");

You would have to use something other than "s" as that indicates the medium
source, but there are plenty of other options.  Alternatively, something like:

	mfd = mntopen("/path/to/old/mount", ...);

You would need some way to retrieve the fs type, though.  Maybe the first
read() you do will return it:

	char fstype[256];
	read(mfd, fstype, 256);

ends up with:

	"fs <type>"

in the buffer, though I think I'd prefer it to be manually elicited.

>     write(mfd, "o bind");

This is unnecessary as you can just do:

>     fsmount(mfd, ...);

at this point to achieve the effect.

> That seems a bit klunkier than before as I now need to pay attention to
> the fstype. I guess I'd have to scrape /proc/mounts for that info?

I haven't worked out this interface yet.  I'm not sure it's actually necessary
at this point, though it'd be nice to have.

David

Powered by blists - more mailing lists