<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/exfat/super.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-14T09:55:46Z</updated>
<entry>
<title>exfat: fix use of uninitialized spinlock on error path</title>
<updated>2020-10-14T09:55:46Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2020-09-29T00:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82dfd230b0c08299a9e28ab2777a488ebc9f1bd3'/>
<id>urn:sha1:82dfd230b0c08299a9e28ab2777a488ebc9f1bd3</id>
<content type='text'>
commit 8ff006e57ad3a25f909c456d053aa498b6673a39 upstream.

syzbot reported warning message:

Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d6/0x29e lib/dump_stack.c:118
 register_lock_class+0xf06/0x1520 kernel/locking/lockdep.c:893
 __lock_acquire+0xfd/0x2ae0 kernel/locking/lockdep.c:4320
 lock_acquire+0x148/0x720 kernel/locking/lockdep.c:5029
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151
 spin_lock include/linux/spinlock.h:354 [inline]
 exfat_cache_inval_inode+0x30/0x280 fs/exfat/cache.c:226
 exfat_evict_inode+0x124/0x270 fs/exfat/inode.c:660
 evict+0x2bb/0x6d0 fs/inode.c:576
 exfat_fill_super+0x1e07/0x27d0 fs/exfat/super.c:681
 get_tree_bdev+0x3e9/0x5f0 fs/super.c:1342
 vfs_get_tree+0x88/0x270 fs/super.c:1547
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x179d/0x29e0 fs/namespace.c:3192
 do_mount fs/namespace.c:3205 [inline]
 __do_sys_mount fs/namespace.c:3413 [inline]
 __se_sys_mount+0x126/0x180 fs/namespace.c:3390
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

If exfat_read_root() returns an error, spinlock is used in
exfat_evict_inode() without initialization. This patch combines
exfat_cache_init_inode() with exfat_inode_init_once() to initialize
spinlock by slab constructor.

Fixes: c35b6810c495 ("exfat: add exfat cache")
Cc: stable@vger.kernel.org # v5.7+
Reported-by: syzbot &lt;syzbot+b91107320911a26c9a95@syzkaller.appspotmail.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>exfat: call sync_filesystem for read-only remount</title>
<updated>2020-06-29T08:11:08Z</updated>
<author>
<name>Hyunchul Lee</name>
</author>
<published>2020-06-16T05:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0271a15cf2cf907ea5b0f2ba611123f1b7935ec'/>
<id>urn:sha1:a0271a15cf2cf907ea5b0f2ba611123f1b7935ec</id>
<content type='text'>
We need to commit dirty metadata and pages to disk
before remounting exfat as read-only.

This fixes a failure in xfstests generic/452

generic/452 does the following:
cp something &lt;exfat&gt;/
mount -o remount,ro &lt;exfat&gt;

the &lt;exfat&gt;/something is corrupted. because while
exfat is remounted as read-only, exfat doesn't
have a chance to commit metadata and
vfs invalidates page caches in a block device.

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Acked-by: Sungjong Seo &lt;sj1557.seo@samsung.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: fix memory leak in exfat_parse_param()</title>
<updated>2020-06-09T07:50:02Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2020-06-03T00:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f341a7d8dcc4e3d01544d7bc145633f062ef6249'/>
<id>urn:sha1:f341a7d8dcc4e3d01544d7bc145633f062ef6249</id>
<content type='text'>
butt3rflyh4ck reported memory leak found by syzkaller.

A param-&gt;string held by exfat_mount_options.

BUG: memory leak

unreferenced object 0xffff88801972e090 (size 8):
  comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s)
  hex dump (first 8 bytes):
    6b 6f 69 38 2d 75 00 00                          koi8-u..
  backtrace:
    [&lt;000000005bfe35d6&gt;] kstrdup+0x36/0x70 mm/util.c:60
    [&lt;0000000018ed3277&gt;] exfat_parse_param+0x160/0x5e0
fs/exfat/super.c:276
    [&lt;000000007680462b&gt;] vfs_parse_fs_param+0x2b4/0x610
fs/fs_context.c:147
    [&lt;0000000097c027f2&gt;] vfs_parse_fs_string+0xe6/0x150
fs/fs_context.c:191
    [&lt;00000000371bf78f&gt;] generic_parse_monolithic+0x16f/0x1f0
fs/fs_context.c:231
    [&lt;000000005ce5eb1b&gt;] do_new_mount fs/namespace.c:2812 [inline]
    [&lt;000000005ce5eb1b&gt;] do_mount+0x12bb/0x1b30 fs/namespace.c:3141
    [&lt;00000000b642040c&gt;] __do_sys_mount fs/namespace.c:3350 [inline]
    [&lt;00000000b642040c&gt;] __se_sys_mount fs/namespace.c:3327 [inline]
    [&lt;00000000b642040c&gt;] __x64_sys_mount+0x18f/0x230 fs/namespace.c:3327
    [&lt;000000003b024e98&gt;] do_syscall_64+0xf6/0x7d0
