<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/udf/inode.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-02-01T16:29:02Z</updated>
<entry>
<title>udf: Fix NULL ptr deref when converting from inline format</title>
<updated>2022-02-01T16:29:02Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-01-17T17:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=620e8243cf5389e706c1c8f66ffacb3c84308a9e'/>
<id>urn:sha1:620e8243cf5389e706c1c8f66ffacb3c84308a9e</id>
<content type='text'>
commit 7fc3b7c2981bbd1047916ade327beccb90994eee upstream.

udf_expand_file_adinicb() calls directly -&gt;writepage to write data
expanded into a page. This however misses to setup inode for writeback
properly and so we can crash on inode-&gt;i_wb dereference when submitting
page for IO like:

  BUG: kernel NULL pointer dereference, address: 0000000000000158
  #PF: supervisor read access in kernel mode
...
  &lt;TASK&gt;
  __folio_start_writeback+0x2ac/0x350
  __block_write_full_page+0x37d/0x490
  udf_expand_file_adinicb+0x255/0x400 [udf]
  udf_file_write_iter+0xbe/0x1b0 [udf]
  new_sync_write+0x125/0x1c0
  vfs_write+0x28e/0x400

Fix the problem by marking the page dirty and going through the standard
writeback path to write the page. Strictly speaking we would not even
have to write the page but we want to catch e.g. ENOSPC errors early.

Reported-by: butt3rflyh4ck &lt;butterflyhuangxx@gmail.com&gt;
CC: stable@vger.kernel.org
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>udf: Restore i_lenAlloc when inode expansion fails</title>
<updated>2022-02-01T16:29:02Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-01-18T08:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8baf0dbef73e1d1ad41f5db77bf20234fb7a7773'/>
<id>urn:sha1:8baf0dbef73e1d1ad41f5db77bf20234fb7a7773</id>
<content type='text'>
commit ea8569194b43f0f01f0a84c689388542c7254a1f upstream.

When we fail to expand inode from inline format to a normal format, we
restore inode to contain the original inline formatting but we forgot to
set i_lenAlloc back. The mismatch between i_lenAlloc and i_size was then
causing further problems such as warnings and lost data down the line.

Reported-by: butt3rflyh4ck &lt;butterflyhuangxx@gmail.com&gt;
CC: stable@vger.kernel.org
Fixes: 7e49b6f2480c ("udf: Convert UDF to new truncate calling sequence")
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>udf: Get rid of 0-length arrays in struct fileIdentDesc</title>
<updated>2021-08-11T14:54:44Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2021-05-03T09:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>mm: require -&gt;set_page_dirty to be explicitly wired up</title>
<updated>2021-06-29T17:53:48Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2021-06-29T02:36:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0af573780b0b13fceb7fabd49dc1b073cee9a507'/>
<id>urn:sha1:0af573780b0b13fceb7fabd49dc1b073cee9a507</id>
<content type='text'>
Remove the CONFIG_BLOCK default to __set_page_dirty_buffers and just wire
that method up for the missing instances.

[hch@lst.de: ecryptfs: add a -&gt;set_page_dirty cludge]
  Link: https://lkml.kernel.org/r/20210624125250.536369-1-hch@lst.de

Link: https://lkml.kernel.org/r/20210614061512.3966143-4-hch@lst.de
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: Tyler Hicks &lt;code@tyhicks.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>udf: fix silent AED tagLocation corruption</title>
<updated>2021-01-25T17:09:25Z</updated>
<author>
<name>Steven J. Magnani</name>
</author>
<published>2021-01-07T23:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63c9e47a1642fc817654a1bc18a6ec4bbcc0f056'/>
<id>urn:sha1:63c9e47a1642fc817654a1bc18a6ec4bbcc0f056</id>
<content type='text'>
When extending a file, udf_do_extend_file() may enter following empty
indirect extent. At the end of udf_do_extend_file() we revert prev_epos
to point to the last written extent. However if we end up not adding any
further extent in udf_do_extend_file(), the reverting points prev_epos
into the header area of the AED and following updates of the extents
(in udf_update_extents()) will corrupt the header.

