From: kernel test robot <lkp@intel.com>
To: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>,
Viacheslav Dubeyko <slava@dubeyko.com>
Cc: oe-kbuild-all@lists.linux.dev,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Yangtao Li <frank.li@vivo.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+f8ce6c197125ab9d72ce@syzkaller.appspotmail.com,
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
Subject: Re: [PATCH v6] hfsplus: validate b-tree fork extents at mount and inode read
Date: Wed, 23 Sep 2026 00:28:50 +0800 [thread overview]
Message-ID: <202609230024.oUY5bARR-lkp@intel.com> (raw)
In-Reply-To: <20260918085156.920842-1-ngocthang2710.1999@gmail.com>
Hi Nguyen,
kernel test robot noticed the following build errors:
[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v7.3-rc4 next-20260921]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nguyen-Ngoc-Thang/hfsplus-validate-b-tree-fork-extents-at-mount-and-inode-read/20260918-155156
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20260918085156.920842-1-ngocthang2710.1999%40gmail.com
patch subject: [PATCH v6] hfsplus: validate b-tree fork extents at mount and inode read
config: powerpc64-randconfig-1000-20260922 (https://download.01.org/0day-ci/archive/20260923/202609230024.oUY5bARR-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260923/202609230024.oUY5bARR-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609230024.oUY5bARR-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/hfsplus/inode.c:562:5: error: conflicting types for 'hfsplus_inode_read_fork'
int hfsplus_inode_read_fork(struct inode *inode, struct hfsplus_fork_raw *fork)
^~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/hfsplus/inode.c:22:
fs/hfsplus/hfsplus_fs.h:456:6: note: previous declaration of 'hfsplus_inode_read_fork' was here
void hfsplus_inode_read_fork(struct inode *inode,
^~~~~~~~~~~~~~~~~~~~~~~
fs/hfsplus/inode.c: In function 'hfsplus_inode_read_fork':
>> fs/hfsplus/inode.c:571:11: error: implicit declaration of function 'hfsplus_check_fork'; did you mean 'hfsplus_free_fork'? [-Werror=implicit-function-declaration]
ret = hfsplus_check_fork(sb, fork->extents, sbi->total_blocks);
^~~~~~~~~~~~~~~~~~
hfsplus_free_fork
In file included from include/asm-generic/bug.h:31,
from arch/powerpc/include/asm/bug.h:116,
from include/linux/bug.h:5,
from include/linux/instrumented.h:10,
from include/asm-generic/bitops/instrumented-atomic.h:14,
from arch/powerpc/include/asm/bitops.h:321,
from include/linux/bitops.h:67,
from include/linux/bitmap.h:8,
from include/linux/nodemask.h:91,
from include/linux/list_lru.h:12,
from include/linux/fs/super_types.h:7,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from include/linux/highmem.h:5,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/blkdev.h:9,
from fs/hfsplus/inode.c:12:
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/printk.h:483:11: note: in definition of macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~
include/linux/printk.h:554:2: note: in expansion of macro 'printk'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:554:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
fs/hfsplus/inode.c:573:2: note: in expansion of macro 'pr_err'
pr_err("hfsplus: fork check failed for inode %lu (err=%d)\n", inode->i_ino, ret);
^~~~~~
>> fs/hfsplus/inode.c:574:10: error: 'HFSPLUS_I_CORRUPT_TREE' undeclared (first use in this function); did you mean 'HFSPLUS_I_CAT_DIRTY'?
set_bit(HFSPLUS_I_CORRUPT_TREE, &hip->flags);
^~~~~~~~~~~~~~~~~~~~~~
HFSPLUS_I_CAT_DIRTY
fs/hfsplus/inode.c:574:10: note: each undeclared identifier is reported only once for each function it appears in
>> fs/hfsplus/inode.c:580:33: error: 'HFSPLUS_EXTENT_LAST_IDX' undeclared (first use in this function); did you mean 'HFSPLUS_EXT_CNID'?
for (count = 0, i = 0; i <= HFSPLUS_EXTENT_LAST_IDX; i++)
^~~~~~~~~~~~~~~~~~~~~~~
HFSPLUS_EXT_CNID
cc1: some warnings being treated as errors
--
>> fs/hfsplus/extents.c:42:5: warning: no previous prototype for 'hfsplus_check_fork' [-Wmissing-prototypes]
int hfsplus_check_fork(struct super_block *sb, struct hfsplus_extent *ext, u32 volume_blocks)
^~~~~~~~~~~~~~~~~~
vim +/hfsplus_inode_read_fork +562 fs/hfsplus/inode.c
561
> 562 int hfsplus_inode_read_fork(struct inode *inode, struct hfsplus_fork_raw *fork)
563 {
564 struct super_block *sb = inode->i_sb;
565 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
566 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
567 u32 count;
568 int i, ret;
569
570 /* Validate fork extents to catch on-disk corruption early */
> 571 ret = hfsplus_check_fork(sb, fork->extents, sbi->total_blocks);
572 if (ret) {
573 pr_err("hfsplus: fork check failed for inode %lu (err=%d)\n", inode->i_ino, ret);
> 574 set_bit(HFSPLUS_I_CORRUPT_TREE, &hip->flags);
575 sb->s_flags |= SB_RDONLY;
576 return ret; /* Return error directly to the caller */
577 }
578
579 memcpy(&hip->first_extents, &fork->extents, sizeof(hfsplus_extent_rec));
> 580 for (count = 0, i = 0; i <= HFSPLUS_EXTENT_LAST_IDX; i++)
581 count += be32_to_cpu(fork->extents[i].block_count);
582 hip->first_blocks = count;
583 memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec));
584 hip->cached_start = 0;
585 hip->cached_blocks = 0;
586
587 hip->alloc_blocks = be32_to_cpu(fork->total_blocks);
588 hip->phys_size = inode->i_size = be64_to_cpu(fork->total_size);
589 hip->fs_blocks =
590 (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
591 inode_set_bytes(inode, hip->fs_blocks << sb->s_blocksize_bits);
592 hip->clump_blocks =
593 be32_to_cpu(fork->clump_size) >> sbi->alloc_blksz_shift;
594 if (!hip->clump_blocks) {
595 hip->clump_blocks = HFSPLUS_IS_RSRC(inode) ?
596 sbi->rsrc_clump_blocks :
597 sbi->data_clump_blocks;
598 }
599
600 return 0;
601 }
602
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-09-22 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 8:51 Nguyen Ngoc Thang
2026-09-21 21:07 ` Viacheslav Dubeyko
2026-09-22 16:28 ` kernel test robot [this message]
2026-09-22 17:45 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-09-18 8:39 Nguyen Ngoc Thang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609230024.oUY5bARR-lkp@intel.com \
--to=lkp@intel.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ngocthang2710.1999@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=slava@dubeyko.com \
--cc=syzbot+f8ce6c197125ab9d72ce@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®