Skip to content
Snippets Groups Projects
  1. Oct 18, 2021
  2. Aug 23, 2021
  3. Aug 12, 2021
  4. Aug 11, 2021
    • Jan Kara's avatar
      udf: Get rid of 0-length arrays in struct fileIdentDesc · 979a6e28
      Jan Kara authored
      
      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: default avatarJan Kara <jack@suse.cz>
      979a6e28
    • Jan Kara's avatar
      udf: Get rid of 0-length arrays · b3c8c980
      Jan Kara authored
      
      Declare variable length arrays using [] instead of the old-style
      declarations using arrays with 0 members. Also comment out entries in
      structures beyond the first variable length array (we still do keep them
      in comments as a reminder there are further entries in the structure
      behind the variable length array). Accessing such entries needs a
      careful offset math anyway so it is safer to not have them declared.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      b3c8c980
    • Jan Kara's avatar
      udf: Remove unused declaration · 04e8ee50
      Jan Kara authored
      
      Remove declaration of struct virtualAllocationTable15. It is unused.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      04e8ee50
    • Jan Kara's avatar
      udf: Check LVID earlier · 781d2a9a
      Jan Kara authored
      
      We were checking validity of LVID entries only when getting
      implementation use information from LVID in udf_sb_lvidiu(). However if
      the LVID is suitably corrupted, it can cause problems also to code such
      as udf_count_free() which doesn't use udf_sb_lvidiu(). So check validity
      of LVID already when loading it from the disk and just disable LVID
      altogether when it is not valid.
      
      Reported-by: default avatar <syzbot+7fbfe5fed73ebb675748@syzkaller.appspotmail.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      781d2a9a
  5. Jun 29, 2021
  6. May 20, 2021
  7. Apr 16, 2021
  8. Feb 03, 2021
  9. Jan 25, 2021
  10. Jan 24, 2021
  11. Jan 18, 2021
    • lianzhi chang's avatar
      udf: fix the problem that the disc content is not displayed · 5cdc4a69
      lianzhi chang authored
      When the capacity of the disc is too large (assuming the 4.7G
      specification), the disc (UDF file system) will be burned
      multiple times in the windows (Multisession Usage). When the
      remaining capacity of the CD is less than 300M (estimated
      value, for reference only), open the CD in the Linux system,
      the content of the CD is displayed as blank (the kernel will
      say "No VRS found"). Windows can display the contents of the
      CD normally.
      Through analysis, in the "fs/udf/super.c": udf_check_vsd
      function, the actual value of VSD_MAX_SECTOR_OFFSET may
      be much larger than 0x800000. According to the current code
      logic, it is found that the type of sbi->s_session is "__s32",
       when the remaining capacity of the disc is less than 300M
      (take a set of test values: sector=3154903040,
      sbi->s_session=1540464, sb->s_blocksize_bits=11 ), the
      calculation result of "sbi->s_session << sb->s_blocksize_bits"
       will overflow. Therefore, it is necessary to convert the
      type of s_session to "loff_t" (when udf_check_vsd starts,
      assign a value to _sector, which is also converted in this
      way), so that the result will not overflow, and then the
      content of the disc can be displayed normally.
      
      Link: https://lore.kernel.org/r/20210114075741.30448-1-changlianzhi@uniontech.com
      
      
      Signed-off-by: default avatarlianzhi chang <changlianzhi@uniontech.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      5cdc4a69
  12. Sep 29, 2020
  13. Sep 22, 2020
  14. Sep 18, 2020
  15. Aug 28, 2020
  16. Aug 23, 2020
  17. Jul 27, 2020
  18. Jul 16, 2020
  19. Jul 14, 2020
  20. Jun 02, 2020
  21. May 04, 2020
  22. Apr 20, 2020
  23. Apr 10, 2020
  24. Mar 16, 2020
  25. Jan 20, 2020
    • Jan Kara's avatar
      udf: Clarify meaning of f_files in udf_statfs · 356557be
      Jan Kara authored
      
      UDF does not have separate preallocated table of inodes. So similarly to
      XFS we pretend that every free block is also a free inode in statfs(2)
      output. Clarify this in a comment.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      356557be
    • Jan Kara's avatar
      udf: Allow writing to 'Rewritable' partitions · 15fb05fd
      Jan Kara authored
      
      UDF 2.60 standard states in section 2.2.14.2:
      
          A partition with Access Type 3 (rewritable) shall define a Freed
          Space Bitmap or a Freed Space Table, see 2.3.3. All other partitions
          shall not define a Freed Space Bitmap or a Freed Space Table.
      
          Rewritable partitions are used on media that require some form of
          preprocessing before re-writing data (for example legacy MO). Such
          partitions shall use Access Type 3.
      
          Overwritable partitions are used on media that do not require
          preprocessing before overwriting data (for example: CD-RW, DVD-RW,
          DVD+RW, DVD-RAM, BD-RE, HD DVD-Rewritable). Such partitions shall
          use Access Type 4.
      
      however older versions of the standard didn't have this wording and
      there are tools out there that create UDF filesystems with rewritable
      partitions but that don't contain a Freed Space Bitmap or a Freed Space
      Table on media that does not require pre-processing before overwriting a
      block. So instead of forcing media with rewritable partition read-only,
      base this decision on presence of a Freed Space Bitmap or a Freed Space
      Table.
      
      Reported-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Reviewed-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Fixes: b085fbe2 ("udf: Fix crash during mount")
      Link: https://lore.kernel.org/linux-fsdevel/20200112144735.hj2emsoy4uwsouxz@pali
      
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      15fb05fd
  26. Jan 13, 2020
  27. Jan 09, 2020
  28. Jan 08, 2020
Loading