Thread (34 messages) 34 messages, 6 authors, 2018-08-01

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

flat view

From: David Howells <dhowells@redhat.com>
Date: 2018-07-27 23:51:33
Also in: linux-fsdevel, lkml

Andy Lutomirski [off-list ref] wrote:
quoted
[*] Not without a 6-arg syscall or some other way of passing it.
Are there still architectures that have problems with 6-arg syscalls?
As I understand it, 6-arg syscalls are frowned upon.
I suppose that, as long as there is never a case where fsconfig_set_path and
fsconfig_set_fd both succeed, then it's not a big deal.
fsconfig_set_path/path_empty requires the 'value' argument to point to a
string, possibly "", and fsconfig_set_fd requires it to be NULL.

I can't stop you from doing:

	fd = open("/some/path", O_PATH);
	fsconfig(fsfd, fsconfig_set_fd, "fd", NULL, fd);

or:

	fd = open("/dev/sda6", O_RDWR);
	fsconfig(fsfd, fsconfig_set_path_empty, "foo", "", fd);

The first should fail because I'm using fget() not fget_raw() and the
second will pass the string and fd number to the filesystem, which will
presumably then call fs_lookup_param() to invoke pathwalk upon it - which will
likely also fail.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help