<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ntfs3, branch v6.8</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>fs/ntfs3: fix build without CONFIG_NTFS3_LZX_XPRESS</title>
<updated>2024-02-26T17:32:23+00:00</updated>
<author>
<name>Mark O'Donovan</name>
<email>shiftee@posteo.net</email>
</author>
<published>2024-02-21T10:43:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c8e314624a1666ed2eec28549713021a8ec801e9'/>
<id>c8e314624a1666ed2eec28549713021a8ec801e9</id>
<content type='text'>
When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following build
error:

  fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

Signed-off-by: Mark O'Donovan &lt;shiftee@posteo.net&gt;
Fixes: 4fd6c08a16d7 ("fs/ntfs3: Use i_size_read and i_size_write")
Tested-by: Chris Clayton &lt;chris2553@googlemail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following build
error:

  fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

Signed-off-by: Mark O'Donovan &lt;shiftee@posteo.net&gt;
Fixes: 4fd6c08a16d7 ("fs/ntfs3: Use i_size_read and i_size_write")
Tested-by: Chris Clayton &lt;chris2553@googlemail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Slightly simplify ntfs_inode_printk()</title>
<updated>2024-01-29T09:05:09+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-11-10T19:59:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=622cd3daa8eae37359a6fd3c07c36d19f66606b5'/>
<id>622cd3daa8eae37359a6fd3c07c36d19f66606b5</id>
<content type='text'>
The size passed to snprintf() includes the space for the trailing space.
So there is no reason here not to use all the available space.

So remove the -1 when computing 'name_len'.
While at it, use the size of the array directly instead of the intermediate
'name_len' variable.

snprintf() also guaranties that the buffer if NULL terminated, so there is
no need to write an additional trailing NULL "To be sure".

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size passed to snprintf() includes the space for the trailing space.
So there is no reason here not to use all the available space.

So remove the -1 when computing 'name_len'.
While at it, use the size of the array directly instead of the intermediate
'name_len' variable.

snprintf() also guaranties that the buffer if NULL terminated, so there is
no need to write an additional trailing NULL "To be sure".

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Add ioctl operation for directories (FITRIM)</title>
<updated>2024-01-29T09:05:09+00:00</updated>
<author>
<name>Nekun</name>
<email>nekokun@firemail.cc</email>
</author>
<published>2023-10-30T08:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1f5fa4b3b85ceb43f1053290f0ade037b50e6297'/>
<id>1f5fa4b3b85ceb43f1053290f0ade037b50e6297</id>
<content type='text'>
While ntfs3 supports discards, FITRIM ioctl() command has defined
only for regular files. This may confuse users trying to invoke
`fstrim` utility with the directory argument (for example, call
`fstrim &lt;mountpoint&gt;` which is the common practice). In this case,
ioctl() returns -ENOTTY without any error messages in kernel ring
buffer, this may be easily interpreted as no support for discards
in ntfs3 driver.

Currently only FITRIM command implemented in ntfs_ioctl() and
passed inode used only for dereferencing NTFS superblock, so
no need for separate ioctl() handler for directories, just add
existing ntfs_ioctl() handler to ntfs_dir_operations.

Signed-off-by: Nekun &lt;nekokun@firemail.cc&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While ntfs3 supports discards, FITRIM ioctl() command has defined
only for regular files. This may confuse users trying to invoke
`fstrim` utility with the directory argument (for example, call
`fstrim &lt;mountpoint&gt;` which is the common practice). In this case,
ioctl() returns -ENOTTY without any error messages in kernel ring
buffer, this may be easily interpreted as no support for discards
in ntfs3 driver.

Currently only FITRIM command implemented in ntfs_ioctl() and
passed inode used only for dereferencing NTFS superblock, so
no need for separate ioctl() handler for directories, just add
existing ntfs_ioctl() handler to ntfs_dir_operations.

Signed-off-by: Nekun &lt;nekokun@firemail.cc&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Fix oob in ntfs_listxattr</title>
<updated>2024-01-29T09:05:08+00:00</updated>
<author>
<name>Edward Adam Davis</name>
<email>eadavis@qq.com</email>
</author>
<published>2023-12-30T09:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=731ab1f9828800df871c5a7ab9ffe965317d3f15'/>
<id>731ab1f9828800df871c5a7ab9ffe965317d3f15</id>
<content type='text'>
The length of name cannot exceed the space occupied by ea.

Reported-and-tested-by: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The length of name cannot exceed the space occupied by ea.

Reported-and-tested-by: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Fix an NULL dereference bug</title>
<updated>2024-01-29T09:05:08+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2023-10-17T14:04:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b2dd7b953c25ffd5912dda17e980e7168bebcf6c'/>
<id>b2dd7b953c25ffd5912dda17e980e7168bebcf6c</id>
<content type='text'>
The issue here is when this is called from ntfs_load_attr_list().  The
"size" comes from le32_to_cpu(attr-&gt;res.data_size) so it can't overflow
on a 64bit systems but on 32bit systems the "+ 1023" can overflow and
the result is zero.  This means that the kmalloc will succeed by
returning the ZERO_SIZE_PTR and then the memcpy() will crash with an
Oops on the next line.

Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The issue here is when this is called from ntfs_load_attr_list().  The
"size" comes from le32_to_cpu(attr-&gt;res.data_size) so it can't overflow
on a 64bit systems but on 32bit systems the "+ 1023" can overflow and
the result is zero.  This means that the kmalloc will succeed by
returning the ZERO_SIZE_PTR and then the memcpy() will crash with an
Oops on the next line.

Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Update inode-&gt;i_size after success write into compressed file</title>
<updated>2024-01-29T07:48:35+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2024-01-29T07:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d68968440b1a75dee05cfac7f368f1aa139e1911'/>
<id>d68968440b1a75dee05cfac7f368f1aa139e1911</id>
<content type='text'>
Reported-by: Giovanni Santini &lt;giovannisantini93@yahoo.it&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Giovanni Santini &lt;giovannisantini93@yahoo.it&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Fixed overflow check in mi_enum_attr()</title>
<updated>2024-01-29T07:48:34+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2024-01-26T08:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=652cfeb43d6b9aba5c7c4902bed7a7340df131fb'/>
<id>652cfeb43d6b9aba5c7c4902bed7a7340df131fb</id>
<content type='text'>
Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Correct function is_rst_area_valid</title>
<updated>2024-01-29T07:48:34+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2024-01-26T08:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1b7dd28e14c4728ae1a815605ca33ffb4ce1b309'/>
<id>1b7dd28e14c4728ae1a815605ca33ffb4ce1b309</id>
<content type='text'>
Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Use i_size_read and i_size_write</title>
<updated>2024-01-29T07:48:33+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2024-01-26T08:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4fd6c08a16d7f1ba10212c9ef7bc73218144b463'/>
<id>4fd6c08a16d7f1ba10212c9ef7bc73218144b463</id>
<content type='text'>
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ntfs3: Prevent generic message "attempt to access beyond end of device"</title>
<updated>2024-01-29T07:48:33+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2024-01-26T08:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5ca87d01eba7bdfe9536a157ca33c1455bb8d16c'/>
<id>5ca87d01eba7bdfe9536a157ca33c1455bb8d16c</id>
<content type='text'>
It used in test environment.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It used in test environment.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