Make sure that we do not follow indirect extent if we are not going to
add any more extents so that returning back to the last written extent
works correctly.

Link: https://lore.kernel.org/r/20210107234116.6190-2-magnani@ieee.org
Signed-off-by: Steven J. Magnani &lt;magnani@ieee.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Remove pointless union in udf_inode_info</title>
<updated>2020-09-29T15:21:54Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2020-09-25T10:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=382a2287bf9cd283206764572f66ab12657218aa'/>
<id>urn:sha1:382a2287bf9cd283206764572f66ab12657218aa</id>
<content type='text'>
We use only a single member out of the i_ext union in udf_inode_info.
Just remove the pointless union.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Avoid accessing uninitialized data on failed inode read</title>
<updated>2020-09-29T15:21:46Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2020-09-25T10:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=044e2e26f214e5ab26af85faffd8d1e4ec066931'/>
<id>urn:sha1:044e2e26f214e5ab26af85faffd8d1e4ec066931</id>
<content type='text'>
When we fail to read inode, some data accessed in udf_evict_inode() may
be uninitialized. Move the accesses to !is_bad_inode() branch.

Reported-by: syzbot+91f02b28f9bb5f5f1341@syzkaller.appspotmail.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>fs: convert mpage_readpages to mpage_readahead</title>
<updated>2020-06-02T17:59:07Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
</author>
<published>2020-06-02T04:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4388340ae0bc8397ef5b24342279f7739982918'/>
<id>urn:sha1:d4388340ae0bc8397ef5b24342279f7739982918</id>
<content type='text'>
Implement the new readahead aop and convert all callers (block_dev,
exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6,
reiserfs &amp; udf).

The callers are all trivial except for GFS2 &amp; OCFS2.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reviewed-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt; # ocfs2
Reviewed-by: Joseph Qi &lt;joseph.qi@linux.alibaba.com&gt; # ocfs2
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: William Kucharski &lt;william.kucharski@oracle.com&gt;
Cc: Chao Yu &lt;yuchao0@huawei.com&gt;
Cc: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Cc: Eric Biggers &lt;ebiggers@google.com&gt;
Cc: Gao Xiang &lt;gaoxiang25@huawei.com&gt;
Cc: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Zi Yan &lt;ziy@nvidia.com&gt;
Cc: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Cc: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Link: http://lkml.kernel.org/r/20200414150233.24495-17-willy@infradead.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>udf: Fix spelling in EXT_NEXT_EXTENT_ALLOCDESCS</title>
<updated>2020-01-08T10:11:46Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2020-01-07T21:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=800552ceecc749aa4e87c95291be232c80bd1e56'/>
<id>urn:sha1:800552ceecc749aa4e87c95291be232c80bd1e56</id>
<content type='text'>
Change EXT_NEXT_EXTENT_ALLOCDECS to proper spelling
EXT_NEXT_EXTENT_ALLOCDESCS.

Link: https://lore.kernel.org/r/20200107212904.30471-1-pali.rohar@gmail.com
Signed-off-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: augment UDF permissions on new inodes</title>
<updated>2019-08-27T13:38:46Z</updated>
<author>
<name>Steven J. Magnani</name>
</author>
<published>2019-08-27T12:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3367a1b47d590f97109cd4b5189e750fb26c0f1'/>
<id>urn:sha1:c3367a1b47d590f97109cd4b5189e750fb26c0f1</id>
<content type='text'>
Windows presents files created within Linux as read-only, even when
permissions in Linux indicate the file should be writable.

UDF defines a slightly different set of basic file permissions than Linux.
Specifically, UDF has "delete" and "change attribute" permissions for each
access class (user/group/other). Linux has no equivalents for these.

When the Linux UDF driver creates a file (or directory), no UDF delete or
change attribute permissions are granted. The lack of delete permission
appears to cause Windows to mark an item read-only when its permissions
otherwise indicate that it should be read-write.

Fix this by having UDF delete permissions track Linux write permissions.
Also grant UDF change attribute permission to the owner when creating a
new inode.

Reported by: Ty Young
Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Link: https://lore.kernel.org/r/20190827121359.9954-1-steve@digidescorp.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
