<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/affs, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-02-06T06:49:38Z</updated>
<entry>
<title>affs: initialize fsdata in affs_truncate()</title>
<updated>2023-02-06T06:49:38Z</updated>
<author>
<name>Alexander Potapenko</name>
</author>
<published>2023-01-10T12:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a89bb9bc739eef64dd56a997d34fd919024c0feb'/>
<id>urn:sha1:a89bb9bc739eef64dd56a997d34fd919024c0feb</id>
<content type='text'>
[ Upstream commit eef034ac6690118c88f357b00e2b3239c9d8575d ]

When aops-&gt;write_begin() does not initialize fsdata, KMSAN may report
an error passing the latter to aops-&gt;write_end().

Fix this by unconditionally initializing fsdata.

Fixes: f2b6a16eb8f5 ("fs: affs convert to new aops")
Suggested-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Signed-off-by: Alexander Potapenko &lt;glider@google.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/affs: release old buffer head on error path</title>
<updated>2021-03-04T08:39:55Z</updated>
<author>
<name>Pan Bian</name>
</author>
<published>2021-01-20T08:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce02ed6c4987105c6978a659e08bcf2663b6d7b3'/>
<id>urn:sha1:ce02ed6c4987105c6978a659e08bcf2663b6d7b3</id>
<content type='text'>
commit 70779b897395b330ba5a47bed84f94178da599f9 upstream.

The reference count of the old buffer head should be decremented on path
that fails to get the new buffer head.

Fixes: 6b4657667ba0 ("fs/affs: add rename exchange")
CC: stable@vger.kernel.org # 4.14+
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>affs: fix basic permission bits to actually work</title>
<updated>2020-09-09T17:04:30Z</updated>
<author>
<name>Max Staudt</name>
</author>
<published>2020-08-27T15:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0a689f84d53a8b923302cfab10527ada27d962c'/>
<id>urn:sha1:b0a689f84d53a8b923302cfab10527ada27d962c</id>
<content type='text'>
commit d3a84a8d0dde4e26bc084b36ffcbdc5932ac85e2 upstream.

The basic permission bits (protection bits in AmigaOS) have been broken
in Linux' AFFS - it would only set bits, but never delete them.
Also, contrary to the documentation, the Archived bit was not handled.

Let's fix this for good, and set the bits such that Linux and classic
AmigaOS can coexist in the most peaceful manner.

Also, update the documentation to represent the current state of things.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Max Staudt &lt;max@enpas.org&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>affs: fix a memory leak in affs_remount</title>
<updated>2020-01-27T13:51:21Z</updated>
<author>
<name>Navid Emamdoost</name>
</author>
<published>2019-10-02T21:52:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c96c5435144b681f489a7c3cd0a75e27e2870a32'/>
<id>urn:sha1:c96c5435144b681f489a7c3cd0a75e27e2870a32</id>
<content type='text'>
[ Upstream commit 450c3d4166837c496ebce03650c08800991f2150 ]

In affs_remount if data is provided it is duplicated into new_opts.  The
allocated memory for new_opts is only released if parse_options fails.

There's a bit of history behind new_options, originally there was
save/replace options on the VFS layer so the 'data' passed must not
change (thus strdup), this got cleaned up in later patches. But not
completely.

There's no reason to do the strdup in cases where the filesystem does
not need to reuse the 'data' again, because strsep would modify it
directly.

Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling")
Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
[ update changelog ]
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>affs: fix potential memory leak when parsing option 'prefix'</title>
<updated>2018-05-28T10:36:41Z</updated>
<author>
<name>Chengguang Xu</name>
</author>
<published>2018-05-22T04:24:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84ae6f829fc2b23dd4985ab059cddfd4a1ccc14f'/>
<id>urn:sha1:84ae6f829fc2b23dd4985ab059cddfd4a1ccc14f</id>
<content type='text'>
When specifying option 'prefix' multiple times, current option parsing
will cause memory leak.  Hence, call kfree for previous one in this
case.

