<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/udf, branch v6.10</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>udf: Use a folio in udf_write_end()</title>
<updated>2024-04-23T13:37:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e29741676fac5d4430b3d2b799a5ff671ea9f023'/>
<id>e29741676fac5d4430b3d2b799a5ff671ea9f023</id>
<content type='text'>
Convert the page to a folio and use the folio APIs.  Replaces three
calls to compound_head() with one.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-8-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the page to a folio and use the folio APIs.  Replaces three
calls to compound_head() with one.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-8-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_page_mkwrite() to use a folio</title>
<updated>2024-04-23T13:37:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f5985ef281f9efff3e8291123fdb8a748b506951'/>
<id>f5985ef281f9efff3e8291123fdb8a748b506951</id>
<content type='text'>
Convert the vm_fault page to a folio, then use it throughout.
Replaces five calls to compound_head() with one.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-7-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the vm_fault page to a folio, then use it throughout.
Replaces five calls to compound_head() with one.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-7-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_symlink_getattr() to use a folio</title>
<updated>2024-04-23T13:37:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f1c1bd7b18768377ff4a84974d77e6e8b371a67'/>
<id>2f1c1bd7b18768377ff4a84974d77e6e8b371a67</id>
<content type='text'>
We're getting this from the page cache, so it's definitely a folio.
Saves a call to compound_head() hidden in put_page().

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-6-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're getting this from the page cache, so it's definitely a folio.
Saves a call to compound_head() hidden in put_page().

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-6-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_adinicb_readpage() to udf_adinicb_read_folio()</title>
<updated>2024-04-23T13:37:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d257d924a3fc6fe26594fba221c8be62f043b8d0'/>
<id>d257d924a3fc6fe26594fba221c8be62f043b8d0</id>
<content type='text'>
Now that all three callers have a folio, convert this function to
take a folio, and use the folio APIs.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-5-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that all three callers have a folio, convert this function to
take a folio, and use the folio APIs.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-5-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_expand_file_adinicb() to use a folio</title>
<updated>2024-04-23T13:36:30+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=db6754090a4f99c67e05ae6b87343ba6e013531f'/>
<id>db6754090a4f99c67e05ae6b87343ba6e013531f</id>
<content type='text'>
Use the folio APIs throughout this function.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Fixes: 1eeceaec794e ("udf: Convert udf_expand_file_adinicb() to avoid kmap_atomic()")
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-4-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the folio APIs throughout this function.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Fixes: 1eeceaec794e ("udf: Convert udf_expand_file_adinicb() to avoid kmap_atomic()")
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-4-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_write_begin() to use a folio</title>
<updated>2024-04-23T13:36:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d08f069cc2dafddf81b23db2ead45539b12cd0c2'/>
<id>d08f069cc2dafddf81b23db2ead45539b12cd0c2</id>
<content type='text'>
Use the folio APIs throughout instead of the deprecated page APIs.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-3-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the folio APIs throughout instead of the deprecated page APIs.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-3-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Convert udf_symlink_filler() to use a folio</title>
<updated>2024-04-23T13:36:02+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-04-17T15:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b591dfb8330e30da0dcc8f5466c6f18173cdab32'/>
<id>b591dfb8330e30da0dcc8f5466c6f18173cdab32</id>
<content type='text'>
Remove the conversion to struct page and use folio APIs throughout.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-2-willy@infradead.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the conversion to struct page and use folio APIs throughout.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240417150416.752929-2-willy@infradead.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: udftime: prevent overflow in udf_disk_stamp_to_time()</title>
<updated>2024-04-10T11:10:12+00:00</updated>
<author>
<name>Roman Smirnov</name>
<email>r.smirnov@omp.ru</email>
</author>
<published>2024-03-27T13:27:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3b84adf460381169c085e4bc09e7b57e9e16db0a'/>
<id>3b84adf460381169c085e4bc09e7b57e9e16db0a</id>
<content type='text'>
An overflow can occur in a situation where src.centiseconds
takes the value of 255. This situation is unlikely, but there
is no validation check anywere in the code.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Roman Smirnov &lt;r.smirnov@omp.ru&gt;
Reviewed-by: Sergey Shtylyov &lt;s.shtylyov@omp.ru&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240327132755.13945-1-r.smirnov@omp.ru&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An overflow can occur in a situation where src.centiseconds
takes the value of 255. This situation is unlikely, but there
is no validation check anywere in the code.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Roman Smirnov &lt;r.smirnov@omp.ru&gt;
Reviewed-by: Sergey Shtylyov &lt;s.shtylyov@omp.ru&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240327132755.13945-1-r.smirnov@omp.ru&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: replace deprecated strncpy/strcpy with strscpy</title>
<updated>2024-04-02T13:23:47+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2024-04-01T20:01:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=94755a00a4e79236d4bfa6dc671a339828fb38ce'/>
<id>94755a00a4e79236d4bfa6dc671a339828fb38ce</id>
<content type='text'>
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces. Also replace an instance of strcpy() which is also
deprecated.

s_volume_ident is a NUL-terminated string which is evident from its
usage in udf_debug:
|	udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)-&gt;s_volume_ident);

s_volume_ident should also be NUL-padded as it is copied out to
userspace:
|	if (copy_to_user((char __user *)arg,
|				UDF_SB(inode-&gt;i_sb)-&gt;s_volume_ident, 32))
|		return -EFAULT;

Considering the above, a suitable replacement is `strscpy_pad` [2] due
to the fact that it guarantees both NUL-termination and NUL-padding on
the destination buffer.

To simplify the code, let's use the new 2-argument version of
strscpy_pad() introduced in Commit e6584c3964f2f ("string: Allow
2-argument strscpy()"). Also zero-allocate @outstr so we can safely use
a non-@ret length argument. This is just in case udf_dstrCS0toChar()
doesn't include the NUL-byte in its return length, we won't truncate
@outstr or write garbage bytes either.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240401-strncpy-fs-udf-super-c-v1-1-80cddab7a281@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces. Also replace an instance of strcpy() which is also
deprecated.

s_volume_ident is a NUL-terminated string which is evident from its
usage in udf_debug:
|	udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)-&gt;s_volume_ident);

s_volume_ident should also be NUL-padded as it is copied out to
userspace:
|	if (copy_to_user((char __user *)arg,
|				UDF_SB(inode-&gt;i_sb)-&gt;s_volume_ident, 32))
|		return -EFAULT;

Considering the above, a suitable replacement is `strscpy_pad` [2] due
to the fact that it guarantees both NUL-termination and NUL-padding on
the destination buffer.

To simplify the code, let's use the new 2-argument version of
strscpy_pad() introduced in Commit e6584c3964f2f ("string: Allow
2-argument strscpy()"). Also zero-allocate @outstr so we can safely use
a non-@ret length argument. This is just in case udf_dstrCS0toChar()
doesn't include the NUL-byte in its return length, we won't truncate
@outstr or write garbage bytes either.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240401-strncpy-fs-udf-super-c-v1-1-80cddab7a281@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udf: Remove second semicolon</title>
<updated>2024-03-25T19:12:10+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2024-03-15T09:19:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8777446a3f2dd6dab0859e4aedef6e0240955fdb'/>
<id>8777446a3f2dd6dab0859e4aedef6e0240955fdb</id>
<content type='text'>
There is a statement with two semicolons. Remove the second one, it
is redundant.

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;20240315091949.2430585-1-colin.i.king@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a statement with two semicolons. Remove the second one, it
is redundant.

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;20240315091949.2430585-1-colin.i.king@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
