<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext2/xattr.c, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-23T09:14:26Z</updated>
<entry>
<title>ext2: fix datatype of block number in ext2_xattr_set2()</title>
<updated>2023-09-23T09:14:26Z</updated>
<author>
<name>Georg Ottinger</name>
</author>
<published>2023-08-15T10:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d92205a491512de6aaece933bdafe20f3e5a6c8'/>
<id>urn:sha1:0d92205a491512de6aaece933bdafe20f3e5a6c8</id>
<content type='text'>
[ Upstream commit e88076348425b7d0491c8c98d8732a7df8de7aa3 ]

I run a small server that uses external hard drives for backups. The
backup software I use uses ext2 filesystems with 4KiB block size and
the server is running SELinux and therefore relies on xattr. I recently
upgraded the hard drives from 4TB to 12TB models. I noticed that after
transferring some TBs I got a filesystem error "Freeing blocks not in
datazone - block = 18446744071529317386, count = 1" and the backup
process stopped. Trying to fix the fs with e2fsck resulted in a
completely corrupted fs. The error probably came from ext2_free_blocks(),
and because of the large number 18e19 this problem immediately looked
like some kind of integer overflow. Whereas the 4TB fs was about 1e9
blocks, the new 12TB is about 3e9 blocks. So, searching the ext2 code,
I came across the line in fs/ext2/xattr.c:745 where ext2_new_block()
is called and the resulting block number is stored in the variable block
as an int datatype. If a block with a block number greater than
INT32_MAX is returned, this variable overflows and the call to
sb_getblk() at line fs/ext2/xattr.c:750 fails, then the call to
ext2_free_blocks() produces the error.

Signed-off-by: Georg Ottinger &lt;g.ottinger@gmx.at&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20230815100340.22121-1-g.ottinger@gmx.at&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs</title>
<updated>2023-04-26T16:07:46Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2023-04-26T16:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94fc0792661a96d64a4bb79cf10d0793ecadf76e'/>
<id>urn:sha1:94fc0792661a96d64a4bb79cf10d0793ecadf76e</id>
<content type='text'>
Pull ext2, reiserfs, udf, and quota updates from Jan Kara:
 "A couple of small fixes and cleanups for ext2, udf, reiserfs, and
  quota.

  The biggest change is making CONFIG_PRINT_QUOTA_WARNING depend on
  BROKEN with an outlook for removing it completely in an year or so"

* tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  quota: mark PRINT_QUOTA_WARNING as BROKEN
  quota: update Kconfig comment
  reiserfs: remove unused iter variable
  quota: Use register_sysctl_init() for registering fs_dqstats_table
  reiserfs: remove unused sched_count variable
  ext2: remove redundant assignment to pointer end
  quota: make dquot_set_dqinfo return errors from -&gt;write_info
  quota: fixup *_write_file_info() to return proper error code
  quota: simplify two-level sysctl registration for fs_dqstats_table
  udf: use wrapper i_blocksize() in udf_discard_prealloc()
  udf: Use folios in udf_adinicb_writepage()
  ext2: Check block size validity during mount
  ext2: Correct maximum ext2 filesystem block size
</content>
</entry>
<entry>
<title>ext2: remove redundant assignment to pointer end</title>
<updated>2023-03-21T14:06:06Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2023-03-17T14:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fae0a2b2077c30f567b6b32c2467e7dda8e1d270'/>
<id>urn:sha1:fae0a2b2077c30f567b6b32c2467e7dda8e1d270</id>
<content type='text'>
Pointer is assigned a value that is never read, the assignment is
redundant and can be removed.

