<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/udf/dir.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-09-12T09:58:44+00:00</updated>
<entry>
<title>udf: store cookie in private data</title>
<updated>2024-09-12T09:58:44+00:00</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2024-08-30T13:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3dd4624ffcd2e6e5d2cee5a6c234774ce27e1f04'/>
<id>urn:sha1:3dd4624ffcd2e6e5d2cee5a6c234774ce27e1f04</id>
<content type='text'>
Store the cookie to detect concurrent seeks on directories in
file-&gt;private_data.

Link: https://lore.kernel.org/r/20240830-vfs-file-f_version-v1-15-6d3e4816aa7b@kernel.org
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>udf: Remove GFP_NOFS from dir iteration code</title>
<updated>2024-01-23T18:21:10+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2024-01-09T10:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6766303c0f2ffbcc640ef2701984a81a274aff2'/>
<id>urn:sha1:f6766303c0f2ffbcc640ef2701984a81a274aff2</id>
<content type='text'>
Directory iteration code was using GFP_NOFS allocations in two places.
However the code is called only under inode-&gt;i_rwsem which is generally
safe wrt reclaim. So we can do the allocations with GFP_KERNEL instead.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>fs: udf: Replace GPL 2.0 boilerplate license notice with SPDX identifier</title>
<updated>2023-05-30T13:39:13+00:00</updated>
<author>
<name>Bagas Sanjaya</name>
<email>bagasdotme@gmail.com</email>
</author>
<published>2023-05-22T00:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ce345541ee43333bfbd99a2ea56b1a0a167c457'/>
<id>urn:sha1:5ce345541ee43333bfbd99a2ea56b1a0a167c457</id>
<content type='text'>
The notice refers to full GPL 2.0 text on now defunct MIT FTP site [1].
Replace it with appropriate SPDX license identifier.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Pali Rohár &lt;pali@kernel.org&gt;
Link: https://web.archive.org/web/20020809115410/ftp://prep.ai.mit.edu/pub/gnu/GPL [1]
Signed-off-by: Bagas Sanjaya &lt;bagasdotme@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20230522005434.22133-2-bagasdotme@gmail.com&gt;
</content>
</entry>
<entry>
<title>udf: Convert udf_readdir() to new directory iteration</title>
<updated>2023-01-09T09:39:51+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2022-10-04T13:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cd7a36ab44d3e8c1dee7185ef407b9831a8220b'/>
<id>urn:sha1:7cd7a36ab44d3e8c1dee7185ef407b9831a8220b</id>
<content type='text'>
Convert udf_readdir() to new directory iteration functions.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: replace ll_rw_block()</title>
<updated>2022-09-12T03:26:07+00:00</updated>
<author>
<name>Zhang Yi</name>
<email>yi.zhang@huawei.com</email>
</author>
<published>2022-09-01T13:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59a16786fa7a77dd383a62271e0102f1455bccea'/>
<id>urn:sha1:59a16786fa7a77dd383a62271e0102f1455bccea</id>
<content type='text'>
ll_rw_block() is not safe for the sync read path because it cannot
guarantee that submitting read IO if the buffer has been locked. We
could get false positive EIO after wait_on_buffer() if the buffer has
been locked by others. So stop using ll_rw_block(). We also switch to
new bh_readahead_batch() helper for the buffer array readahead path.

Link: https://lkml.kernel.org/r/20220901133505.2510834-11-yi.zhang@huawei.com
Signed-off-by: Zhang Yi &lt;yi.zhang@huawei.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs/buffer: Combine two submit_bh() and ll_rw_block() arguments</title>
<updated>2022-07-14T18:14:32+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2022-07-14T18:07:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1420c4a549bf28ffddbed827d61fb3d4d2132ddb'/>
<id>urn:sha1:1420c4a549bf28ffddbed827d61fb3d4d2132ddb</id>
<content type='text'>
Both submit_bh() and ll_rw_block() accept a request operation type and
request flags as their first two arguments. Micro-optimize these two
functions by combining these first two arguments into a single argument.
This patch does not change the behavior of any of the modified code.

Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Acked-by: Song Liu &lt;song@kernel.org&gt; (for the md changes)
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Link: https://lore.kernel.org/r/20220714180729.1065367-48-bvanassche@acm.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>udf: Fix crash after seekdir</title>
<updated>2021-11-09T11:53:58+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2021-11-04T14:22:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a48fc69fe6588b48d878d69de223b91a386a7cb4'/>
<id>urn:sha1:a48fc69fe6588b48d878d69de223b91a386a7cb4</id>
<content type='text'>
udf_readdir() didn't validate the directory position it should start
reading from. Thus when user uses lseek(2) on directory file descriptor
it can trick udf_readdir() into reading from a position in the middle of
directory entry which then upsets directory parsing code resulting in
errors or even possible kernel crashes. Similarly when the directory is
modified between two readdir calls, the directory position need not be
valid anymore.

Add code to validate current offset in the directory. This is actually
rather expensive for UDF as we need to read from the beginning of the
directory and parse all directory entries. This is because in UDF a
directory is just a stream of data containing directory entries and
since file names are fully under user's control we cannot depend on
detecting magic numbers and checksums in the header of directory entry
as a malicious attacker could fake them. We skip this step if we detect
that nothing changed since the last readdir call.

Reported-by: Nathan Wilson &lt;nate@chickenbrittle.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Get rid of 0-length arrays in struct fileIdentDesc</title>
<updated>2021-08-11T14:54:44+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2021-05-03T09:54:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=979a6e28dd969a2222545001f79566b4bfaf06c0'/>
<id>urn:sha1:979a6e28dd969a2222545001f79566b4bfaf06c0</id>
<content type='text'>
Get rid of 0-length arrays in struct fileIdentDesc. This requires a bit
of cleaning up as the second variable length array in this structure is
often used and the code abuses the fact that the first two arrays have
the same type and offset in struct fileIdentDesc.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Fix 64-bit sign extension issues affecting blocks &gt; 0x7FFFFFFF</title>
<updated>2017-10-17T09:56:45+00:00</updated>
<author>
<name>Steve Magnani</name>
<email>steve.magnani@digidescorp.com</email>
</author>
<published>2017-10-12T13:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b490bdd630cc43a5725e76c7c23f8a7e55551145'/>
<id>urn:sha1:b490bdd630cc43a5725e76c7c23f8a7e55551145</id>
<content type='text'>
Large (&gt; 1 TiB) UDF filesystems appear subject to several problems when
mounted on 64-bit systems:

* readdir() can fail on a directory containing File Identifiers residing
  above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO.

* FIBMAP on a file block located above 0x7FFFFFFF can return a negative
  value. The low 32 bits are correct, but applications that don't mask the
  high 32 bits of the result can perform incorrectly.

Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation
of UDF block addresses. Ultimately, all driver functions that manipulate
UDF block addresses should use this type; for now, deployment is limited
to functions with actual or potential sign extension issues.

Changes to udf_readdir() and udf_block_map() address the issues noted
above; other changes address potential similar issues uncovered during
audit of the driver code.

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>block,fs: untangle fs.h and blk_types.h</title>
<updated>2016-11-01T15:43:26+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-11-01T13:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f8b544477e627a42e66902e948d87f86554aeca'/>
<id>urn:sha1:2f8b544477e627a42e66902e948d87f86554aeca</id>
<content type='text'>
Nothing in fs.h should require blk_types.h to be included.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
