<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/overlayfs/super.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-09-26T06:39:30Z</updated>
<entry>
<title>ovl: fix oopses in ovl_fill_super() failure paths</title>
<updated>2018-09-26T06:39:30Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2018-09-10T09:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4585b79971f781196df447a4f256b37047e1bedc'/>
<id>urn:sha1:4585b79971f781196df447a4f256b37047e1bedc</id>
<content type='text'>
commit 8c25741aaad8be6fbe51510e917c740e0059cf83 upstream.

ovl_free_fs() dereferences ofs-&gt;workbasedir and ofs-&gt;upper_mnt in cases when
those might not have been initialized yet.

Fix the initialization order for these fields.

Reported-by: syzbot+c75f181dc8429d2eb887@syzkaller.appspotmail.com
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Cc:  &lt;stable@vger.kernel.org&gt; # v4.15
Fixes: 95e6d4177cb7 ("ovl: grab reference to workbasedir early")
Fixes: a9075cdb467d ("ovl: factor out ovl_free_fs() helper")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ovl: return dentry from ovl_create_real()</title>
<updated>2018-05-31T09:06:11Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2018-05-16T14:51:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95a1c8153ad8bc99e7c4b90257f20b4f0474a9a0'/>
<id>urn:sha1:95a1c8153ad8bc99e7c4b90257f20b4f0474a9a0</id>
<content type='text'>
Al Viro suggested to simplify callers of ovl_create_real() by
returning the created dentry (or ERR_PTR) from ovl_create_real().

Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: struct cattr cleanups</title>
<updated>2018-05-31T09:06:10Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-05-16T14:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=471ec5dcf4e712ea81bf431a57c98d4b67416d30'/>
<id>urn:sha1:471ec5dcf4e712ea81bf431a57c98d4b67416d30</id>
<content type='text'>
* Rename to ovl_cattr

* Fold ovl_create_real() hardlink argument into struct ovl_cattr

* Create macro OVL_CATTR() to initialize struct ovl_cattr from mode

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: strip debug argument from ovl_do_ helpers</title>
<updated>2018-05-31T09:06:10Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-05-16T14:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cf00764b0082cefdaf5a36202aceb1ab2470051'/>
<id>urn:sha1:6cf00764b0082cefdaf5a36202aceb1ab2470051</id>
<content type='text'>
It did not prove to be useful.

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: add support for "xino" mount and config options</title>
<updated>2018-04-12T10:04:50Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-03-29T06:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=795939a93e600587e52c34fe02402b27ddda6017'/>
<id>urn:sha1:795939a93e600587e52c34fe02402b27ddda6017</id>
<content type='text'>
With mount option "xino=on", mounter declares that there are enough
free high bits in underlying fs to hold the layer fsid.
If overlayfs does encounter underlying inodes using the high xino
bits reserved for layer fsid, a warning will be emitted and the original
inode number will be used.

The mount option name "xino" goes after a similar meaning mount option
of aufs, but in overlayfs case, the mapping is stateless.

An example for a use case of "xino=on" is when upper/lower is on an xfs
filesystem. xfs uses 64bit inode numbers, but it currently never uses the
upper 8bit for inode numbers exposed via stat(2) and that is not likely to
change in the future without user opting-in for a new xfs feature. The
actual number of unused upper bit is much larger and determined by the xfs
filesystem geometry (64 - agno_log - agblklog - inopblog). That means
that for all practical purpose, there are enough unused bits in xfs
inode numbers for more than OVL_MAX_STACK unique fsid's.

Another use case of "xino=on" is when upper/lower is on tmpfs. tmpfs inode
numbers are allocated sequentially since boot, so they will practially
never use the high inode number bits.

For compatibility with applications that expect 32bit inodes, the feature
can be disabled with "xino=off". The option "xino=auto" automatically
detects underlying filesystem that use 32bit inodes and enables the
feature. The Kconfig option OVERLAY_FS_XINO_AUTO and module parameter of
the same name, determine if the default mode for overlayfs mount is
"xino=auto" or "xino=off".

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: constant st_ino for non-samefs with xino</title>
<updated>2018-04-12T10:04:50Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-11-07T11:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e487d889b7e3e8ec4091eb83bc4f7e67c7f05e27'/>
<id>urn:sha1:e487d889b7e3e8ec4091eb83bc4f7e67c7f05e27</id>
<content type='text'>
On 64bit systems, when overlay layers are not all on the same fs, but
all inode numbers of underlying fs are not using the high bits, use the
high bits to partition the overlay st_ino address space.  The high bits
hold the fsid (upper fsid is 0).  This way overlay inode numbers are unique
and all inodes use overlay st_dev.  Inode numbers are also persistent
for a given layer configuration.

