All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] udf: Disallow R/W mode for disk with Metadata partition
@ 2020-01-12 14:49 Pali Rohár
  2020-01-13 11:40 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2020-01-12 14:49 UTC (permalink / raw)
  To: linux-fsdevel, Jan Kara

Currently we do not support writing to UDF disks with Metadata partition.
There is already check that disks with declared minimal write revision to
UDF 2.50 or higher are mounted only in R/O mode but this does not cover
situation when minimal write revision is set incorrectly (e.g. to 2.01).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 fs/udf/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 8c28e93e9..3b7073c2f 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb,
 		goto force_ro;
 
 	if (map->s_partition_type == UDF_VIRTUAL_MAP15 ||
-	    map->s_partition_type == UDF_VIRTUAL_MAP20)
+	    map->s_partition_type == UDF_VIRTUAL_MAP20 ||
+	    map->s_partition_type == UDF_METADATA_MAP25)
 		goto force_ro;
 
 	return 0;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] udf: Disallow R/W mode for disk with Metadata partition
  2020-01-12 14:49 [PATCH] udf: Disallow R/W mode for disk with Metadata partition Pali Rohár
@ 2020-01-13 11:40 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-01-13 11:40 UTC (permalink / raw)
  To: Pali Rohár; +Cc: linux-fsdevel, Jan Kara

On Sun 12-01-20 15:49:59, Pali Rohár wrote:
> Currently we do not support writing to UDF disks with Metadata partition.
> There is already check that disks with declared minimal write revision to
> UDF 2.50 or higher are mounted only in R/O mode but this does not cover
> situation when minimal write revision is set incorrectly (e.g. to 2.01).
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Yeah, right. Better be cautious. I've added the patch to my tree.

								Honza

> ---
>  fs/udf/super.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 8c28e93e9..3b7073c2f 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb,
>  		goto force_ro;
>  
>  	if (map->s_partition_type == UDF_VIRTUAL_MAP15 ||
> -	    map->s_partition_type == UDF_VIRTUAL_MAP20)
> +	    map->s_partition_type == UDF_VIRTUAL_MAP20 ||
> +	    map->s_partition_type == UDF_METADATA_MAP25)
>  		goto force_ro;
>  
>  	return 0;
> -- 
> 2.20.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-13 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 14:49 [PATCH] udf: Disallow R/W mode for disk with Metadata partition Pali Rohár
2020-01-13 11:40 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.