android_kernel_motorola_sm6375/fs/udf
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Kara d30a4882e6 udf: Allow writing to 'Rewritable' partitions
[ Upstream commit 15fb05fd286ac57a0802d71624daeb5c1c2d5b07 ]

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: Pali Rohár <[email protected]>
Reviewed-by: Pali Rohár <[email protected]>
Fixes: b085fbe2ef ("udf: Fix crash during mount")
Link: https://lore.kernel.org/linux-fsdevel/20200112144735.hj2emsoy4uwsouxz@pali
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-02-24 08:36:29 +01:00
..
balloc.c udf: prevent allocation beyond UDF partition 2019-07-31 18:41:37 +02:00
dir.c
directory.c
ecma_167.h udf: Verify domain identifier fields 2019-09-04 18:19:25 +02:00
file.c udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
ialloc.c udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
inode.c udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lowlevel.c
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
misc.c
namei.c udf: fix an uninitialized read bug and remove dead code 2019-04-17 13:13:24 +02:00
osta_udf.h
partition.c
super.c udf: Allow writing to 'Rewritable' partitions 2020-02-24 08:36:29 +01:00
symlink.c
truncate.c udf: Propagate errors from udf_truncate_extents() 2019-03-18 16:30:02 +01:00
udf_i.h udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
udf_sb.h udf: Drop pack pragma from udf_sb.h 2018-09-07 10:32:23 +02:00
udfdecl.h udf: augment UDF permissions on new inodes 2019-08-27 15:38:46 +02:00
udfend.h
udftime.c
unicode.c udf: Allow mounting volumes with incorrect identification strings 2018-11-19 10:27:59 +01:00