Currently, our only indication for available high ino bits is from a
filesystem that supports file handles and uses the default encode_fh()
operation, which encodes a 32bit inode number.

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: allocate anon bdev per unique lower fs</title>
<updated>2018-04-12T10:04:50Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-03-28T17:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5148626b806a74dd219f2bce5f204abf909f6930'/>
<id>urn:sha1:5148626b806a74dd219f2bce5f204abf909f6930</id>
<content type='text'>
Instead of allocating an anonymous bdev per lower layer, allocate
one anonymous bdev per every unique lower fs that is different than
upper fs.

Every unique lower fs is assigned an fsid &gt; 0 and the number of
unique lower fs are stored in ofs-&gt;numlowerfs.

The assigned fsid is stored in the lower layer struct and will be
used also for inode number multiplexing.

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: check lower ancestry on encode of lower dir file handle</title>
<updated>2018-02-16T14:53:20Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-01-30T11:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ca3c148a06244d46dcfc95c5965644c83a30b37'/>
<id>urn:sha1:2ca3c148a06244d46dcfc95c5965644c83a30b37</id>
<content type='text'>
This change relaxes copy up on encode of merge dir with lower layer &gt; 1
and handles the case of encoding a merge dir with lower layer 1, where an
ancestor is a non-indexed merge dir. In that case, decode of the lower
file handle will not have been possible if the non-indexed ancestor is
redirected before or after encode.

Before encoding a non-upper directory file handle from real layer N, we
need to check if it will be possible to reconnect an overlay dentry from
the real lower decoded dentry. This is done by following the overlay
ancestry up to a "layer N connected" ancestor and verifying that all
parents along the way are "layer N connectable". If an ancestor that is
NOT "layer N connectable" is found, we need to copy up an ancestor, which
is "layer N connectable", thus making that ancestor "layer N connected".
For example:

 layer 1: /a
 layer 2: /a/b/c

The overlay dentry /a is NOT "layer 2 connectable", because if dir /a is
copied up and renamed, upper dir /a will be indexed by lower dir /a from
layer 1. The dir /a from layer 2 will never be indexed, so the algorithm
in ovl_lookup_real_ancestor() (*) will not be able to lookup a connected
overlay dentry from the connected lower dentry /a/b/c.

To avoid this problem on decode time, we need to copy up an ancestor of
/a/b/c, which is "layer 2 connectable", on encode time. That ancestor is
/a/b. After copy up (and index) of /a/b, it will become "layer 2 connected"
and when the time comes to decode the file handle from lower dentry /a/b/c,
ovl_lookup_real_ancestor() will find the indexed ancestor /a/b and decoding
a connected overlay dentry will be accomplished.

(*) the algorithm in ovl_lookup_real_ancestor() can be improved to lookup
an entry /a in the lower layers above layer N and find the indexed dir /a
from layer 1. If that improvement is made, then the check for "layer N
connected" will need to verify there are no redirects in lower layers above
layer N. In the example above, /a will be "layer 2 connectable". However,
if layer 2 dir /a is a target of a layer 1 redirect, then /a will NOT be
"layer 2 connectable":

 layer 1: /A (redirect = /a)
 layer 2: /a/b/c

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: wire up NFS export operations</title>
<updated>2018-01-24T10:26:06Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-10-02T08:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8383f1748829e1a6a07988863ed13a47fb653387'/>
<id>urn:sha1:8383f1748829e1a6a07988863ed13a47fb653387</id>
<content type='text'>
Now that NFS export operations are implemented, enable overlayfs NFS
export support if the "nfs_export" feature is enabled.

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: store 'has_upper' and 'opaque' as bit flags</title>
<updated>2018-01-24T10:25:58Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2018-01-14T17:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c62520a83bceae0bb0b7b3de10c3e81205cd3823'/>
<id>urn:sha1:c62520a83bceae0bb0b7b3de10c3e81205cd3823</id>
<content type='text'>
We need to make some room in struct ovl_entry to store information
about redirected ancestors for NFS export, so cram two booleans as
bit flags.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
</feed>