Cleans up clang-scan warning:
fs/ext2/xattr.c:555:3: warning: Value stored to 'end' is never read [deadcode.DeadStores]
                end = (char *)header + sb-&gt;s_blocksize;

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20230317143420.419005-1-colin.i.king@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs: rename generic posix acl handlers</title>
<updated>2023-03-06T08:57:13Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2023-02-01T13:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d549b741740e63e87e661754e2d1b336fdc51d50'/>
<id>urn:sha1:d549b741740e63e87e661754e2d1b336fdc51d50</id>
<content type='text'>
Reflect in their naming and document that they are kept around for
legacy reasons and shouldn't be used anymore by new code.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs: simplify -&gt;listxattr() implementation</title>
<updated>2023-03-06T08:57:12Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2023-02-01T13:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5488f29835c0eb5561b46e71c23f6c39aab6c83'/>
<id>urn:sha1:a5488f29835c0eb5561b46e71c23f6c39aab6c83</id>
<content type='text'>
The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to
check whether a given xattr can be listed. Simplify them and avoid
open-coding the same check by calling the helper we introduced earlier.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: linux-f2fs-devel@lists.sourceforge.net
Cc: linux-erofs@lists.ozlabs.org
Cc: linux-ext4@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs: drop unused posix acl handlers</title>
<updated>2023-03-06T08:57:12Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2023-02-01T13:14:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c95c025a02e477b2d112350e1c78bb0cc994c51'/>
<id>urn:sha1:0c95c025a02e477b2d112350e1c78bb0cc994c51</id>
<content type='text'>
Remove struct posix_acl_{access,default}_handler for all filesystems
that don't depend on the xattr handler in their inode-&gt;i_op-&gt;listxattr()
method in any way. There's nothing more to do than to simply remove the
handler. It's been effectively unused ever since we introduced the new
posix acl api.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>ext2: avoid deleting xattr block that is being reused</title>
<updated>2022-08-03T03:56:25Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-07-12T10:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1189d8ec5105f7628fb0e3a6988cbf0d0cbfedeb'/>
<id>urn:sha1:1189d8ec5105f7628fb0e3a6988cbf0d0cbfedeb</id>
<content type='text'>
Currently when we decide to reuse xattr block we detect the case when
the last reference to xattr block is being dropped at the same time and
cancel the reuse attempt. Convert ext2 to a new scheme when as soon as
matching mbcache entry is found, we wait with dropping the last xattr
block reference until mbcache entry reference is dropped (meaning either
the xattr block reference is increased or we decided not to reuse the
block).

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/r/20220712105436.32204-8-jack@suse.cz
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext2: unindent codeblock in ext2_xattr_set()</title>
<updated>2022-08-03T03:56:25Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-07-12T10:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b67798d55185ba4471f70b67b3f7c2866f216499'/>
<id>urn:sha1:b67798d55185ba4471f70b67b3f7c2866f216499</id>
<content type='text'>
Replace one else in ext2_xattr_set() with a goto. This makes following
code changes simpler to follow. No functional changes.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Link: https://lore.kernel.org/r/20220712105436.32204-7-jack@suse.cz
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext2: factor our freeing of xattr block reference</title>
<updated>2022-08-03T03:56:25Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-07-12T10:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90ae40d243d46f2268a5334fc8faa2dd67f875f5'/>
<id>urn:sha1:90ae40d243d46f2268a5334fc8faa2dd67f875f5</id>
<content type='text'>
Free of xattr block reference is opencode in two places. Factor it out
into a separate function and use it.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/r/20220712105436.32204-6-jack@suse.cz
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext2: initialize quota info in ext2_xattr_set()</title>
<updated>2020-07-09T06:14:01Z</updated>
<author>
<name>Chengguang Xu</name>
</author>
<published>2020-06-26T05:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1197d04fd3f1daf75cfd0a68442080186e546178'/>
<id>urn:sha1:1197d04fd3f1daf75cfd0a68442080186e546178</id>
<content type='text'>
In order to correctly account/limit space usage, should initialize
quota info before calling quota related functions.

Link: https://lore.kernel.org/r/20200626054959.114177-1-cgxu519@mykernel.net
Signed-off-by: Chengguang Xu &lt;cgxu519@mykernel.net&gt;
Reviewed-by: Reviewed-by: Ritesh Harjani &lt;riteshh@linux.ibm.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
