lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87r44zv0j3.fsf@devron.myhome.or.jp>
Date:	Tue, 15 Apr 2014 10:34:08 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Conrad Meyer <cse.cem@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6] fs: FAT: Add support for DOS 1.x formatted volumes

Conrad Meyer <cse.cem@...il.com> writes:

> Add structure for parsed BPB information, struct fat_bios_param_block,
> and move all of the deserialization and validation logic from
> fat_fill_super() into fat_read_bpb().
>
> Add a 'dos1xfloppy' mount option to infer DOS 2.x BIOS Parameter Block
> defaults from block device geometry for ancient floppies and floppy
> images, as a fall-back from the default BPB parsing logic.
>
> When fat_read_bpb() finds an invalid FAT filesystem and dos1xfloppy is
> set, fall back to fat_read_static_bpb(). fat_read_static_bpb() validates
> that the entire BPB is zero, and that the floppy has a DOS-style 8086
> code bootstrapping header. Then it fills in default BPB values from
> media size and a table.[0]
>
> Media size is assumed to be static for archaic FAT volumes. See also:
> [1].
>
> Fixes kernel.org bug #42617.
>
> [0]: https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
> [1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
>
> Signed-off-by: Conrad Meyer <cse.cem@...il.com>
> ---
> Changes since v5:
>   * Leave the bulk of sbi-> filling logic to the aptly named fat_fill_super()
>   * Create separate structure for deserialized BPB values
>   * fat_read_bpb() deserializes BPB from raw fat_boot_sector and performs
>     validations
>   * fat_read_static_bpb() validates raw fat_boot_sector as dos1x and fills in
>     BPB values from table
>
> Thanks,
> Conrad
> ---
>  fs/fat/fat.h   |  28 ++++-
>  fs/fat/inode.c | 316 +++++++++++++++++++++++++++++++++++++++++++--------------
>  2 files changed, 267 insertions(+), 77 deletions(-)
>
> diff --git a/fs/fat/fat.h b/fs/fat/fat.h
> index 7270bdb..bcb0d67 100644
> --- a/fs/fat/fat.h
> +++ b/fs/fat/fat.h
> @@ -52,7 +52,8 @@ struct fat_mount_options {
>  		 usefree:1,	   /* Use free_clusters for FAT32 */
>  		 tz_set:1,	   /* Filesystem timestamps' offset set */
>  		 rodir:1,	   /* allow ATTR_RO for directory */
> -		 discard:1;	   /* Issue discard requests on deletions */
> +		 discard:1,	   /* Issue discard requests on deletions */
> +		 dos1xfloppy:1;	   /* Assume default BPB for DOS 1.x floppies */
>  };

OK. Looks good basically.

Another one I am also forgetting. Need to update show_options() and
Documents/fs/vfat.txt for new option.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