Signed-off-by: Chengguang Xu &lt;cgxu519@gmx.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>affs_lookup: switch to d_splice_alias()</title>
<updated>2018-05-21T18:29:12Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2018-05-06T16:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87fbd639c02ec96d67738e40b6521fb070ed7168'/>
<id>urn:sha1:87fbd639c02ec96d67738e40b6521fb070ed7168</id>
<content type='text'>
Making something exportable takes more than providing -&gt;s_export_ops.
In particular, -&gt;lookup() *MUST* use d_splice_alias() instead of
d_add().

Reading Documentation/filesystems/nfs/Exporting would've been a good idea;
as it is, exporting AFFS is badly (and exploitably) broken.

Partially-Fixes: ed4433d72394 "fs/affs: make affs exportable"
Acked-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>affs_lookup(): close a race with affs_remove_link()</title>
<updated>2018-05-21T18:27:45Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2018-05-06T16:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30da870ce4a4e007c901858a96e9e394a1daa74a'/>
<id>urn:sha1:30da870ce4a4e007c901858a96e9e394a1daa74a</id>
<content type='text'>
we unlock the directory hash too early - if we are looking at secondary
link and primary (in another directory) gets removed just as we unlock,
we could have the old primary moved in place of the secondary, leaving
us to look into freed entry (and leaving our dentry with -&gt;d_fsdata
pointing to a freed entry).

Cc: stable@vger.kernel.org # 2.4.4+
Acked-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>iversion: Rename make inode_cmp_iversion{+raw} to inode_eq_iversion{+raw}</title>
<updated>2018-02-01T13:15:25Z</updated>
<author>
<name>Goffredo Baroncelli</name>
</author>
<published>2018-02-01T13:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c472c07bfed9c87d7e0b2c052d7e77fedd7109a9'/>
<id>urn:sha1:c472c07bfed9c87d7e0b2c052d7e77fedd7109a9</id>
<content type='text'>
The function inode_cmp_iversion{+raw} is counter-intuitive, because it
returns true when the counters are different and false when these are equal.

Rename it to inode_eq_iversion{+raw}, which will returns true when
the counters are equal and false otherwise.

Signed-off-by: Goffredo Baroncelli &lt;kreijack@inwind.it&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
</entry>
<entry>
<title>affs: convert to new i_version API</title>
<updated>2018-01-29T11:42:20Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2017-12-11T11:35:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9dffe569d942a57cfd27ee961f8fb6facc6ba86a'/>
<id>urn:sha1:9dffe569d942a57cfd27ee961f8fb6facc6ba86a</id>
<content type='text'>
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
</entry>
<entry>
<title>Rename superblock flags (MS_xyz -&gt; SB_xyz)</title>
<updated>2017-11-27T21:05:09Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-11-27T21:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e'/>
<id>urn:sha1:1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e</id>
<content type='text'>
This is a pure automated search-and-replace of the internal kernel
superblock flags.

The s_flags are now called SB_*, with the names and the values for the
moment mirroring the MS_* flags that they're equivalent to.

Note how the MS_xyz flags are the ones passed to the mount system call,
while the SB_xyz flags are what we then use in sb-&gt;s_flags.

The script to do this was:

    # places to look in; re security/*: it generally should *not* be
    # touched (that stuff parses mount(2) arguments directly), but
    # there are two places where we really deal with superblock flags.
    FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
            include/linux/fs.h include/uapi/linux/bfs_fs.h \
            security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
    # the list of MS_... constants
    SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
          DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
          POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
          I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
          ACTIVE NOUSER"

    SED_PROG=
    for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done

    # we want files that contain at least one of MS_...,
    # with fs/namespace.c and fs/pnode.c excluded.
    L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')

    for f in $L; do sed -i $f $SED_PROG; done

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
