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
| ||
|
Message-Id: <20221014084837.1787196-5-hrkanabar@gmail.com> Date: Fri, 14 Oct 2022 08:48:34 +0000 From: Hrutvik Kanabar <hrkanabar@...il.com> To: Hrutvik Kanabar <hrutvik@...gle.com> Cc: Marco Elver <elver@...gle.com>, Aleksandr Nogikh <nogikh@...gle.com>, kasan-dev@...glegroups.com, Alexander Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, Theodore Ts'o <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>, linux-ext4@...r.kernel.org, Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org, Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>, linux-f2fs-devel@...ts.sourceforge.net, "Darrick J . Wong" <djwong@...nel.org>, linux-xfs@...r.kernel.org, Namjae Jeon <linkinjeon@...nel.org>, Sungjong Seo <sj1557.seo@...sung.com>, Anton Altaparmakov <anton@...era.com>, linux-ntfs-dev@...ts.sourceforge.net Subject: [PATCH RFC 4/7] fs/exfat: support `DISABLE_FS_CSUM_VERIFICATION` config option From: Hrutvik Kanabar <hrutvik@...gle.com> When `DISABLE_FS_CSUM_VERIFICATION` is enabled, bypass checksum verification. Signed-off-by: Hrutvik Kanabar <hrutvik@...gle.com> --- fs/exfat/nls.c | 3 ++- fs/exfat/super.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c index 705710f93e2d..f0f92eaf6ccc 100644 --- a/fs/exfat/nls.c +++ b/fs/exfat/nls.c @@ -696,7 +696,8 @@ static int exfat_load_upcase_table(struct super_block *sb, brelse(bh); } - if (index >= 0xFFFF && utbl_checksum == chksum) + if (IS_ENABLED(CONFIG_DISABLE_FS_CSUM_VERIFICATION) || + (index >= 0xFFFF && utbl_checksum == chksum)) return 0; exfat_err(sb, "failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)", diff --git a/fs/exfat/super.c b/fs/exfat/super.c index 35f0305cd493..7418858792b3 100644 --- a/fs/exfat/super.c +++ b/fs/exfat/super.c @@ -564,6 +564,9 @@ static int exfat_verify_boot_region(struct super_block *sb) if (!bh) return -EIO; + if (IS_ENABLED(CONFIG_DISABLE_FS_CSUM_VERIFICATION)) + return 0; + for (i = 0; i < sb->s_blocksize; i += sizeof(u32)) { p_chksum = (__le32 *)&bh->b_data[i]; if (le32_to_cpu(*p_chksum) != chksum) { -- 2.38.0.413.g74048e4d9e-goog
Powered by blists - more mailing lists