]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
exfat: replace unsafe macros with static inline functions
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 21 Apr 2026 07:42:45 +0000 (16:42 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 15 Jun 2026 10:55:29 +0000 (19:55 +0900)
commitf07db38084dc45162d5fe2871ed72674ddc0f9ae
tree9f2f9a984ffe8261e4a005a58bf5822a08a48fe1
parent623f0aa1eca5c2a94ca1e4e5de719d062eac3b6c
exfat: replace unsafe macros with static inline functions

The current exFAT driver relies on various macros for unit conversions
between clusters, blocks, sectors, and directory entries. These macros
are structurally unsafe as they lack type enforcement and are prone to
potential integer overflows during bit-shift operations, especially
on 64-bit architectures. Replace all arithmetic macros with static inline
functions to provide strict type checking and explicit casting.

Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/balloc.c
fs/exfat/dir.c
fs/exfat/exfat_fs.h
fs/exfat/fatent.c
fs/exfat/file.c
fs/exfat/inode.c
fs/exfat/namei.c
fs/exfat/super.c