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-next>] [day] [month] [year] [list]
Date:   Mon, 10 Dec 2018 14:41:55 -0500
From:   Carmeli Tamir <carmeli.tamir@...il.com>
To:     hirofumi@...l.parknet.co.jp, jthumshirn@...e.de,
        sergey.senozhatsky@...il.com, akpm@...ux-foundation.org,
        axboe@...nel.dk, martin.petersen@...cle.com, bvanassche@....org,
        linux-kernel@...r.kernel.org, carmeli.tamir@...il.com
Subject: [PATCH 0/2] fat: Added macros to determine the FAT FS variant (12/16/32bit)

Along the FAT FS code, the FAT variant (whether this is FAT12, FAT16 or FAT32) is
determined by checking the fat_bits field of struct msdos_sb_info. 
This is somewhat error prone as it forces the usage of magics (12, 16, 32)
multiple times in the code.

This series replaces the places in which the variant is checked with three simple
macros - IS_FAT12, IS_FAT16 and IS_FAT16.

The introduction of these simple macros makes a clearer API for determining the variant,
rather than searching the code for some field in a struct, and therefore
increases the code's maintainability and readability.

Carmeli Tamir (2):
  fat: Moved macros that won't work without fat.h
  fat: New macros to determine the FAT variant (32, 16 or 12)

 fs/fat/cache.c                |  2 +-
 fs/fat/dir.c                  |  4 ++--
 fs/fat/fat.h                  | 28 ++++++++++++++++++++++------
 fs/fat/fatent.c               | 17 +++++++----------
 fs/fat/inode.c                | 12 ++++++------
 fs/fat/misc.c                 |  2 +-
 include/uapi/linux/msdos_fs.h |  5 -----
 7 files changed, 39 insertions(+), 31 deletions(-)

-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