arch/x86/entry/common.c:295
    [&lt;00000000ce2b698c&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xb3

exfat_free() should call exfat_free_iocharset(), to prevent a leak
in case we fail after parsing iocharset= but before calling
get_tree_bdev().

Additionally, there's no point copying param-&gt;string in
exfat_parse_param() - just steal it, leaving NULL in param-&gt;string.
That's independent from the leak or fix thereof - it's simply
avoiding an extra copy.

Fixes: 719c1e182916 ("exfat: add super block operations")
Cc: stable@vger.kernel.org # v5.7
Reported-by: butt3rflyh4ck &lt;butterflyhuangxx@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: add boot region verification</title>
<updated>2020-06-09T07:49:19Z</updated>
<author>
<name>Tetsuhiro Kohada</name>
</author>
<published>2020-05-31T09:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=476189c0ef3b658de3f6b89fd0fdeb6dc451b564'/>
<id>urn:sha1:476189c0ef3b658de3f6b89fd0fdeb6dc451b564</id>
<content type='text'>
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.

Signed-off-by: Tetsuhiro Kohada &lt;kohada.t2@gmail.com&gt;
Reviewed-by: Sungjong Seo &lt;sj1557.seo@samsung.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: separate the boot sector analysis</title>
<updated>2020-06-09T07:49:14Z</updated>
<author>
<name>Tetsuhiro Kohada</name>
</author>
<published>2020-05-29T10:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33404a159828a97fefada0d8f4cf910873b8e9f1'/>
<id>urn:sha1:33404a159828a97fefada0d8f4cf910873b8e9f1</id>
<content type='text'>
Separate the boot sector analysis to read_boot_sector().
And add a check for the fs_name field.
Furthermore, add a strict consistency check, because overlapping areas
can cause serious corruption.

Signed-off-by: Tetsuhiro Kohada &lt;kohada.t2@gmail.com&gt;
Reviewed-by: Sungjong Seo &lt;sj1557.seo@samsung.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: redefine PBR as boot_sector</title>
<updated>2020-06-09T07:49:10Z</updated>
<author>
<name>Tetsuhiro Kohada</name>
</author>
<published>2020-05-29T10:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=181a9e8009a8a8bdb19c2e24eeeae7d8e77c8c47'/>
<id>urn:sha1:181a9e8009a8a8bdb19c2e24eeeae7d8e77c8c47</id>
<content type='text'>
Aggregate PBR related definitions and redefine as "boot_sector" to comply
with the exFAT specification.
And, rename variable names including 'pbr'.

Signed-off-by: Tetsuhiro Kohada &lt;kohada.t2@gmail.com&gt;
Reviewed-by: Sungjong Seo &lt;sj1557.seo@samsung.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: remove the assignment of 0 to bool variable</title>
<updated>2020-06-09T07:48:53Z</updated>
<author>
<name>Jason Yan</name>
</author>
<published>2020-04-16T04:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cdc06129a6cea0e4863fa2b34a0c132c6eb7278b'/>
<id>urn:sha1:cdc06129a6cea0e4863fa2b34a0c132c6eb7278b</id>
<content type='text'>
There is no need to init 'sync' in exfat_set_vol_flags().
This also fixes the following coccicheck warning:

fs/exfat/super.c:104:6-10: WARNING: Assignment of 0/1 to bool variable

Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: Use a more common logging style</title>
<updated>2020-06-09T07:48:34Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2020-04-24T04:31:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1727d55c0327efdba2a5bad7801d509b721fef3'/>
<id>urn:sha1:d1727d55c0327efdba2a5bad7801d509b721fef3</id>
<content type='text'>
Remove the direct use of KERN_&lt;LEVEL&gt; in functions by creating
separate exfat_&lt;level&gt; macros.

Miscellanea:

o Remove several unnecessary terminating newlines in formats
o Realign arguments and fit to 80 columns where appropriate

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>exfat: add the dummy mount options to be backward compatible with staging/exfat</title>
<updated>2020-05-21T23:40:11Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2020-05-21T23:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=907fa893258ba6076f5fff32900a461decb9e8c5'/>
<id>urn:sha1:907fa893258ba6076f5fff32900a461decb9e8c5</id>
<content type='text'>
As Ubuntu and Fedora release new version used kernel version equal to or
higher than v5.4, They started to support kernel exfat filesystem.

Linus reported a mount error with new version of exfat on Fedora:

        exfat: Unknown parameter 'namecase'

This is because there is a difference in mount option between old
staging/exfat and new exfat.  And utf8, debug, and codepage options as
well as namecase have been removed from new exfat.

This patch add the dummy mount options as deprecated option to be
backward compatible with old one.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Eric Sandeen &lt;sandeen@sandeen.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>exfat: truncate atimes to 2s granularity</title>
<updated>2020-04-22T11:14:06Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2020-04-21T02:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81df1ad40644b706a1cdbd28a1471f9f0c0ea3e8'/>
<id>urn:sha1:81df1ad40644b706a1cdbd28a1471f9f0c0ea3e8</id>
<content type='text'>
The timestamp for access_time has double seconds granularity(There is no
10msIncrement field for access_time unlike create/modify_time).
exfat's atimes are restricted to only 2s granularity so after
we set an atime, round it down to the nearest 2s and set the
sub-second component of the timestamp to 0.

Signed-off-by: Eric Sandeen &lt;sandeen@sandeen.net&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
</feed>
