<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/overlayfs/export.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-10-30T22:12:57Z</updated>
<entry>
<title>ovl: reorder ovl_want_write() after ovl_inode_lock()</title>
<updated>2023-10-30T22:12:57Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-07-20T09:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=162d06444070c12827d604a2cb6b6bd98d48cbb0'/>
<id>urn:sha1:162d06444070c12827d604a2cb6b6bd98d48cbb0</id>
<content type='text'>
Make the locking order of ovl_inode_lock() strictly between the two
vfs stacked layers, i.e.:
- ovl vfs locks: sb_writers, inode_lock, ...
- ovl_inode_lock
- upper vfs locks: sb_writers, inode_lock, ...

To that effect, move ovl_want_write() into the helpers ovl_nlink_start()
and ovl_copy_up_start which currently take the ovl_inode_lock() after
ovl_want_write().

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: fix NULL pointer defer when encoding non-decodable lower fid</title>
<updated>2023-10-03T06:24:11Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-10-03T06:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7242a45cb8cad5b6cd840fd4661315b45b1e841'/>
<id>urn:sha1:c7242a45cb8cad5b6cd840fd4661315b45b1e841</id>
<content type='text'>
A wrong return value from ovl_check_encode_origin() would cause
ovl_dentry_to_fid() to try to encode fid from NULL upper dentry.

Reported-by: syzbot+2208f82282740c1c8915@syzkaller.appspotmail.com
Fixes: 16aac5ad1fa9 ("ovl: support encoding non-decodable file handles")
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: make consistent use of OVL_FS()</title>
<updated>2023-08-12T16:02:54Z</updated>
<author>
<name>Andrea Righi</name>
</author>
<published>2023-05-21T08:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f01d08899fd7fa808ff9b8d33ca4882ab44d42fa'/>
<id>urn:sha1:f01d08899fd7fa808ff9b8d33ca4882ab44d42fa</id>
<content type='text'>
Always use OVL_FS() to retrieve the corresponding struct ovl_fs from a
struct super_block.

Reviewed-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Andrea Righi &lt;andrea.righi@canonical.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: support encoding non-decodable file handles</title>
<updated>2023-08-12T16:02:47Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-23T16:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16aac5ad1fa94894b798dd522c5c3a6a0628d7f0'/>
<id>urn:sha1:16aac5ad1fa94894b798dd522c5c3a6a0628d7f0</id>
<content type='text'>
When all layers support file handles, we support encoding non-decodable
file handles (a.k.a. fid) even with nfs_export=off.

When file handles do not need to be decoded, we do not need to copy up
redirected lower directories on encode, and we encode also non-indexed
upper with lower file handle, so fid will not change on copy up.

This enables reporting fanotify events with file handles on overlayfs
with default config/mount options.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: deduplicate lowerpath and lowerstack[]</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-01T07:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac900ed4f253434e099a025fc1da3d04bc741bd3'/>
<id>urn:sha1:ac900ed4f253434e099a025fc1da3d04bc741bd3</id>
<content type='text'>
The ovl_inode contains a copy of lowerpath in lowerstack[0], so the
lowerpath member can be removed.

Use accessor ovl_lowerpath() to get the lowerpath whereever the member
was accessed directly.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: move ovl_entry into ovl_inode</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-08T09:31:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0af950f57fefabab628f1963af881e6b9bfe7f38'/>
<id>urn:sha1:0af950f57fefabab628f1963af881e6b9bfe7f38</id>
<content type='text'>
The lower stacks of all the ovl inode aliases should be identical
and there is redundant information in ovl_entry and ovl_inode.

Move lowerstack into ovl_inode and keep only the OVL_E_FLAGS
per overlay dentry.

Following patches will deduplicate redundant ovl_inode fields.

Note that for pure upper and negative dentries, OVL_E(dentry) may be
NULL now, so it is imporatnt to use the ovl_numlower() accessor.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: use ovl_numlower() and ovl_lowerstack() accessors</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-03T08:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5522c9c7cbd2ab4e886fa1c70896f0bdd483ce0b'/>
<id>urn:sha1:5522c9c7cbd2ab4e886fa1c70896f0bdd483ce0b</id>
<content type='text'>
This helps fortify against dereferencing a NULL ovl_entry,
before we move the ovl_entry reference into ovl_inode.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: use OVL_E() and OVL_E_FLAGS() accessors</title>
<updated>2023-06-19T11:01:12Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-03-15T02:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6ff2bc0be179eea72832b5396481a08ccd22d5a'/>
<id>urn:sha1:a6ff2bc0be179eea72832b5396481a08ccd22d5a</id>
<content type='text'>
Instead of open coded instances, because we are about to split
the two apart.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: update of dentry revalidate flags after copy up</title>
<updated>2023-06-19T11:01:12Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-03T08:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b07d5cc93e1b28df47a72c519d09d0a836043613'/>
<id>urn:sha1:b07d5cc93e1b28df47a72c519d09d0a836043613</id>
<content type='text'>
After copy up, we may need to update d_flags if upper dentry is on a
remote fs and lower dentries are not.

Add helpers to allow incremental update of the revalidate flags.

Fixes: bccece1ead36 ("ovl: allow remote upper")
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: port -&gt;permission() to pass mnt_idmap</title>
<updated>2023-01-19T08:24:28Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2023-01-13T11:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4609e1f18e19c3b302e1eb4858334bca1532f780'/>
<id>urn:sha1:4609e1f18e19c3b302e1eb4858334bca1532f780</id>
<content type='text'>
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
