<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/udf/file.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-01-24T13:27:20Z</updated>
<entry>
<title>fs: make helpers idmap mount aware</title>
<updated>2021-01-24T13:27:20Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2021-01-21T13:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=549c7297717c32ee53f156cd949e055e601f67bb'/>
<id>urn:sha1:549c7297717c32ee53f156cd949e055e601f67bb</id>
<content type='text'>
Extend some inode methods with an additional user namespace argument. A
filesystem that is aware of idmapped mounts will receive the user
namespace the mount has been marked with. This can be used for
additional permission checking and also to enable filesystems to
translate between uids and gids if they need to. We have implemented all
relevant helpers in earlier patches.

As requested we simply extend the exisiting inode method instead of
introducing new ones. This is a little more code churn but it's mostly
mechanical and doesnt't leave us with additional inode methods.

Link: https://lore.kernel.org/r/20210121131959.646623-25-christian.brauner@ubuntu.com
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>attr: handle idmapped mounts</title>
<updated>2021-01-24T13:27:16Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2021-01-21T13:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f221d6f7b881d95de1f356a3097d755ab1e47d4'/>
<id>urn:sha1:2f221d6f7b881d95de1f356a3097d755ab1e47d4</id>
<content type='text'>
When file attributes are changed most filesystems rely on the
setattr_prepare(), setattr_copy(), and notify_change() helpers for
initialization and permission checking. Let them handle idmapped mounts.
If the inode is accessed through an idmapped mount map it into the
mount's user namespace. Afterwards the checks are identical to
non-idmapped mounts. If the initial user namespace is passed nothing
changes so non-idmapped mounts will see identical behavior as before.

Helpers that perform checks on the ia_uid and ia_gid fields in struct
iattr assume that ia_uid and ia_gid are intended values and have already
been mapped correctly at the userspace-kernelspace boundary as we
already do today. If the initial user namespace is passed nothing
changes so non-idmapped mounts will see identical behavior as before.

Link: https://lore.kernel.org/r/20210121131959.646623-8-christian.brauner@ubuntu.com
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>fs: add file and path permissions helpers</title>
<updated>2021-01-24T13:27:16Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2021-01-21T13:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02f92b3868a1b34ab98464e76b0e4e060474ba10'/>
<id>urn:sha1:02f92b3868a1b34ab98464e76b0e4e060474ba10</id>
<content type='text'>
Add two simple helpers to check permissions on a file and path
respectively and convert over some callers. It simplifies quite a few
codepaths and also reduces the churn in later patches quite a bit.
Christoph also correctly points out that this makes codepaths (e.g.
ioctls) way easier to follow that would otherwise have to do more
complex argument passing than necessary.

Link: https://lore.kernel.org/r/20210121131959.646623-4-christian.brauner@ubuntu.com
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Suggested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: James Morris &lt;jamorris@linux.microsoft.com&gt;
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>udf: Remove pointless union in udf_inode_info</title>
<updated>2020-09-29T15:21:54Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2020-09-25T10:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=382a2287bf9cd283206764572f66ab12657218aa'/>
<id>urn:sha1:382a2287bf9cd283206764572f66ab12657218aa</id>
<content type='text'>
We use only a single member out of the i_ext union in udf_inode_info.
Just remove the pointless union.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: augment UDF permissions on new inodes</title>
<updated>2019-08-27T13:38:46Z</updated>
<author>
<name>Steven J. Magnani</name>
</author>
<published>2019-08-27T12:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3367a1b47d590f97109cd4b5189e750fb26c0f1'/>
<id>urn:sha1:c3367a1b47d590f97109cd4b5189e750fb26c0f1</id>
<content type='text'>
Windows presents files created within Linux as read-only, even when
permissions in Linux indicate the file should be writable.

UDF defines a slightly different set of basic file permissions than Linux.
Specifically, UDF has "delete" and "change attribute" permissions for each
access class (user/group/other). Linux has no equivalents for these.

When the Linux UDF driver creates a file (or directory), no UDF delete or
change attribute permissions are granted. The lack of delete permission
appears to cause Windows to mark an item read-only when its permissions
otherwise indicate that it should be read-write.

Fix this by having UDF delete permissions track Linux write permissions.
Also grant UDF change attribute permission to the owner when creating a
new inode.

Reported by: Ty Young
Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Link: https://lore.kernel.org/r/20190827121359.9954-1-steve@digidescorp.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Apply uid/gid mount options also to new inodes &amp; chown</title>
<updated>2018-02-27T09:25:33Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2018-02-21T16:59:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecd10aa42819cd5dcf639d25575e95a5bda8d08a'/>
<id>urn:sha1:ecd10aa42819cd5dcf639d25575e95a5bda8d08a</id>
<content type='text'>
Currently newly created files belong to current user despite
uid=&lt;number&gt; / gid=&lt;number&gt; mount options. This is confusing to users
(as owner of the file will change after remount / eviction from cache)
and also inconsistent with e.g. FAT with the same mount option. So apply
uid=&lt;number&gt; and gid=&lt;number&gt; also to newly created inodes and similarly
as FAT disallow to change owner of the file in this case.

Reported-by: Steve Kenton &lt;skenton@ou.edu&gt;
Reviewed-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Use i_size_read() in udf_adinicb_writepage()</title>
<updated>2017-06-14T09:21:01Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2017-06-13T14:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=146c4ad6ec034a1fbfbf90ba76cb69b6504c374a'/>
<id>urn:sha1:146c4ad6ec034a1fbfbf90ba76cb69b6504c374a</id>
<content type='text'>
We don't hold inode_lock in udf_adinicb_writepage() so use i_size_read()
to get i_size. This cannot cause real problems is i_size is guaranteed
to be small but let's be careful.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Fix races with i_size changes during readpage</title>
<updated>2017-06-14T09:21:01Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2017-06-13T13:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9795e0e8ac0d6a3ee092f1b555b284b57feef99e'/>
<id>urn:sha1:9795e0e8ac0d6a3ee092f1b555b284b57feef99e</id>
<content type='text'>
__udf_adinicb_readpage() uses i_size several times. When truncate
changes i_size while the function is running, it can observe several
different values and thus e.g. expose uninitialized parts of page to
userspace. Also use i_size_read() in the function since it does not hold
inode_lock. Since i_size is guaranteed to be small, this cannot really
cause any issues even on 32-bit archs but let's be careful.

CC: stable@vger.kernel.org
Fixes: 9c2fc0de1a6e638fe58c354a463f544f42a90a09
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: use kmap_atomic for memcpy copying</title>
<updated>2017-04-24T14:28:02Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2017-04-23T18:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c26eac43a0b708083ebd99e0ba57c9b268cef84'/>
<id>urn:sha1:5c26eac43a0b708083ebd99e0ba57c9b268cef84</id>
<content type='text'>
Use temporary mapping for memory copying operations.

To avoid any sleeping problem,

mark_inode_dirty(inode) was moved after kunmap() in
udf_adinicb_readpage()

down_write(&amp;iinfo-&gt;i_data_sem) set before kmap_atomic()
in udf_expand_file_adinicb()

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: simplify udf_ioctl()</title>
<updated>2017-02-03T15:24:18Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2017-01-24T20:48:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a074faad512605a5bb5f7862e796485e6df572d2'/>
<id>urn:sha1:a074faad512605a5bb5f7862e796485e6df572d2</id>
<content type='text'>
"out" label was only returning error code.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
